Vous êtes sur la page 1sur 16

The Bryant Advantage CCNP ROUTE Study Guide

Chris Bryant, CCIE #12933 -- www.thebryantadvantage.com

Back To Index

IP Routing Fundamentals
Overview

Distance Vector Protocol Basics RIP vs. EIGRP Comparison Administrative Distance Routing Table Operation Static Routing Floating Static Routes On-Demand Routing Propagating Default Routes With RIP And No IP Routing IP Helper Addresses

Okay, I know what you're thinking! "I'm a CCNA already, I already studied RIP, I know all the Distance Vector stuff, I know my admin distances. Let's get to the new stuff!" Before we do that, we're going to take some time to review and master some fundamental routing skills ... ... because without that mastery, we can't become truly great. And while I know you're familiar with these protocols, this chapter is going to be more than a review for you - it's going to sharpen your skills with these critical protocols to the point where the CCNP ROUTE questions will be child's play for you. There's also more than a little material in this section that will help you

big time on your CCNP TSHOOT exam. Sooooo..... Let's get started! How and Where Distance Vector Protocols Operate Typically, distance vector protocols are used on Local Area Networks (LANs). While DV protocols work well in smaller and more stable environments, they have several drawbacks that prevent them from being used as Wide Area Network (WAN) protocols. One such drawback is the default behavior of the DV protocols RIP version 1 ("RIPv1"). RIP broadcasts routing updates every 30 seconds, as illustrated by show ip protocols: R5#show ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 16 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Both these protocols will broadcast full routing tables as part of their updates, regardless of whether anything has actually changed since the last update. This is a waste of bandwidth and resources, since your average LAN's subnets aren't going to change every minute. (We hope!) RIPv2 multicasts updates to 224.0.0.9 rather than broadcasting them, but the updates are still sent out every 30 seconds. In a larger network, another problem arises. RIP routing updates can hold a maximum of 25 routes, so if there are 105 routes in your network, five separate update packets would be needed. Since these updates would go out every 30 seconds, whether anything had actually changed in the network, RIP is generally a poor choice for a WAN protocol. RIPv1 is a classful routing protocol, and therefore does not support VLSM. The only masks RIPv1 understands are the classful masks for Class A (255.0.0.0), Class B (255.255.0.0), and Class C (255.255.255.0). Another reason you don't see DV protocols used on WANs very often is their method of determining the best path. Both versions of RIP only understand hop count - literally, how many "hops" there are from Point A to Point B. On a LAN, this really isn't a problem, but RIP's limitations quickly become a problem on a WAN.

There are two paths between A and B. The path using the two T1 lines is much faster than the 56 kbps path, but RIP will see these paths as equals. RIP's routing algorithm, the Bellman-Ford algorithm, considers only hop count in computing its metric. In this example, RIP will then perform equal-cost load balancing over the two links. (DV protocols perform equal-cost load balancing over four paths by default.) Default DV Protocol Behaviors DV protocols do have some drawbacks, but they also have some default behaviors that help prevent routing loops. You saw all of these in your CCNA studies, but let's do a quick review. Split Horizon simply means that a routing protocol cannot advertise a route via the same interface upon which it was learned. Here, Router 3 cannot advertise the loopback network 2.0.0.0 via its ethernet interface, because that is the interface upon which the router first learned about the network.

Poison Reverse allows a router to advertise a network with an metric of

"unreachable" when that network becomes unavailable. This allows the other routers to learn that the network is unreachable much faster than if it were left up to the normal DV protocol behaviors.

