NIIT-ICT Hanoi info@niithanoi.vn 5Routing Loop Issues Routing Loops • Distance vector routing protocols are simple in their implementation and configuration, but this comes at a price..
Trang 1Module 7 – Distance Vector Routing Protocols
Overview
• Describe how routing loopscan occur in distance vector routing
• Describe several methods used by distance vector routing protocols to ensure
that routing information is accurate
• ConfigureRIP
• Use the ip classless command
• Troubleshoot RIP
• Configure RIP for load balancing
• Configure static routes for RIP
• Verify RIP
• Configure IGRP
• Verify IGRP operation
• Troubleshoot IGRP
Trang 2NIIT-ICT Hanoi info@niithanoi.vn 3
Distance Vector Routing Updates
Distance Vector Routing Updates
• RIP – Hop Count
• IGRP and EIGRP – Bandwidth, Delay, Reliability, Load
• Cisco’s OSPF – Bandwidth
• IS-IS – Cost
• BGP – Number of AS or policy
Trang 3NIIT-ICT Hanoi info@niithanoi.vn 5
Routing Loop Issues
Routing Loops
• Distance vector routing protocols are simple in their implementation and configuration,
but this comes at a price.
• Pure distance vector routing protocols suffer from possible routing loops.
• Routing loops can cause major network problems, from packets getting lost (blackholed)
in your network, to bringing down your entire network.
• Several remedies to have been added to distance-vector algorithms to help prevent
routing loops including:
– Split horizon
– Hold-down timers
– Defining a maximum metric
Routing Loop Issues
What can cause routing loops?
• Routing loops can occur when there are:
– Incorrect or inconsistent routing updatesdue to slow convergence after a
topology change (Example coming up next.)
– Incorrect or incomplete routing information(see presentation on Discard
Routes)
– Static routes incorrectly configured with an intermediate addresswhich
does not become resolved in the routing table (see presentation on Static
Routes – Additional Information)
Trang 4NIIT-ICT Hanoi info@niithanoi.vn 7
Routing Loop Issues
Routing Loop Example
• Assume for the remainder of this example that Router C’s preferred path to
network 1 is by way of Router B.
• Router C’s routing table has a distance of 3 to network 1 via Router B
Routing Loop Issues
Network 1 Fails
• Router E sends an update to Router A
• Router A stops routing packets to network 1
• But Routers B, C, and D continue to do so because they have not yet been
informed about the failure
• Router A sends out its update
• Routers B and D stop routing to network1, (via Router A)
• However, Router C is still not updated
• To router C, network 1 is still reachable via router B
Trang 5NIIT-ICT Hanoi info@niithanoi.vn 9
Routing Loop Issues
Router C sends a periodic update to Router D
• Router C sends a periodic update to Router D indicating a path to network 1
(by way) of via Router B (4 hops).
Router D’s Routing Table information for Network 1
• Current path to Network 1 = Unreachable (down)
• Information from Router C: Network 1 : 4 hops by way of Router C
• Normally, RouterD ignores this routing information because it usually has a
better route, 2 hops, via Router A, but this route is now down
• Router D changes its routing table to reflect this (good) better, but incorrect
information, Network 1 by way of Router C (4 hops)
• Router D propagates the information to Router A
Routing Loop Issues
Routers A changes its routing table
• Router A adds new route to its routing table, get to Network 1 by way of Router
D (5 hops).
• Propagates the information to Routers B and E
Router B (and Router E) change their routing tables
• Router B now believes it can get to Network 1 by way of Router A (6 hops).
Wow! I was about to tell Router C that Network 1 was down via Router B, but
now I have new information!
• Propagates the incorrect information to Router C
Trang 6NIIT-ICT Hanoi info@niithanoi.vn 11
Routing Loop Issues
Router C changes its routing table
• Router C still believes it can get to Network 1 by way of Router B (7 hops).
Of course now it believes it is 7 hops instead of 3.
• Propagates the newer but still incorrect information to Router D
Here we go again!
• Data packets destined for Network 1 get caught in a routing loop, from Routers
A to D to C to B to A to D etc
• As routing updates continue between the routers, the hop count gets greater –
to infinity? (Not quite – we will see in a moment.)
Defining a Maximum
Problem: Count to infinity
Solution: Defining a Maximum
• Distance vector routing algorithms are self-correcting, but a routing loop
problem can require a count to infinity
• To avoid this prolonged problem, distance vector protocols define infinity as a
specific maximum number
• This number refers to a routing metric which may simply be the hop count
• When the metric value exceeds the maximum value, and as each router
receives this maximum metric, the network is then consideredunreachable.
Trang 7NIIT-ICT Hanoi info@niithanoi.vn 13
Split Horizon
• “The effect of split horizon is that a router will send out different routing
messages on different interfaces In effect a router never sends out
information on an interface that it learned from that interface.” (Lewis,
Cisco TCP/IP Routing)
Split Horizon
• This example from the curriculum is not an example of split hoizon,
but using hold-down timers.
• “Split-horizon attempts to avoid this situation If a routing update about
Network 1 arrives from Router A, Router B or Router D cannot send
information about Network 1 back to Router A Split-horizon thus
reduces incorrect routing information and reduces routing overhead.”
• Initially, this is true, but the loop is a result of Router C sending out the
updates, because it has not converged.
Trang 8NIIT-ICT Hanoi info@niithanoi.vn 15
Split Horizon Rule – Avoiding Routing Loops
• Routers RTA and RTB have their initial routing tables and are ready to
exchange routing information via a distance-vector routing protocol
like RIP.
Split Horizon disabled
• If split horizon were disabled the routing updates would include all of
the networks in their routing tables including their directly connected
networks and any networks learned from any interface.
10.1.2.0/24 0 s0
Simple Split Horizon
Initial routing tables
Split Horizon Disabled
• After the initial exchange of updates everything in the routing tables
look fine.
• Because split horizon disabled, the 10.1.2.0/24 network is sent by both
routers, but neither router includes the other’s route to 10.1.2.0/24 (1
hop) in the routing table, because it has a current route with a better
metric of 0.
Initial routing tables
New routing tables
10.1.2.0/24 network is included because split horizon has been disabled
Trang 9NIIT-ICT Hanoi info@niithanoi.vn 17
Split Horizon Disabled
• After the next exchange of updates everything in the routing tables look fine and
the routing tables are converged
• Because split horizon disabled, the besides the 10.1.2.0/24 network, the networks
learned from the other router in the previous update is also sent by both routers
• However, neither router includes the those networks, because it has a current
route with a better metric of 0
10.1.2.0/24 1 10.1.1.1
Routing Update
Next-hop Net Hops Address
10.1.3.0/24 1 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.1.0/24 0 e0 10.1.3.0/24 1 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
Routing Table
Net Hops Ex-Int
10.1.1.0/24 0 e0 10.1.3.0/24 1 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
Previous routing tables
Networks in red were included because split horizon has been disabled
New routing tables
Split Horizon Disabled – 10.1.3.0/24 down
• Note: Routing tables are not sent at the exactly same time We will
learn about this in Ch 12 Routing Protocols, that this is done on
purpose to avoid collisions on broadcast networks like Ethernet.
• Here, the 10.1.3.0/24 network fails, and before RTB sends out its
routing update, RTB receives a routing update from RTA.
10.1.2.0/24 1 10.1.1.1
Routing Table
Net Hops Ex-Int
10.1.1.0/24 0 e0 10.1.3.0/24 1 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
Routing Table
Net Hops Ex-Int
10.1.1.0/24 0 e0 10.1.3.0/24 1 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0
10.1.3.0/24 2 10.1.2.1
X
Previous routing tables
Networks in red were included because split horizon has been disabled
New routing tables
Trang 10NIIT-ICT Hanoi info@niithanoi.vn 19
Split Horizon Disabled – 10.1.3.0/24 down
• RTB notices that it has a route to 10.1.3.0/24 via RTA Even though it is 2
hops it is certainly better than its current situation of “unreachable” so it
accepts this better, but incorrect information from RTA
• RTB now forwards all packets destined for 10.1.3.0/24 to RTAat 10.1.2.1
• RTA receives these packets and forwards them to RTB at 10.1.2.2
• RTB forwards them back to RTA at 10.1.2.1
• And so on! The packets get blackholed in this routing loop
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
10.1.2.0/24 0 s0
10.1.3.0/24 2 10.1.2.1
X
Previous routing tables
Networks in red were included because split horizon has been disabled
New routing tables
Split Horizon Disabled – 10.1.3.0/24 down
• Meanwhile, its RTB’s turn to send its routing update.
• RTB increments the hop count to 10.1.3.0/24 to 3 hops and sends it to
RTA.
• When RTA sends out its next routing table it will increment the hop
count to 10.1.3.0/24 to 4 hops and sends it to RTB.
• And on and on, until “infinity” which in RIP is 16 hops.
Previous routing tables
Networks in red were included because split horizon has been disabled
New routing tables
10.1.2.0/24 0 s0
10.1.3.0/24 2 10.1.2.1
Routing Update
Next-hop Net Hops Address
10.1.3.0/24 3 10.1.2.2
Trang 11NIIT-ICT Hanoi info@niithanoi.vn 21
Split Horizon Disabled
• Once both routers have 16 hops for 10.1.3.0/24, they will both mark
this network as unreachable and discontinue forwarding , drop, packets
to this network.
• This temporary routing loop can be easily avoided by enabling split
horizon on the serial 0 interfaces.
• Split horizon rule states that router never sends out information on an
interface that it learned from that interface
10.1.1.0/24 0 e0
10.1.3.0/24 16 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0
10.1.3.0/24 16 10.1.2.1
Simple Split Horizon
10.1.1.0/24
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0
Routing Update
Next-hop Net Hops Address
Routing Update
Next-hop Net Hops Address
Routing Table
Net Hops Ex-Int
10.1.1.0/24 0 e0 10.1.3.0/24 1 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
Routing Update
Next-hop Net Hops Address
Routing Update
Next-hop Net Hops Address
Previous routing tables
New routing tables
Split
Horizon
Enabled
Trang 12NIIT-ICT Hanoi info@niithanoi.vn 23
Split Horizon Enabled
• As you can see, with split horizon enabled, RTA does not send RTB (out s0)
information about 10.1.3.0/24 because it learned it from RTB (same s0), and
RTB does not send RTA (out s0) information about 10.1.1.0/24 to RTA
because it learned it from RTA (same s0) (This also includes the common
network between them
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0
Routing Update
Next-hop Net Hops Address
Routing Update
Next-hop Net Hops Address
Routing Table
Net Hops Ex-Int
10.1.1.0/24 0 e0
10.1.3.0/24 1 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0
10.1.1.0/24 1 10.1.2.1
Routing Update
Next-hop Net Hops Address
Routing Update
Next-hop Net Hops Address
Previous routing tables
New routing tables
Split Horizon Enabled – 10.1.3.0/24 down
• RTB notices 10.1.3.0/24 is down and puts this route into hold-down state in
its routing table (hold-down coming next)
• RTB immediately sends out a triggered update for only this route (if there were
others in the routing table) with a metric of infinity, 16
• RTA receives the triggered update and puts the route for 10.1.3.0/24 into
hold-down state.
Previous routing tables
New routing tables
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
10.1.3.0/24 16 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
Trang 13NIIT-ICT Hanoi info@niithanoi.vn 25
Split Horizon Enabled – 10.1.3.0/24 down
• Notice that RTA never sends RTB a routing update for 10.1.3.0/24,
because split horizon is enabled on these interfaces.
Previous routing tables
New routing tables
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
10.1.3.0/24 16 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
Split Horizon with Poison Reverse
• Many vendor implementations of distance vector routing protocols like Cisco’s RIP and
IGRP apply a special kind of split horizon, called split horizon with poison reverse.
• “Split horizon with poison reverse means that, instead of not advertising routes to the
source, routes are advertised back to the source with a metric of 16 , which will make the
source router ignore the route It is perceived that explicitly telling a router to ignore a
route is better than not telling it about the route in the first place.” (Lewis, Cisco TCP/IP
Routing)
• One drawback is that routing update packet sizes will be increased when using Poison
Reverse, since they now include these routes
Split Horizon with Poison Reverse
10.1.1.0/24 0 e0 10.1.3.0/24 1 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
Routing Update
Next-hop Net Hops Address
10.1.1.0/24 1 10.1.1.1
10.1.3.0/24 16 10.1.2.1
Routing Update
Next-hop Net Hops Address
Trang 14NIIT-ICT Hanoi info@niithanoi.vn 27
Split Horizon Enabled by Default
Split horizon with poison reverse is enabled by default for all interfaces except:
• Physical interfaces or multipoint sub-interfaces using Frame Relay or SMDS
encapsulation (CCNA Semester 4 and CCNP)
To disable split horizon on an interface:
10.1.1.0/24 0 e0 10.1.3.0/24 1 10.1.2.2
Routing Table
Net Hops Ex-Int
10.1.2.0/24 0 s0 10.1.1.0/24 1 10.1.2.1
Routing Update
Next-hop Net Hops Address
10.1.1.0/24 1 10.1.1.1
10.1.3.0/24 16 10.1.2.1
Routing Update
Next-hop Net Hops Address
10.1.3.0/24 1 10.1.2.2
10.1.1.0/24 16 10.1.2.2
“Poisoned”
routes in red
Split Horizon with Poison Reverse
Route poisoning
• When route poisoning is used with triggered updates it will speed up
convergence time because neighboring routers do not have to wait 30
seconds before advertising the poisoned route.
Trang 15NIIT-ICT Hanoi info@niithanoi.vn 29
Preventing routing loops with holddown timers
• The main function of holddown timers is to prevent the distance vector
routing protocol from establishing routing loops during periods of network
transition (topology changes)
• “The rule: Once a route is marked unreachable, it must stay in this state for a
period of time assumed sufficient for all routers to receive new information
about the unreachable network In essence, we instruct the routers to let the
rumors calm downand then to pick up the truth.” (Zinin, Cisco IP Routing)
• The amount of time a router remains in “this state” is determined by the
holddown timer.
Preventing routing loops with holddown timers
Curriculum
• A count to infinity problem can be avoided by using holddown timers.
• When a router receives an update from a neighbor indicating that a
previously accessible network is now inaccessible, the router marks
the route as inaccessible and starts a hold-down timer
Trang 16NIIT-ICT Hanoi info@niithanoi.vn 31
Preventing routing loops with holddown timers
Same Route from same neighbor : Network is back up (Correct News)
• If at any time before the hold-down timer expires an update is received
from the same neighbor indicating that the network is again accessible ,
the router marks the network as accessible and removes the
hold-down timer
Preventing routing loops with holddown timers
Better Route from different neighbor (Correct News)
• If at any time before the hold-down timer expires an update arrives
from a different neighboring router with a better metric than originally
recorded for the network, the router marks the network as accessible
and removes the hold-down timer.
Trang 17NIIT-ICT Hanoi info@niithanoi.vn 33
Preventing routing loops with holddown timers
Poorer Route from a different neighbor (Incorrect News)
• If at any time before the hold-down timer expires an update arrives from a
different neighboring router with a poorer metric than originally recorded for the
network the update is ignored and the hold-down timer continues
• Ignoring an update with a poorer metric when a hold-down is in effect allows
more time for the knowledge of a disruptive change to propagate through the
entire network
Preventing routing loops with holddown timers
Additional Information on Holddown Timers
Flapping routes
• Holddown timers not only help prevent routing loopsduring transient periods
but also help network stability by dampening unstable, flapping routes(routes
which continuously go up and down)
Holddown Time
• As we will see with both RIP and IGRP, the amount of time the router remains
in the holddown state can be modified (with caution!), even set to 0
• We will look at this later in the presentations on RIP and IGRP