Table Of Contents
Table Of Contents

Step 4. RIP Timers: Timeout and Garbage Collection

Introduction

In the previous step, we observed how RIP responds to link failures through immediate detection. However, in real networks, routers may not always be able to detect link failures immediately. Instead, RIP relies on a system of timers to manage route aging, invalidation, and removal.

RIP uses several timers to maintain its routing tables and ensure proper operation. In this step, we’ll focus on two critical timers:

  1. Timeout Timer (also called the route aging timer): Controls how long a route remains valid without receiving updates

  2. Garbage Collection Timer (also called the flush timer): Controls how long an invalid route remains in the routing table before being removed

These timers play a crucial role in RIP’s ability to adapt to network changes while maintaining stability and preventing routing loops.

Goals

In this step, our goals are to:

  1. Understand the role of RIP timers in managing route aging and removal

  2. Observe how the timeout timer and garbage collection timer operate

  3. Explore different scenarios of link recovery and their impact on routing tables

  4. Understand how these timers contribute to network stability during topology changes

Understanding RIP Timers

RIP routers exchange routing updates periodically (typically every 30 seconds). When a router receives an update for a route from a neighbor, it resets the timeout timer associated with that route. If updates for a particular route stop arriving, the timeout timer will eventually expire.

Here’s how the timer system works:

  1. Regular Updates: Routers send routing updates every 30 seconds (by default)

  2. Timeout Timer: When a router stops receiving updates for a route:

    • The timeout timer counts down from 180 seconds (default value)

    • If no update is received before the timer expires, the route is marked as unreachable (metric set to 16)

    • The route remains in the routing table, but is no longer used for forwarding

  3. Garbage Collection Timer: Once a route is marked as unreachable:

    • The garbage collection timer starts counting down from 120 seconds (default value)

    • The router continues to advertise the route with a metric of 16 (infinity)

    • When this timer expires, the route is completely removed from the routing table

This two-phase approach to route removal helps ensure that all routers in the network have time to learn about unreachable routes before they are completely removed from routing tables.

Network Configuration

We use the same network topology as in the previous steps. The configuration in omnetpp.ini is:

[Config Step4A]
description = "RIP timers: Link comes back online before the timeout timer expires"
extends = Step2
sim-time-limit = 1000s

# Enable split horizon in order for the scenario to work properly
*.router*.rip.ripConfig = xml("<config> \
                                  <interface hosts='router*' mode='SplitHorizon' /> \
                               </config>")
# disable ping application
*.host0.numApps = 0

# Break the router2 <--> switch1 link at t=50 s. and reconnect at t=150 s.
*.scenarioManager.script = xmldoc("scenario5.xml")

The Importance of RIP Timers

RIP timers serve several important purposes in the operation of the protocol:

  1. Detecting Failures: The timeout timer provides a mechanism to detect when a neighbor or route is no longer available, even without explicit link-down notifications

  2. Preventing Loops: The garbage collection timer helps prevent routing loops by ensuring that invalid routes are advertised as unreachable before being removed

  3. Stability: The timers add stability to the network by preventing rapid flapping of routes due to transient failures

  4. Controlled Convergence: The timer values are chosen to balance between quick adaptation to network changes and network stability

Understanding these timers is crucial for troubleshooting RIP networks and predicting how the network will respond to failures and recoveries.

Conclusion and Next Steps

In this step, we’ve explored how RIP uses timers to manage route aging, invalidation, and removal. We’ve seen how the timeout timer and garbage collection timer work together to handle network changes in a controlled manner.

While these timers help maintain network stability, they can also lead to slow convergence after failures. In the next step, we’ll explore how triggered updates can speed up the convergence process by allowing routers to send updates immediately when their routing tables change, rather than waiting for the next scheduled update.

Sources: omnetpp.ini, scenario5.xml, scenario6.xml, scenario7.xml, RipNetworkA.ned

Discussion

Use this page in the GitHub issue tracker for commenting on this tutorial.