380 Chapter 6 IP Routing
Since network 172.16.30.0 is a T1 link with a bandwidth of 1.544Mbps and network
172.16.20.0 is a 56K link, you’d want the router to choose the T1 over the 56K link, right?
But because hop count is the only metric used with RIP routing, the two links would be seen
as being of equal cost. This little snag is called pinhole congestion.
It’s important to understand what a distance-vector routing protocol does when it starts up.
In Figure 6.13, the four routers start off with only their directly connected networks in their
routing tables. After a distance-vector routing protocol is started on each router, the routing
tables are updated with all route information gathered from neighbor routers.
As shown in Figure 6.13, each router has only the directly connected networks in each routing
table. Each router sends its complete routing table out to each active interface. The routing table
of each router includes the network number, exit interface, and hop count to the network.
FIGURE 6 . 1 3 The internetwork with distance-vector routing
In Figure 6.14, the routing tables are complete because they include information about all
the networks in the internetwork. They are considered converged. When the routers are converging,
it is possible that no data will be passed. That’s why fast convergence time is a serious
plus. In fact, that’s one of the problems with RIP—its slow convergence time.
The routing table in each router keeps information regarding the remote network number,
the interface to which the router will send packets to reach that network, and the hop count
or metric to the network.
Routing Loops
Distance-vector routing protocols keep track of any changes to the internetwork by broadcasting
periodic routing updates out all active interfaces. This broadcast includes the complete routing
table. This works just fine, but it’s expensive in terms of CPU process and link bandwidth. And if
a network outage happens, real problems can occur. Plus, the slow convergence of distance-vector
routing protocols can result in inconsistent routing tables and routing loops.
172.16.10.0
172.16.20.0 172.16.40.0
172.16.50.0
172.16.30.0
E0 S0
2501A
F0/0
2621A
S0 S1
E0
2501B
S0 E0
2501C
Routing Table
172.16.10.0 F0/0 0
Routing Table
172.16.10.0 E0 0
172.16.20.0 S0 0
Routing Table
172.16.20.0 S0 0
Routing Table
172.16.40.0 S0 0
172.16.30.0 E0 0
172.16.40.0 S1 0
172.16.50.0 E0 0
Distance-Vector Routing Protocols 381
Routing loops can occur because every router isn’t updated simultaneously, or even close to
it. Here’s an example—let’s say that the interface to Network 5 in Figure 6.15 fails. All routers
know about Network 5 from RouterE. RouterA, in its tables, has a path to Network 5 through
RouterB.
FIGURE 6 . 1 4 Converged routing tables
FIGURE 6 . 1 5 Routing loop example
When Network 5 fails, RouterE tells RouterC. This causes RouterC to stop routing to Network
5 through RouterE. But routers A, B, and D don’t know about Network 5 yet, so they
keep sending out update information. RouterC will eventually send out its update and cause
B to stop routing to Network 5, but routers A and D are still not updated. To them, it appears
that Network 5 is still available through RouterB with a metric of 3.
The problem occurs when RouterA sends out its regular 30-second “Hello, I’m still here—
these are the links I know about” message, which includes the ability to reach Network 5, and
now routers B and D receive the wonderful news that Network 5 can be reached from RouterA,
172.16.10.0
172.16.20.0 172.16.40.0
172.16.50.0
172.16.30.0
E0 S0
2501A
F0/0
2621A
S0 S1
E0
2501B
S0 E0
2501C
Routing Table Routing Table Routing Table
172.16.20.0 S0 0
Routing Table
172.16.30.0 E0 0
172.16.40.0 S1 0
172.16.10.0 S0 1
172.16.50.0 S1 1
172.16.10.0 F0/0 0
172.16.20.0 F0/0 1
172.16.30.0 F0/0 2
172.16.40.0 F0/0 2
172.16.50.0 F0/0 3
172.16.10.0 E0 0
172.16.20.0 S0 0
172.16.30.0 S0 1
172.16.40.0 S0 1
172.16.50.0 S0 2
172.16.40.0 S0 0
172.16.50.0 E0 0
172.16.10.0 S0 2
172.16.20.0 S0 1
172.16.30.0 S0 1
RouterA
RouterD
RouterB RouterC RouterE
Network 3 Network 4 Network 5
56K T3
382 Chapter 6 IP Routing
so routers B and D then send out the information that Network 5 is available. Any packet destined
for Network 5 will go to RouterA, to RouterB, and then back to RouterA. This is a routing
loop—how do you stop it?
Maximum Hop Count
The routing loop problem just described is called counting to infinity, and it’s caused by gossip
(broadcasts) and wrong information being communicated and propagated throughout the
internetwork. Without some form of intervention, the hop count increases indefinitely each
time a packet passes through a router.
One way of solving this problem is to define a maximum hop count. RIP permits a hop
count of up to 15, so anything that requires 16 hops is deemed unreachable. In other words,
after a loop of 15 hops, Network 5 will be considered down. Thus, the maximum hop count
will control how long it takes for a routing table entry to become invalid or questionable.
Split Horizon
Another solution to the routing loop problem is called split horizon. This reduces incorrect
routing information and routing overhead in a distance-vector network by enforcing the rule
that routing information cannot be sent back in the direction from which it was received.
In other words, the routing protocol differentiates which interface a network route was
learned on, and once this is determined, it won’t advertise the route back out that same interface.
This would have prevented RouterA from sending the updated information it received
from RouterB back to RouterB.
Route Poisoning
Another way to avoid problems caused by inconsistent updates and stop network loops is
route poisoning. For example, when Network 5 goes down, RouterE initiates route poisoning
by advertising Network 5 as 16, or unreachable (sometimes referred to as infinite).
This poisoning of the route to Network 5 keeps RouterC from being susceptible to incorrect
updates about the route to Network 5. When RouterC receives a route poisoning from
RouterE, it sends an update, called a poison reverse, back to RouterE. This ensures that all
routes on the segment have received the poisoned route information.
Holddowns
A holddown prevents regular update messages from reinstating a route that is going up and
down (called flapping). Typically, this happens on a serial link that’s losing connectivity and then
coming back up. If there wasn’t a way to stabilize this, the network would never converge and
that one flapping interface could bring the entire network down!
Holddowns prevent routes from changing too rapidly by allowing time for either the downed
route to come back up or the network to stabilize somewhat before changing to the next best
route. These also tell routers to restrict, for a specific time period, changes that might affect
recently removed routes. This prevents inoperative routes from being prematurely restored to
other routers’ tables.
Routing Information Protocol (RIP) 383
Routing Information Protocol (RIP)
Routing Information Protocol (RIP) is a true distance-vector routing protocol. RIP sends the
complete routing table out to all active interfaces every 30 seconds. RIP only uses hop count
to determine the best way to a remote network, but it has a maximum allowable hop count of
15 by default, meaning that 16 is deemed unreachable. RIP works well in small networks, but
it’s inefficient on large networks with slow WAN links or on networks with a large number of
routers installed.
RIP version 1 uses only classful routing, which means that all devices in the network must
use the same subnet mask. This is because RIP version 1 doesn’t send updates with subnet
mask information in tow. RIP version 2 provides something called prefix routing and does
send subnet mask information with the route updates. This is called classless routing.
In the following sections, we will discuss the RIP timers and then RIP configuration.
RIP Timers
RIP uses four different kinds of timers to regulate its performance:
Route update timer Sets the interval (typically 30 seconds) between periodic routing updates
in which the router sends a complete copy of its routing table out to all neighbors.
Route invalid timer Determines the length of time that must elapse (180 seconds) before a
router determines that a route has become invalid. It will come to this conclusion if it hasn’t
heard any updates about a particular route for that period. When that happens, the router will
send out updates to all its neighbors letting them know that the route is invalid.
Holddown timer This sets the amount of time during which routing information is suppressed.
Routes will enter into the holddown state when an update packet is received that indicated
the route is unreachable. This continues either until an update packet is received with a
better metric or until the holddown timer expires. The default is 180 seconds.
Route flush timer Sets the time between a route becoming invalid and its removal from the
routing table (240 seconds). Before it’s removed from the table, the router notifies its neighbors
of that route’s impending demise. The value of the route invalid timer must be less than
that of the route flush timer. This gives the router enough time to tell its neighbors about the
invalid route before the local routing table is updated.
Configuring RIP Routing
To configure RIP routing, just turn on the protocol with the router rip command and tell
the RIP routing protocol which networks to advertise. That’s it. Let’s configure our five-router
internetwork (Figure 6.9) with RIP routing.
Corp
RIP has an administrative distance of 120. Static routes have an administrative distance of 1
by default, and since we currently have static routes configured, the routing tables won’t be
384 Chapter 6 IP Routing
propagated with RIP information. However, because I added the 150/151 to the end of each
static route, we’re good to go.
You can add the RIP routing protocol by using the router rip command and the network
command. The network command tells the routing protocol which classful network to advertise.
Look at the Corp router configuration and see how easy this is:
Corp#config t
Corp(config)#router rip
Corp(config-router)#network 10.0.0.0
That’s it. Two or three commands and you’re done—sure makes your job a lot easier than
when using static routes, doesn’t it? However, keep in mind the extra router CPU process and
bandwidth that you’re consuming.
Notice I didn’t type in subnets, only the classful network address (all subnet bits and host bits
off!). It is the job of the routing protocol to find the subnets and populate the routing tables. Since
we have no router buddies running RIP, we won’t see any RIP routes in the routing table yet.
Remember that RIP uses the classful address when configuring the network
address. Because of this, all subnet masks must be the same on all devices in the
network (this is called classful routing). To clarify this, let’s say you’re using a
Class B network address of 172.16.0.0/24 with subnets 172.16.10.0, 172.16.20.0,
and 172.16.30.0. You would only type in the classful network address of
172.16.0.0 and let RIP find the subnets and place them in the routing table.
R1
Let’s configure our R1 router :
R1#config t
R1(config)#router rip
R1(config-router)#network 10.0.0.0
R1(config-router)#do show ip route
10.0.0.0/24 is subnetted, 12 subnets
S 10.1.11.0 [150/0] via 10.1.3.1
S 10.1.10.0 [150/0] via 10.1.3.1
S 10.1.9.0 [150/0] via 10.1.3.1
S 10.1.8.0 [150/0] via 10.1.3.1
S 10.1.12.0 [150/0] via 10.1.3.1
C 10.1.3.0 is directly connected, Serial0/0/1
C 10.1.2.0 is directly connected, Serial0/0/0
R 10.1.1.0 [120/1] via 10.1.3.1, 00:00:04, Serial0/0/1
Routing Information Protocol (RIP) 385
[120/1] via 10.1.2.1, 00:00:04, Serial0/0/0
C 10.1.7.0 is directly connected, FastEthernet0/1
C 10.1.6.0 is directly connected, FastEthernet0/0
R 10.1.5.0 [120/1] via 10.1.3.1, 00:00:04, Serial0/0/1
[120/1] via 10.1.2.1, 00:00:04, Serial0/0/0
R 10.1.4.0 [120/1] via 10.1.3.1, 00:00:09, Serial0/0/1
[120/1] via 10.1.2.1, 00:00:09, Serial0/0/0
R1(config-router)#
That was pretty straightforward. Let’s talk about this routing table. Since we have one RIP
buddy out there that we are exchanging routing tables with, we can see the RIP networks coming
from the Corp router. (All the other routes still show up as static.) RIP also found both connections
to the Corp router and will load-balance between them.
R2
Let’s configure our R2 router with RIP:
R2#config t
R2(config)#router rip
R2(config-router)#network 10.0.0.0
R2(config-router)#do show ip route
10.0.0.0/24 is subnetted, 12 subnets
S 10.1.11.0 [150/0] via 10.1.4.1
S 10.1.10.0 [150/0] via 10.1.4.1
C 10.1.9.0 is directly connected, FastEthernet0/0
C 10.1.8.0 is directly connected, Dot11Radio0/3/0
S 10.1.12.0 [150/0] via 10.1.4.1
R 10.1.3.0 [120/1] via 10.1.4.1, 00:00:03, Serial0/2/0
R 10.1.2.0 [120/1] via 10.1.4.1, 00:00:03, Serial0/2/0
R 10.1.1.0 [120/1] via 10.1.4.1, 00:00:03, Serial0/2/0
R 10.1.7.0 [120/2] via 10.1.4.1, 00:00:03, Serial0/2/0
R 10.1.6.0 [120/2] via 10.1.4.1, 00:00:03, Serial0/2/0
R 10.1.5.0 [120/1] via 10.1.4.1, 00:00:03, Serial0/2/0
The routing table is growing Rs as we add RIP buddies! We can still see that all routes are
in the routing table; some are still static routes. Two more routers to go.
R3
Let’s configure our R3 router with RIP—as usual with R3, we’ll use the SDM.
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario