Tuesday, 27 October 2015

RIP Timers

RIP Timers

 Even the command to set them is named timers basic… However in some documentation it is not really clear what the difference is between the invalid and holddown timer.

The default timers are 30 for updates, 180 for invalid, 180 for holddown and 240 for flush.

 I have heard and seen described in official documentation that when a route is in holddown it will not accept routes with a worse metric but routes with a better metric. This is however not true. First lets describe the different timers.


  • Updates – Updates are sent every 30 seconds by default to the address 224.0.0.9.
  • Invalid – If there has not been any updates for 180 seconds about the prefix it is consider invalid and the route will be poisoned (route advertised with a metric of 16).
  • Holddown – The timer for holddown will be activated when the route goes into an invalid state. This is set to 180 by default.
  • Flush – This timer is set to 240 seconds, when a routes is 240 seconds old it is flushed from the routing table.
So the holddown timer is used to stabilize the topology, even better routes will be suppressed which is not what some documentation says. Here is how we will tested it.


 We will created a topology with 3 routers connecting to each other and both the routers announced 1.1.1.1/32 to the middle router. We created an ACL on the middle router to filter all traffic so that the best route will become invalid. On the third router we used an offset-list to make the route worse. After the route became invalid we stopped sending the route with a worse metric and sent it with a better metric. However the route is still not installed until the holddown timer has expired. If you manipulate the timers it is easier to see. We used 5 seconds for updates, 30 for invalid, 30 for holddown and flush of 240. You will see that it takes 60s before the route gets installed.
If you use the standard timers the holddown timer will not expire before the route is flushed since the 180 seconds start counting after 180s by default and then there is only 60s left until the route is flushed. Try this out for yourself and see if you get the same results as I.

timers basic

To adjust Routing Information Protocol (RIP) network timers, use the timers basic command in router configuration mode. To restore the default timers, use the no form of this command.
timers basic update invalid holddown flush
no timers basic

Syntax Description


update
Rate (in seconds) at which updates are sent. This is the fundamental timing parameter of the routing protocol. The default is 30 seconds.
invalid
Interval of time (in seconds) after which a route is declared invalid. The interval should be at least three times the value of update time. The interval is measured from the last update received for the route. The route becomes invalid when there is an absence of updates during the invalid time that refresh the route. The route is marked inaccessible and advertised as unreachable. However, the route still forwards packets until the flush interval expires. The default is 180 seconds.
holddown
Interval (in seconds) during which routing information regarding better paths is suppressed. The interval should be at least three times the value of update time. A route enters into a holddown state when an update packet is received that indicates the route is unreachable. The route is marked inaccessible and advertised as unreachable. However, the route continues to forward packets until an update is received with a better metric or until the holddown time expires. When the holddown expires, routes advertised by other sources are accepted and the route is no longer inaccessible. The default is 180 seconds.
flush
Amount of time (in seconds) that must pass before the route is removed from the routing table. The interval is measured from the last update received for the route. The interval should be longer than the larger of the invalid and holddown values. If the interval is less than the sum of the update and holddown values, the proper holddown interval cannot elapse, which results in a new route being accepted before the holddown interval expires. The default is 240 seconds.

Defaults

update: 30 seconds
invalid: 180 seconds
holddown: 180 seconds
flush: 240 seconds

Command Modes

Router configuration

Command History


Release
Modification
10.0
This command was introduced.

Usage Guidelines

The basic timing parameters for RIP are adjustable. Because RIP is executing a distributed, asynchronous routing algorithm, these timers must be the same for all routers and access servers in the network.

Note The current and default timer values can be seen by inspecting the output of the show ip protocols EXEC command. The relationships of the various timers should be preserved as described previously.

Examples

The following example sets updates to be broadcast every 5 seconds. If a router is not heard from in 15 seconds, the route is declared unusable. Further information is suppressed for an additional 15 seconds. At the end of the suppression period, the route is flushed from the routing table.
router rip
 timers basic 5  15  15  30