It's obviously in our best interest to have the quickest convergence time possible. If some routers think "network A" is available and others think the network is unavailable, routing for that network is going to be substandard at best and routing loops can easily form. The Basics Of RIPv1, RIPv2, and EIGRP RIPv1: Broadcasts updates every 30 seconds Classful, does not recognize VLSM, update carries entire routing table Uses Bellman-Ford algorithm Equal-cost load shares by default, max hop count is 15 No routing update authentication available Updates carry 25 routes max RIPv2: Multicasts updates every 30 seconds to 224.0.0.9 Classless, supports VLSM, update carries entire routing table Uses Bellman-Ford and default equal-cost load sharing, max hop count is 15, updates carry 25 routes max Supports routing update authentication (clear-text and MD5)

EIGRP: Multicasts to 224.0.0.10 Sends entire routing table only when the adjacency is first formed Sends only routing update after that when necessary, update reflects only the changes Uses DUAL routing algorithm Equal-cost load sharing by default, unequal-cost load sharing configured with the variance command

The Role Of Administrative Distance When a route lookup is performed in a routing table, there may be more than one path that meets the criteria for being selected. Basically, there is a four-step process a router goes through when looking for the best route to use: 1. If there are multiple routes to a destination, the route with the longest prefix length is used. 2. If there are multiple routes to a destination and they have the same prefix length, the route with the lowest administrative distance is used. 3. If there are multiple routes with the same prefix length and AD, the route with the lowest metric is used. 4. If there are multiple routes with the same prefix length, AD, and metric, all of these routes will be used in load balancing as allowed by the protocol. Consider a router that is looking through its routing table to decide the next-hop IP address to use to reach the destination 222.1.3.1. In the unlikely but possible circumstance that the router has one path discovered by OSPF and another by IGRP, the two paths could look like this:
O: I: 222.1.3.0 /25 222.1.3.0 /24 via 172.1.1.2, serial1 via 175.1.1.2, serial0

In this case, the OSPF route would be chosen, because it is the longest match; its mask is /25, a longer match than IGRP's classful mask of /24. The administrative distance (AD) does not come into use. But what if the masks were the exact same length?
O: I: 222.1.3.0 /24 222.1.3.0 /24 via 172.1.1.2, serial1 via 175.1.1.2, serial0

A tiebreaker is needed, and that's where the AD comes in. The path discovered by the protocol with the lowest AD will be used. Since IGRP's AD is 100 and OSPF's is 110, the IGRP path will actually be used over the OSPF path. AD values to know: Directly connected route / Static route using exit interface: 0 Static route with next-hop IP address: 1 EIGRP Summary: 5 (if you know where to look) External BGP: 20 Internal EIGRP: 90 OSPF: 110 RIP: 120 External EIGRP: 170 Internal BGP: 200 Unknown network: 255 You may notice some differences here from the ADs you learned in earning your CCNA. There are now two kinds of EIGRP routes listed, internal and external. Much more about those route types in the EIGRP sessions. Routing Table Operation This entire operation is practically transparent to you and I as network admins, and that's fine when things go as we expect. When things don't go as we expect - and when we're studying for Cisco exams! -- we better know the "hows" and "whys" of the routing table. We love it when the router has multiple paths to a given network! That way, if we lose one path, we have another - and we'll take all the redundancy we can get in today's delay-sensitive networks. Now that we know how a routing table is built, let's take a closer look at a small table and identify the different values.
R1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set

R C C

172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks 172.12.23.0/27 [120/1] via 172.12.123.2, 00:00:01, Serial0 [120/1] via 172.12.123.3, 00:00:04, Serial0 172.12.123.0/24 is directly connected, Serial0 10.0.0.0/24 is subnetted, 1 subnets 10.1.1.0 is directly connected, Ethernet0

There is one RIP route and two directly connected routes. Since we're primarily interested in the RIP route for this discussion, we'll run show ip route rip to see only the routes that RIP has discovered.
R1#show ip route rip 172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks R 172.12.23.0/27 [120/1] via 172.12.123.2, 00:00:04, Serial0 [120/1] via 172.12.123.3, 00:00:04, Serial0

