Problem
You wish to tune your routing protocol performance to improve the time that the network takes to converge after a topology change.
Solution
RIP has several timers that control things like how often it sends updates and how long it takes to remove a bad route. You can adjust these values with the timers basic configuration command:
Router2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router2(config)#router rip Router2(config-router)#timers basic 20 80 80 120 Router2(config-router)#exit Router2(config)#end Router2#
Discussion
The timers basic command controls all of the adjustable timers for RIP:
Router2(config-router)#timers basic 20 80 80 120
The four arguments are, in order, the update period, the invalid route timer, the holddown timer, and the flush timer. All of these times are in seconds.
The update period controls how often the router sends updates to its neighbors. The default update period is 30 seconds. Reducing this period can help improve convergence times. However, you have to remember that RIP sends the entire routing table in each update cycle. So if the routing table is large, reducing this period too much can cause serious bandwidth loading problems on slower links.
The invalid route timer controls how long the router will wait before a particular route is declared invalid. If the route disappears from routing updates from neighboring routers for this length of time, the router will mark it invalid. The router will set the RIP metric for invalid routes to 16, or unreachable, when distributing them. This technique is often called "route poisoning." It is important to remember that the router doesn't remove invalid routes from its own routing table, and it will continue to distribute them to other routers.
The default invalid route timer value is 180 seconds. Most references advise making this value at least three times the update period. Shorter invalid route timers can cause instability problems. But if you make it too much longer, then the network doesn't respond well to topology changes.
The holddown timer for a particular route starts when the router gets a routing update that says that a particular route is inaccessible. This could happen, for example, if another router's invalid route timer for this route has expired. But it can also happen as a result of a triggered update, indicating that a particular interface pointing to this network has gone down.
The router will keep the unreachable route in its table, and will distribute it to other routers with an unreachable metric. After the holddown timer expires, the router will delete the unreachable route and start to accept other routing information for this route.
The default holddown period is 180 seconds. It is usually a good idea to keep the holddown time the same as the invalid route timer to help ensure network stability.
The final parameter is the flush timer. This controls how long the router will keep a route in its routing table before purging it. The default flush period is 240 seconds. It must be greater than the holddown time; otherwise, routes can be flushed before the holddown timer expires, which makes the holddown time meaningless.
We recommend using extreme caution when adjusting RIP timers. The timers on every router in a RIP network must be equal, or you will see terrible instability problems. Note that the RIP timers affect the entire RIP process, meaning that you can't set the timer values separately for different neighbors, or different interfaces. So it isn't possible to slow down the update timers over a slow WAN link and make them shorter over a faster LAN link.
In this example, we wanted to make RIP converge faster after topology changes, so we decreased all of the timers:
Router2(config)#router rip Router2(config-router)#timers basic 20 80 80 120
The net result is that we have reduced the time to flush a bad route to 2 minutes from the default value of 4. But it is important to notice that we had to decrease all of the timers to achieve this result without compromising overall network stability.
As we mentioned earlier, routers will send the entire routing table on every update cycle. So making the timers too short can cause congestion problems on slower links. However, you can get away with shorter update periods if you use route summarization or filtering, as shown in Recipe 6.16. You can also decrease bandwidth consumption while improving convergence times by configuring the routers to send updates only when there are changes, as in Recipe 6.12.
Usually people are interested in reducing these timers to improve convergence times. We don't recommend increasing them from the default values because it will make the network respond too slowly to topology changes. If you have a problem with older or slower routers that are unable to receive RIP updates as quickly as they are sent, a better solution is to adjust the interpacket delay, as shown in Recipe 6.10.
You can view the values for all of the configured RIP timers with the show ip protocols command:
Router2#show ip protocols Routing Protocol is "rip" Sending updates every 20 seconds, next due in 8 seconds Invalid after 80 seconds, hold down 80, flushed after 120 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 1, receive any version Interface Send Recv Triggered RIP Key-chain Ethernet0 1 1 2 Serial0.1 1 1 2 Automatic network summarization is in effect Maximum path: 4 Routing for Networks: 172.25.0.0 192.168.30.0 Routing Information Sources: Gateway Distance Last Update 172.25.2.1 120 00:00:14 Distance: (default is 120) Router2#
See Also
Recipe 6.10; Recipe 6.12; Recipe 6.16
Router Configuration and File Management
Router Management
User Access and Privilege Levels
TACACS+
IP Routing
RIP
EIGRP
OSPF
BGP
Frame Relay
Handling Queuing and Congestion
Tunnels and VPNs
Dial Backup
NTP and Time
DLSw
Router Interfaces and Media
Simple Network Management Protocol
Logging
Access-Lists
DHCP
NAT
First Hop Redundancy Protocols
IP Multicast
IP Mobility
IPv6
MPLS
Security
Appendix 1. External Software Packages
Appendix 2. IP Precedence, TOS, and DSCP Classifications
Index