Shubho.dev logo
Network LAN Cable

Understanding RIP Timers

I get confused sometimes when I have to debug some error quickly in a RIP network. The main confusion arises between the Invalid and Update timer. So here are my notes on RIP timers.

We will use the following topology for the explanation.

Sample Topology for RIP Timers
Sample Topology for RIP Timers

We will be using four routers connected as above. The sample topology mentions the interfaces connected and their IP addresses. We will be using the sample configurations from a 7200 Router for configuring RIP.

Below are the RIP configurations for R1.

bash
router rip
version 2
timers basic 30 40 90 180
network 172.1.0.0
no auto-summary

The timers command is used to configure the timers. The values are:

  1. Update timer - 30 seconds.
  2. Invalid timer - 40 seconds.
  3. Hold Down timer - 90 seconds.
  4. Flush timer - 180 seconds.
    Also, the command “no auto-summary” is not compulsory. I configured it to check the actual prefixes that were updated instead of the summarized routes.

Now let us have a look at the current routing table on R2.

bash
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

172.1.0.0/24 is subnetted, 2 subnets
R 172.1.4.0 [120/1] via 172.1.2.111, 00:00:08, FastEthernet0/0
C 172.1.2.0 is directly connected, FastEthernet0/0
172.2.0.0/24 is subnetted, 1 subnets
C 172.2.3.0 is directly connected, FastEthernet1/0
172.3.0.0/24 is subnetted, 1 subnets
R 172.3.4.0 [120/1] via 172.2.3.113, 00:00:17, FastEthernet1/0
10.0.0.0/24 is subnetted, 1 subnets
S 10.10.10.0 [1/0] via 172.2.3.0
11.0.0.0/24 is subnetted, 1 subnets
R 11.11.11.0 [120/1] via 172.2.3.113, 00:00:2, FastEthernet1/0
R2#

11.11.11.0 subnet is a redistributed route from R3. The Update Timer at this time is 2 seconds as can be seen from our configuration. Every 30 seconds, a fresh update for this route will come from R2.

We have disabled the interface fa0/0 on R4 for the time being so that we do not get the 11.11.11.0 update from R4. Now we immediately disable updates from R3 using passive-interface default command. We keep observing R2. After the Invalid Timer expires in 40 seconds, R2 advertises 11.11.11.0 subnet to its neighbor with metric 16 (inaccessible). During this time R2’s routing table shows 11.11.11.0 as possibly down.

bash
*Mar 20 01:32:33.395: RIP: sending v2 update to 224.0.0.9 via FastEthernet1/0 (172.2.3.112)
*Mar 20 01:32:33.395: RIP: build update entries
*Mar 20 01:32:33.395: 11.11.11.0/24 via 0.0.0.0, metric 16, tag 0
*Mar 20 01:32:33.395: 172.1.2.0/24 via 0.0.0.0, metric 1, tag 0
R2#
*Mar 20 01:32:33.399: 172.1.4.0/24 via 0.0.0.0, metric 2, tag 0
*Mar 20 01:32:33.399: 172.3.4.0/24 via 0.0.0.0, metric 16, tag 0
R2#
*Mar 20 01:32:35.387: RIP: sending v2 flash update to 224.0.0.9 via FastEthernet0/0 (172.1.2.112)
*Mar 20 01:32:35.387: RIP: build flash update entries
*Mar 20 01:32:35.387: 11.11.11.0/24 via 0.0.0.0, metric 16, tag 0
*Mar 20 01:32:35.387: 172.3.4.0/24 via 0.0.0.0, metric 16, tag 0
*Mar 20 01:32:35.391: RIP: sending v2 flash update to 224.0.0.9 via FastEthernet1/0 (172.2.3.112)
*Mar 20 01:32:35.391: RIP: build flash update entries
*Mar 20 01:32:35.391: 11.11.11.0/24 via 0.0.0.0, metric 16, tag 0
*Mar 20 01:32:35.391: 172.3.4.0/24 via 0.0.0.0, metric 16, tag 0
*Mar 20 01:32:35.435: RIP: received v2 update from 172.1.2.111 on FastEthernet0/0
R2#
*Mar 20 01:32:35.435: 11.11.11.0/24 via 0.0.0.0 in 16 hops (inaccessible)
*Mar 20 01:32:35.435: 172.3.4.0/24 via 0.0.0.0 in 16 hops (inaccessible)
R2#
R2#
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

172.1.0.0/24 is subnetted, 2 subnets
R 172.1.4.0 [120/1] via 172.1.2.111, 00:00:22, FastEthernet0/0
C 172.1.2.0 is directly connected, FastEthernet0/0
172.2.0.0/24 is subnetted, 1 subnets
C 172.2.3.0 is directly connected, FastEthernet1/0
172.3.0.0/24 is subnetted, 1 subnets
R 172.3.4.0/24 is possibly down,
routing via 172.2.3.113, FastEthernet1/0
10.0.0.0/24 is subnetted, 1 subnets
S 10.10.10.0 [1/0] via 172.2.3.0
11.0.0.0/24 is subnetted, 1 subnets
R 11.11.11.0/24 is possibly down,
routing via 172.2.3.113, FastEthernet1/0
R2#

Once the Invalid timer expires, R2 enters Hold Down Timer which will expire in 90 seconds. During this time R2 will accept other routes for 11.11.11.0 only if its metric is 1 or less. We now add a static route on R4 with subnet 11.11.11.0 and redistribute it into RIP. This update will reach R2 by traversing through R1. R2’s metric will be 3 and since it is greater than 1 and R2 is still running the Hold Down timer, this route is not accepted. We will even see the 11.11.11.0 subnet as possibly down.

bash
*Mar 20 01:41:53.447: RIP: received v2 update from 172.1.2.111 on FastEthernet0/0
*Mar 20 01:41:53.447: 11.11.11.0/24 via 0.0.0.0 in 2 hops

We immediately disable the 11.11.11.0 subnet at R4. Now when the Hold Down timer expires, R2 waits till the Flush timer expires before it purges the subnet from its routing table.

Featured Image courtesy Jordan Harrison at Unsplash