The network 172.12.23.0/27 is the destination. The numbers contained in the brackets are the administrative distance of the protocol that discovered the route, followed by the metric for that path. Since this is a RIP route, the metric shown is the number of hops to that network. The IP addresses following the word "via" are the next-hop IP addresses, followed by the time this route was last refreshed. Since RIP sends full routing updates every 30 seconds regardless of version, this value will not exceed 30 seconds for a valid RIP route unless the holddown timers are in use. Finally, each line ends by naming an interface. This is the local interface that data sent to this destination will use to exit the router. It has nothing to do with the downstream router. In this example, we have two separate paths listed for a single destination. Remember the process a router uses to determine the best path? It's worth repeating.... The route with the longest prefix length will be selected. The term "longest prefix match" refers to the length of the subnet mask. If there are multiple routes with the same prefix length, the route with the lowest administrative distance will be used. Generally referred to as "AD", this is a measurement of a protocol's believability. The lower the AD, the more believable the protocol. If there are multiple routes with the same prefix length and AD, the route with the lowest metric will be preferred. Finally, if the preceding three values are all equal, equal-cost load sharing will be put into action. The prefix length, administrative distance, and metrics are all the same. Therefore, RIP will use both paths via equal-cost load sharing. You can verify that load sharing is in operation (and a lot of other things!) by running show ip protocols. In this example, we can also see when the next routing update is expected, what version of RIP you're running, whether routing updates are being authenticated (you would see a value under "Key-chain" if authentication was in use), and whether autosummarization is on or off.

R1#show ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 7 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 2, receive version 2 Interface Send Recv Triggered RIP Key-chain Serial0 2 2 Automatic network summarization is not in effect (autosummarization has been turned off) Maximum path: 4 Routing for Networks: 172.12.0.0 Routing Information Sources: Gateway Distance Last Update 172.12.123.3 120 00:00:09 172.12.123.2 120 00:00:06 Distance: (default is 120)

As great as dynamic routing protocols are, I can guarantee you that the time will come when you need to use a routing method that has less overhead. Maybe you're working with a router with very limited resources; maybe you want to have more personal control about routing operations. There are several methods you can use in these scenarios, and the most common are static routes and default static routes. Static Routing Routing protocols are much more effective in keeping an accurate routing table, and adapt to network changes much more quickly than static routing - and it takes a lot less of our time, too. So why use static routing at all? One major reason is when a route has one IP address as the next-hop address for every single route in its table. Why keep a full dynamic routing table when a single static route will do? As we'll see in the Advanced EIGRP and especially the multiarea OSPF sections, this strategy is actually built in to these dynamic routing protocols. Static routes can also serve as a tourniquet of sorts for your network. If something goes wrong with your dynamic protocol and you need to give your users a quick path to a gateway that can get them where they need to go , a quick static route can give you (some) peace and quiet while you fix the problem. A static route can also serve as a backup to a dynamic routing protocols - a floating static route, that is. A floating static route is assigned an administrative distance higher than that of any dynamic protocol running on the router, ensuring that the only way the static route can be used is if all dynamic routes leave the table. A default static route serves as a router's gateway of last resort. Remember that a default static route isn't the path packets will take

first, it's the path they'll take if there is no other match in the routing table at all. You learned how to configure a static route in your CCNA studies, but let's quickly review the syntax:
R1(config)#ip route 3.3.3.3 255.255.255.255 172.12.123.3

R1(config)#ip route 3.3.3.3 255.255.255.255 serial0

These two static routes are both host routes; that is, they are valid for only one destination, in this case 3.3.3.3 /32. Note that the mask is a subnet mask, not a wildcard mask. In the first example, the IP address at the end of the static route is the next-hop IP address for the route. In the second, the interface named at the end of the static route is the local exit interface. You will never configure a static route that uses a local IP address or a remote interface name. You'll use the ip route command for a default static route, but the IP address and mask look rather odd:
R1(config)#ip route 0.0.0.0 0.0.0.0 172.12.123.3 R1#show ip route < code table removed for clarity > Gateway of last resort is 172.12.123.3 to network 0.0.0.0 172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks 172.12.23.0/27 [120/1] via 172.12.123.2, 00:00:14, Serial0 [120/1] via 172.12.123.3, 00:00:26, Serial0 172.12.123.0/24 is directly connected, Serial0 10.0.0.0/24 is subnetted, 1 subnets 10.1.1.0 is directly connected, Ethernet0 0.0.0.0/0 [1/0] via 172.12.123.3

