Timers are very critical to the RIP routing protocol, because they dictate and influence the RIP routing calculations and its operating behavior.
When an RIP-enabled router starts, it sends the entire routing table as response packets to all directly attached hosts through its RIP-configured interfaces. It uses broadcast 255.255.255.255 as the transmission method. The frequency of this broadcast is governed by the update timer. The update timer value can be modified as per the requirement, but any kind of modification to the default values is generally not recommended. To modify the default values of the timer, use the command timers basic update invalid hold-down flush. To view the current configuration of these timers, use the command show ip protocols. Listing 6.49 shows the output of the command show ip protocols highlighting the timer values.
Listing 6.49 Output of show ip protocols Command
show ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 31 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Key-chain FastEthernet0 1 1 2 FastEthernet0 1 1 2 Routing for Networks: 192.168.1.0 192.168.2.0 Routing Information Sources: 192.168.1.2 120 00:00:03 192.168.2.2 120 00:00:06 Distance: (default is 120)
When a router does not receive any updates for the same route for 180 seconds, it automatically designates the route as unreachable. RIP marks a particular route as unreachable by increasing the hop count to 16. Routers wait for an update for six times (180 seconds) the update period before marking the route unreachable.
Consider a scenario showing absence of the update packets from Router1 to Router2. Under such conditions, Router2 will wait for a time equivalent to six times the update timer and designate the route as unreachable, as shown in the routing table of Router2. Figure 6.7 depicts this scenario.
Figure 6.7: Scenario in which Router1 is not sending any routing updates to its connected neighbor.
Listing 6.50 shows the routing table of Router2.
Listing 6.50 Routing Table of Router2
Router2#sh 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 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, - candidate default U - per-user static route Gateway of last resort is not set C 192.168.1.0/24 is directly connected, FastEthernet0/0 C 192.168.2.0/24 is directly connected, FastEthernet0/1 R 11.0.1.0/24 is possibly down routing via 192.168.1.2, 00:08:20, FastEthernet0/0 R 11.0.2.0/24 is possibly down routing via 192.168.1.2, 00:01:42, FastEthernet0/0 R 10.0.1.0/24 [120/1] via 192.168.2.2, 00:02:22, FastEthernet0/1 R 10.0.2.0/24 [120/1] via 192.168.2.2, 00:01:24, FastEthernet0/1 R 10.0.3.0/24 [120/1] via 192.168.2.2, 00:07:38, FastEthernet0/1
Even though the routes are marked as unreachable by the routers, they are still maintained in the routing tables for a certain period of time. This timer is known as the flush timer. Each route in the routing table maintains its own value of the flush timer. After the flush timer gets activated and then expires, the route is cleaned from the routing table. During the period after the invalid timer and before the completion of the flush timer, these unreachable routes also become a part of the routing updates sent by the routers.
Note | The flush timer value should not be more than the invalid timer value or it can result in unpredictable routing calculation. |
Hold-down timer is the settling duration provided to the routes that are learned and registered in the routing table of the router. Until the hold-down timer expires, any updates about that particular route are suppressed without any modification. This holds true only if the routing updates carry a higher metric value and are then installed. To change the value of this timer, command ‘timers basic update invalid update invalid hold-down flush’ can be used. Listing 6.51 displays the output of the show ip protocol command that is used to verify timers.
Listing 6.51 RIP Timers Verified with show ip protocol
router9> show ip protocol Routing Protocol is "rip" Sending updates every 30 seconds, next due in 3 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Triggered RIP Key-chain Ethernet0 1 1 2 Serial0 1 1 2 Automatic network summarization is in effect Routing for Networks: 172.16.0.0 Routing Information Sources: Gateway Distance Last Update 172.16.4.2 120 00:00:00 172.16.1.2 120 00:00:07 Distance: (default is 120)
To change the default values of the timers, you can use the command timers basic. To reset the timers to the default settings, use the command no timers basic.
Note | If the timer value of a router is changed, the timer value of all the routers in the same RIP domain should be changed. Therefore, it is not recommended to modify the default values of these timers. |