skip to content

Three RIP routers R1, R2, R3 sit in a line; when R1 gains 192.0.2.0/24, how does each table change, and how long can R3 wait?

level: middleimportance: should knowfreq 22%

answer

  1. one neighbour's update at a time
  2. plus one per hop
  3. next hop is the advertiser
  4. one 30-second interval per hop

basics

~20 s

R1 installs 192.0.2.0/24 at metric 1, R2 then learns metric 2 via R1, and R3 metric 3 via R2; without triggered updates each hop waits up to one 30-second update, so R3 can wait about a minute.

solid answer

~50 s

R1 enters the new network at its cost, 1. RIP routers only hear their neighbours, so the route moves one hop per update: R1's next whole-table Response (UDP `520`) gives R2 metric `2` via R1, and R2's next Response gives R3 metric `3` via R2. Each install starts the route's 180-second timeout, which every later periodic update resets. RFC 2453 requires immediate triggered updates only for deleted routes; for a new route they are optional, so in the worst case R1 has just sent its update when the network comes up and R2 has just sent its own when it learns the route. That is up to one interval per hop: about 60 seconds for R3, nearer 70 with the RFC's up-to-5-second random offset. Spread over a path of fifteen hops, the same arithmetic gives minutes.

go deeper

for a junior

Recall that a RIP route travels one neighbour at a time, gaining one hop each time, and that updates leave every 30 seconds.

for a middle

Fill in each router's table after each update: metric, next hop as the advertiser, timeout started. Then compute the worst case of one interval per hop.

for a senior

Show why the per-hop delay turns into minutes across a wide network, and what triggered updates and the random timer offset change about it.

for a principal

Weigh periodic propagation against event-driven protocols when choosing a routing design, and say which networks can live with a minute of blindness to a new prefix.

## The setup Three routers run RIP in a line, every network with the usual cost of 1: - R1 and R2 share the link 10.0.12.0/30; R2 and R3 share 10.0.23.0/30. - The tables have already converged on those two links. - At time zero an interface on R1 comes up with 192.0.2.0/24. RIP routers exchange routes only with **direct neighbours**, every **30 seconds**, by sending their **whole routing table** in **Response** messages on **UDP port 520**. Nothing in RIP lets R3 hear R1 directly; everything R3 knows about R1's networks arrives through R2. ## Round by round Each cell shows the entry for 192.0.2.0/24 as metric and next hop. | Moment | R1 | R2 | R3 | |---|---|---|---| | R1's interface comes up | 1, connected | none | none | | After R1's next periodic update | 1, connected | 2, via R1 | none | | After R2's next periodic update | 1, connected | 2, via R1 | 3, via R2 | | Every update after that | unchanged | timeout reset | timeout reset | What happens inside R2 when R1's update arrives: 1. The entry says 192.0.2.0/24, metric 1. 2. R2 adds the cost of the R1-R2 link: 1 + 1 = 2. 3. There is no existing route, so R2 installs it with **R1 as next hop**. 4. R2 starts the route's **timeout** (180 seconds in RFC 2453) and sets its **route change flag**. R3 does exactly the same with R2's update: 2 + 1 = 3, next hop **R2**. The next hop always names the neighbour that advertised the route, never the router that owns the network. Along the way, R2's advertisement back toward R1 is shaped by split horizon, which belongs to RIP's loop-prevention rules. ## How long R3 can wait RFC 2453 requires triggered updates (sent almost at once) for **deleted** routes but only allows them for new or changed routes. Without them, the route moves only on periodic updates: 1. R1's interface comes up just after R1 sent an update, so R2 waits up to one interval, about 30 seconds. 2. R2 installs the route just after sending its own update, so R3 waits up to another interval. 3. Worst case for R3: about **60 seconds**. The 30-second timer is not exact. RFC 2453 requires either a clock unaffected by system load or a random offset of up to 5 seconds either way each time the timer is set, so routers on one segment do not fall into step. With the offset each interval can run to 35 seconds, and the worst case to about 70 seconds. The best case is a few seconds, when each update happens to leave just after the route arrives. ## Why that adds up to minutes The delay is **per hop**, not per network: - A route crossing 15 routers can wait up to 15 intervals: 15 x 30 = 450 seconds, seven and a half minutes. - Nothing in RIP shortcuts the chain, because every router recomputes only from what its neighbours just said. - Triggered updates for new routes, where an implementation sends them, cut each hop to seconds; RFC 2453 then limits them with a random 1 to 5 second timer so a burst of changes does not flood the links. ## What R3 ends up with After convergence R3 holds three entries learned or owned: | Destination | R3's metric | Next hop | |---|---|---| | 10.0.23.0/30 | 1 | connected | | 10.0.12.0/30 | 2 | R2 | | 192.0.2.0/24 | 3 | R2 | Every 30 seconds R2's update refreshes the two learned entries and resets their timeouts. That refresh is also how R3 would notice a failure: if the updates stop, the 180-second timeout eventually expires.

  • How does the picture change if every RIP router sends triggered updates for new routes?
    R1 sends a partial update as soon as the network appears, R2 installs metric 2 and sends its own triggered update, and R3 has metric 3 within seconds. RFC 2453 allows triggered updates for new routes but requires them only for deleted ones, and rate-limits them with a random 1 to 5 second timer after each triggered update.
  • Why does RFC 2453 randomise the RIP 30-second update timer?
    Routers on one network tend to drift into sending at the same moment when the timer is affected by processing load, which causes collisions on broadcast networks. RFC 2453 requires either a clock unaffected by load or a random offset of up to 5 seconds either way each time the timer is set.

saying these in an interview costs you the question

  • R3 learns R1's new network directly from R1's update.
  • R3's next hop for the network is R1, the router that owns it.
  • All three RIP routers learn a new network in the same 30-second round.
  • RIP routers send an update only when something has changed.
  • R3 installs the new route at metric 1 because it has just appeared.