R C C S*

The ip route statement contains all zeroes for both the destination and mask. The gateway of last resort is now set, and any data that does not have a match in the routing table will be sent to the next-hop address 172.12.123.3. The asterisk next to the S indicates that this is a default route. The ip route statement for a default route can also end with the local exit interface:
R1(config)#ip route 0.0.0.0 0.0.0.0 serial0 R1#show ip route < code table removed for clarity > Gateway of last resort is 0.0.0.0 to network 0.0.0.0 172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks 172.12.23.0/27 [120/1] via 172.12.123.2, 00:00:26, Serial0 [120/1] via 172.12.123.3, 00:00:08, Serial0 172.12.123.0/24 is directly connected, Serial0 10.0.0.0/24 is subnetted, 1 subnets 10.1.1.0 is directly connected, Ethernet0 0.0.0.0/0 is directly connected, Serial0

R C C S*

R1#

While the gateway is now set to 0.0.0.0 rather than 172.12.123.3, the net effect is the same. I personally like to configure a default static with a specified next-hop address, but it's up to the individual.

Floating Static Routes In Action In this lab and all others in the course, all IP addresses end with the router's number. For example, R1's Serial0 interface on the 172.12.123.0 /24 network has an IP address of 172.12.123.1. Note that RIP is not running over the entire network -- it's not running over the serial link connecting R1 and R3's serial1 interfaces. R1/R2/R3 Frame Network: 172.12.123.0 /24 R1 / R3 Serial Connection: 210.1.1.0 /24 R2 / R3 Ethernet Network: 172.12.23.0 /27

You might be wondering if there will ever actually be a situation where you wouldn't run a dynamic protocol over that link. If you're like me, you're thinking "Why wouldn't I just run RIP over the link and let the protocol figure all of this out?" Ordinarily we'd be happy to do that, but in this case we're being asked

not to use the S1 link unless the S0 link goes down. That happens more often than you might think, for these reasons... Bandwidth availability through the S0 link is much higher than that of the S1 link, but RIP will see them as equal Perhaps the S1 link flaps on occasion and the S0 link is considered to be much more stable Perhaps the client just doesn't want to listen to reason and just doesn't want to use that link and just doesn't want to hear anything about it (this happens on occasion, too) Now let's hit this lab! R1 has two next-hop addresses for the 172.12.23.0 /27 network:
R1#show ip route rip 172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks R 172.12.23.0/27 [120/1] via 172.12.123.2, 00:00:04, Serial0 [120/1] via 172.12.123.3, 00:00:04, Serial0

We need a static route that will appear in the routing table only if those RIP links are gone, but we also know the AD of a static route is much lower than that of a RIP-discovered route. Here's how we fix that:
R1(config)#ip route 172.12.23.0 255.255.255.224 210.1.1.3 ? <1-255> Distance metric for this route name Specify name of the next hop permanent permanent route tag Set tag for this route <cr> R1(config)#ip route 172.12.23.0 255.255.255.224 210.1.1.3 200

Using the option to change the static route's administrative distance (that's what "distance metric for this route" refers to) creates the static route with an AD of 200. In this case, anything higher than 120 will do. We hope. Let's check it out....
R1#show ip route < code table removed for clarity > 172.12.0.0/16 is variably subnetted, 3 subnets, 2 masks 172.12.13.0/24 is directly connected, Serial1 172.12.23.0/27 [120/1] via 172.12.123.2, 00:00:21, Serial0 [120/1] via 172.12.123.3, 00:00:05, Serial0 172.12.123.0/24 is directly connected, Serial0 10.0.0.0/24 is subnetted, 1 subnets 10.1.1.0 is directly connected, Ethernet0

