Distance Vector Routing Protocols Distance Vector Routing
Distance Vector Routing Updates • Routing updates occur periodically or when the topology of the network changes. • Updates proceed from router to router. • Each router sends its entire routing table to each of its adjacent neighbors. • Routing tables include information about: • Total path cost as defined by the metrics • Logical address of the first router on the path to each network contained in the table
Distance Vector Update Process
Routing Loops Introduction • Routing loops can occur when routing tables are inconsistent due to slow convergence in a changing network.
Converged Network • Just before the failure of the 192.168.0.0/24 network, all routers have consistent knowledge and correct routing tables. • The network is said to have converged. • For RTC, the preferred path to the 192.168.0.0/24 network is through RTB, and the distance from RTC to the 192.168.0.0/24 network is 3.
Converged Network Example RTE#show ip route <output omitted> C 192.168.0.0/24 is directly connected, FastEthernet1/0 RTA#show ip route <output omitted> R 192.168.0.0/24 [120/1] via 192.168.1.2, FastEthernet0/0 RTB#show ip route <output omitted> R 192.168.0.0/24 [120/2] via 192.168.2.2, Serial2/0 RTD#show ip route <output omitted> R 192.168.0.0/24 [120/2] via 192.168.3.2, Serial2/0 RTC#show ip route <output omitted> R 192.168.0.0/24 [120/3] via 192.168.4.2, Serial2/0
Network Failure • After the 192.168.0.0/24 network fails and an update is scheduled to be sent, RTE sends an update to RTA. • RTA stops routing packets to the 192.168.0.0/24 network , but RTB, RTC, and RTD continue to do so, because they have not yet been informed of the failure. • When RTA sends out its normal update, RTB and RTD stop routing to the 192.168.0.0/24 network . • However, RTC has not received an update. • For RTC, the 192.168.0.0/24 network can still be reached through RTB.
Network Failure Example RTE#show ip route <output omitted> No route to 192.168.0.0/24 RTA#show ip route <output omitted> No route to 192.168.0.0/24 RTB#show ip route <output omitted> No route to 192.168.0.0/24 RTD#show ip route <output omitted> No route to 192.168.0.0/24 RTC#show ip route <output omitted> R 192.168.0.0/24 [120/3] via 192.168.4.2, Serial2/0
The Routing Loop • Now RTC sends a periodic update to RTD, which indicates a path to the 192.168.0.0/24 network through of RTB. • RTD changes its routing table to reflect this incorrect information, and sends the information to RTA. • RTA sends the information to RTB and RTE, and the process continues. • Any packet destined for the 192.168.0.0/24 network will now loop from RTC to RTB to RTA to RTD and back again to RTC.
The Routing Loop Example RTE#show ip route <output omitted> C 192.168.0.0/24 is directly connected, FastEthernet1/0 RTA#show ip route <output omitted> R 192.168.0.0/24 [120/5] via 192.168.3.1, Serial3/0 RTB#show ip route <output omitted> R 192.168.0.0/24 [120/6] via 192.168.2.2, Serial2/0 RTD#show ip route <output omitted> R 192.168.0.0/24 [120/4] via 192.168.5.1, Serial3/0 RTC#show ip route <output omitted> R 192.168.0.0/24 [120/3] via 192.168.4.2, Serial2/0
Looping Forever • Packets will loop continuously around the network, despite the 192.168.0.0/24 network being down. • Each time a router handles a packet it increases the packet’s hop count value. • Counting to infinity
Combating Routing Loops • A number of dynamic routing protocol measures can prevent routing loops from occurring or limit the problems they cause. • Defining a maximum hop count • Split horizon • Route poisoning • Triggered updates • Holddown timers
Defining Infinity • Distance-vector protocols define infinity as a specific maximum number of hops. • This number usually refers to a maximum hop count. • 15 for RIP, 255 for IGRP • The routing protocol permits the routing loop to continue until the hop count reaches ‘infinity’. • When the maximum hop count is reached, the 192.168.0.0/24 network is considered unreachable.
Split Horizon • Using split horizon, a router will not advertise a route update to the router that originally informed it of the route.
Split Horizon Example (1) • RTA, RTB, and RTD exchange updates indicating the 192.168.0.0 network is down. • RTC has not received the message, yet.
Split Horizon Example (2) • Now, RTC sends a periodic update to RTD, which indicates a path to the 192.168.0.0/24 network through of RTB. • RTD changes its routing table to reflect this incorrect information. • RTD will not send the updated information to RTA, as RTD originally learned the 192.168.0.0/24 network was down through RTA.
Split Horizon Results RTE#show ip route <output omitted> No route to 192.168.0.0/24 RTA#show ip route <output omitted> No route to 192.168.0.0/24 RTB#show ip route <output omitted> No route to 192.168.0.0/24 RTD#show ip route <output omitted> R 192.168.0.0/24 [120/4] via 192.168.5.1, Serial3/0 RTC#show ip route <output omitted> R 192.168.0.0/24 [120/3] via 192.168.4.2, Serial2/0
Split Horizon Completion • Eventually, RTB will send a periodic update to RTC, indicating the 192.168.0.0/24 network is unavailable. • Then RTC will update its routing table and send an update to RTD. • Then, RTD will clear its route, again.
Route Poisoning • Poisoned routes are advertised with a distance higher than the maximum hop count. • For RIP, poisoned routes are advertised as being 16 hops away. • Indicates an unreachable network • By itself, route poisoning does little. • When used with triggered updates, route poisoning speeds-up convergence time, by immediately notifying other routers when a network is down.
Triggered Updates • By default a router running RIP advertises its routing table very 30 seconds. • Every 90 seconds for routers running IGRP • Using triggered updates, when a route fails, an update is sent immediately. • The router that detects a topology change immediately sends an update message to neighbor routers that, in turn, send triggered updates to their neighbors.
Holddown Timers • When a router receives an update indicating a route is down, it marks the route as inaccessible and starts a hold-time timer. • If the holddown timer expires, the route is completely removed from the routing table.
Holddown Timer Changes • If at any time before the holddown timer expiresan update is received from: • The same neighbor indicating that the network is again accessible, the router marks the network as accessible and removes the holddown timer. • A different neighbor with a better metric than originally recorded for the network, the router marks the network as accessible and removes the holddown timer. • A different neighbor with a poorer metric: • The update is ignored. • This allows more time for the knowledge of a disruptive change (routes frequently flapping from up to down) to propagate through the entire network.
Holddown Timers Illustrated