C R

C C

Now we need to test the config, and since we're in a lab environment, we'll close S0 and cut off the RIP updates. The result:
R1#show ip route < code table removed for clarity >

S C C

172.12.0.0/27 is subnetted, 1 subnets 172.12.23.0 [200/0] via 210.1.1.3 10.0.0.0/24 is subnetted, 1 subnets 10.1.1.0 is directly connected, Ethernet0 210.1.1.0/24 is directly connected, Serial1

R1#ping 172.12.23.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.12.23.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 36/36/36 ms

When we reopen R1's S0 interface, the RIP updates will again be received by R1 and the floating static route will be removed from the table due to its higher AD.
R1(config)#int s0 R1(config-if)#no shutdown R1#show ip route < code table removed for clarity > 172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks 172.12.23.0/27 [120/1] via 172.12.123.2, 00:00:17, Serial0 [120/1] via 172.12.123.3, 00:00:00, Serial0 172.12.123.0/24 is directly connected, Serial0 10.0.0.0/24 is subnetted, 1 subnets 10.1.1.0 is directly connected, Ethernet0 210.1.1.0/24 is directly connected, Serial1

R C C C

On-Demand Routing (ODR) In today's world, the phrase "On-Demand" brings to mind the latest in technology, where you can watch anything from my Cisco certification video training to the latest episode of "Real Housewives of Richmond, Virginia" (coming soon) anytime you like with the push of a button or the click of a mouse. The latest and greatest in technology, right? There's always an exception, and ODR is that exception. This isn't exactly the cutting edge of technology, but let's take a quick look at its operation. You'll often hear me say that everything we do on a Cisco router or switch has a cost, in the form of using some of our device's CPU or memory. This is especially true of dynamic routing protocols, so in small networks with routers that don't have resources to spare, static routing can be beneficial. In a larger network, though, there is the need for a middle ground between static routing and running a dynamic routing protocol. In Cisco, this is ODR. Why just Cisco? Because ODR uses our old friend Cisco Discovery Protocol (CDP). As you well know, CDP is Cisco-proprietary, so if we have a multivendor environment, ODR is not a viable solution. Make sure your ODR routers are running CDP with show cdp.

On top of that, ODR is designed for use only in a hub-and-spoke network. If you have such a network and the bandwidth is limited, ODR may be an appropriate solution. ODR also supports VLSM. The spokes are going to use ODR to send directly connected network prefixes to the hub. The spoke will use the IP address of the hub on the common link as its default gateway. By using only a single default route, the spoke routers conserve their resources.

Propagating A Default Route With RIP, IGRP, And No IP Routing When it comes to default routing, you've got three choices: Use the ip route command with all zeroes for the destination address and subnet mask Use the ip default-network command Use the ip default-gateway command There's a lot of confusion between those last two commands, and we're going to get that straight for you now so there is no confusion for you on exam day! We'll use the following network to illustrate the similarities and differences. The common subnet is 172.12.123.0 /24. We want R1 to advertise its directly connected network 100.1.1.0 /24 to R2 and R3 as a default route.

The ip default-network command is used to flag a network as a candidate default route. The routers are already running RIP over the common subnet. R1 will now introduce 100.1.1.0 /24 as the default network.
R1(config)#ip default-network 100.1.1.0

R2 and R3 will see this route as a default route discovered by RIP:


R2#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is 172.12.123.1 to network 0.0.0.0 2.0.0.0/32 is subnetted, 1 subnets 2.2.2.2 is directly connected, Loopback0 172.12.0.0/24 is subnetted, 1 subnets 172.12.123.0 is directly connected, Serial0 0.0.0.0/0 [120/1] via 172.12.123.1, 00:02:20, Serial0

C C R*

The default route named by ip default-network didn't have to be manually redistributed into RIP. It's placed there automatically by the router when this command is used. Speaking of redistribution, we could have created a default static route on R1 and then redistributed it into RIP. We'll remove the ip defaultnetwork command and do just that.
R1(config)#no ip default-network 100.0.0.0 R1(config)#ip route 0.0.0.0 0.0.0.0 ethernet0 R1(config)#router rip R1(config-router)#redistribute static metric 1

R2 and R3 will both see the default route.


R2#show ip route rip R* 0.0.0.0/0 [120/1] via 172.12.123.1, 00:00:12, Serial0 R3#show ip route rip R* 0.0.0.0/0 [120/1] via 172.12.123.1, 00:00:02, Serial0

Much more redistribution to come! IP Helper Addresses While routers accept and generate broadcasts, they do not forward them. That can present quite a problem with DHCP requests when a router is between the requesting host and the DHCP server. The initial step in the DHCP process has the host generating a DHCPDiscover packet - and that packet is a broadcast. Obviously, this plays havoc with our routing updates and keepalives they're all broadcasts and multicasts.

If this PC attempts to locate a DHCP server with a broadcast, the broadcast will be stopped by the router and will never get to the DHCP server. By configuring the ip helper-address command on the router, UDP broadcasts such as this will be translated into a unicast by the router, making the communication possible. The command should be configured on the interface that will be receiving the broadcasts -- not the interface closest to the destination device.
R1(config)#int e0 R1(config-if)#ip helper-address ? A.B.C.D IP destination address R1(config-if)#ip helper-address 100.1.1.2

DHCP messages are not the only broadcasts being relayed to the correct destination with this command -- there are nine of them. TIME, port 37 TACACS, port 49 DNS, port 53 BOOTP/DHCP Server, port 67 BOOTP/DHCP Client, port 68 TFTP, port 69 NetBIOS name service, port 137 NetBIOS datagram service, port 138 IEN-116 name service, port 42 That's going to cover most scenarios where the ip helper-address

command will be useful, but what about those situations where the broadcast you need forwarded is not on this list? You can use the ip forward-protocol command to add any UDP port number to the list. To remove protocols from the default list, use the no ip forward-protocol command. In the following example, we'll add the Network Time Protocol port to the forwarding list while removing the NetBIOS ports. Remember, you can use IOS Help to get a list of commonly filtered ports!
R1(config)#ip forward-protocol udp ? <0-65535> Port number biff Biff (mail notification, comsat, 512) bootpc Bootstrap Protocol (BOOTP) client (68) bootps Bootstrap Protocol (BOOTP) server (67) discard Discard (9) dnsix DNSIX security protocol auditing (195) domain Domain Name Service (DNS, 53) echo Echo (7) isakmp Internet Security Association and Key Management Protocol (500) mobile-ip Mobile IP registration (434) nameserver IEN116 name service (obsolete, 42) netbios-dgm NetBios datagram service (138) netbios-ns NetBios name service (137) netbios-ss NetBios session service (139) ntp Network Time Protocol (123) pim-auto-rp PIM Auto-RP (496) rip Routing Information Protocol (router, in.routed, 520) snmp Simple Network Management Protocol (161) snmptrap SNMP Traps (162) sunrpc Sun Remote Procedure Call (111) syslog System Logger (514) tacacs TAC Access Control System (49) talk Talk (517) tftp Trivial File Transfer Protocol (69) time Time (37) who Who service (rwho, 513) xdmcp X Display Manager Control Protocol (177) <cr> R1(config)#ip forward-protocol udp 123 R1(config)#no ip forward-protocol udp 137 R1(config)#no ip forward-protocol udp 138

Copyright 2011 The Bryant Advantage. All Rights Reserved.