Table of Contents
Overview
Routing Information Protocol, or RIP, is one of the oldest dynamic routing protocols still in use. It was designed for small, simple IP networks and is mainly used today for learning and lab purposes, or in very small production environments. RIP automatically shares routing information between routers and chooses paths based on hop count, which makes it easy to understand but limited in larger or more complex networks.
This chapter focuses on what makes RIP unique compared to other routing protocols, how it works, its versions, timers, and typical limitations. General ideas about routing, metrics, and dynamic routing are covered in the parent chapters and are not repeated here.
Basic Characteristics of RIP
RIP is a distance vector routing protocol. Each router tells its neighbors what it knows about the network and uses the information it receives to build its routing table. RIP uses simple rules and fixed limits that make it easy to grasp, but also restrict its scalability.
RIP has the following key characteristics:
It uses hop count as its metric. Each router that a packet passes through adds 1 to the hop count. RIP then chooses the route with the smallest hop count.
It has a maximum hop count of 15. Any destination that would require 16 or more hops is considered unreachable.
It uses periodic updates. Routers send their entire routing table to their neighbors at regular intervals.
It converges relatively slowly compared to modern protocols, especially in larger topologies.
Because of these properties, RIP is usually described as a simple or legacy protocol and is not suited for large or highly dynamic networks.
RIP LIMITS:
Maximum hop count: 15.
Hop count of 16 means "unreachable".
Metric: hop count only, no bandwidth or delay considered.
RIP Versions: RIPv1, RIPv2, and RIPng
RIP has evolved over time. There are two main versions for IPv4, plus a separate variant for IPv6.
| Version | Address family | Classless? | Subnet mask included? | Multicast address | Authentication |
|---|---|---|---|---|---|
| RIPv1 | IPv4 | No | No | Broadcast (255.255.255.255) | None |
| RIPv2 | IPv4 | Yes | Yes | 224.0.0.9 | Supported |
| RIPng | IPv6 | Yes | Implicit in prefix | FF02::9 | Different mechanism |
RIPv1 is classful and does not send subnet mask information in its updates. It assumes default masks based only on the class of the network (such as class A, B, or C). Because of this, RIPv1 cannot properly support Variable Length Subnet Masking (VLSM) or more advanced addressing designs.
RIPv2 is classless and includes the subnet mask with each route. This allows it to support CIDR and VLSM. RIPv2 also sends updates using multicast instead of broadcast, which reduces unnecessary processing on devices that are not routers. It can also use authentication to help ensure that routes come from trusted neighbors.
RIPng (RIP next generation) is the RIP variant for IPv6. It carries IPv6 prefixes and uses IPv6 multicast. Although conceptually similar to RIPv2, it is treated separately because it runs over IPv6, uses different packet structures, and relies on IPv6 specific mechanisms.
How RIP Exchanges Routes
RIP routers learn about networks from their directly connected interfaces and from other RIP routers through regular exchanges. The core process is straightforward.
Every RIP router maintains a routing table that includes destination networks, hop counts, and next hops.
At regular intervals, a RIP router sends an update that contains the routes from its routing table to its RIP neighbors. This is often called a routing update or advertisement.
When a router receives an update from a neighbor, it processes each route and decides whether to add or update entries in its own routing table.
All updates in classic RIP are full updates. The router sends its entire routing table to neighbors on a periodic basis, not just incremental changes.
Because the protocol is distance vector, a router only knows about networks and distances reported by its neighbors. It does not have a full map of the network. This is very different from link state protocols, which build a complete topology view.
RIP Metrics and Path Selection
RIP uses a very simple metric: hop count. Each router in the path counts as one hop. RIP does not consider link speed, delay, or congestion when selecting routes.
If multiple paths to the same destination exist, RIP prefers the path with the lowest hop count. If two or more paths have the same hop count, RIP can perform equal cost load balancing. Many implementations support up to 4 or more equal cost paths, but the exact number depends on the vendor.
For example, consider a network where Router A can reach network 192.0.2.0/24 through Router B in 2 hops, and through Router C in 3 hops. RIP will choose the path through Router B, regardless of whether the links through B are slower than the links through C.
RIP METRIC RULE:
Preferred path = path with the lowest hop count.
If hop count > 15, the route is treated as unreachable.
This simple rule is easy for beginners to remember, but in real networks it can lead to suboptimal routing, where packets take a path with fewer routers but slower links.
RIP Timers and Convergence Behavior
RIP relies on several timers to control how routes are advertised, aged, and removed. These timers are crucial for understanding how fast RIP reacts to changes and how it avoids stale information.
The commonly used default values for RIP timers are:
| Timer | Typical default | Purpose |
|---|---|---|
| Update timer | 30 seconds | Interval between periodic routing updates |
| Invalid timer | 180 seconds | Time after which a route is considered invalid if not updated |
| Hold-down timer | 180 seconds | Period during which bad routes are suppressed |
| Flush timer | 240 seconds | Time after which an invalid route is removed from the table |
The update timer controls how often the router sends its full routing table. Every 30 seconds, each RIP router multicasts or broadcasts its current routes to its neighbors.
The invalid timer starts counting for each route when it is first learned or last updated. If the router does not receive an update for that route within the invalid timer period, it marks the route as invalid. This means the route is no longer considered usable, but it is not yet deleted.
The hold-down timer is used when a route is believed to be failed, often to prevent route flapping and to slow down the acceptance of possibly incorrect alternative paths. During the hold-down period, the router will usually ignore any new information about that route that would make it look better, which helps avoid temporary loops.
The flush timer controls how long an invalid route is kept in the table before it is removed. Typically, the flush timer is longer than the invalid timer, so there is a period when the route is known to be invalid but still present in the table, often marked as unusable.
Because updates are periodic and timers are relatively long, RIP convergence is slower compared to modern protocols. When a link goes down, it can take several update cycles before all routers agree on the new topology.
Preventing Routing Loops in RIP
Distance vector protocols are particularly prone to routing loops, where routers incorrectly send traffic around in circles. RIP uses several mechanisms to reduce the chance and impact of such loops. These mechanisms are simple but essential for RIP to function in practice.
Split horizon is a rule that prevents a router from advertising a route back out of the interface on which it was learned. If Router A learned about network X from Router B on interface 1, then Router A will not advertise network X back to Router B on interface 1. This reduces the chance that Router B will think it can reach X through A, creating a loop.
Split horizon with poison reverse strengthens this behavior. Instead of simply not advertising the route, the router advertises the route back to the neighbor with a hop count of 16, which signals that the route is unreachable. This makes sure the neighbor knows that it should not use that path.
Route poisoning is a general term for advertising a failed route with a hop count of 16. When a router detects that a directly connected network is down, it sends an update telling neighbors that the route now has a distance of 16. This quickly informs the network that the destination is unreachable.
Triggered updates are special updates sent immediately when a significant change occurs, such as a link failing. Instead of waiting for the next periodic 30 second timer, the router sends an update as soon as it detects a problem and often includes poisoned information about the failed routes. This accelerates convergence and helps remove invalid paths faster.
Hold-down timers, described earlier, also help reduce loops by temporarily preventing the router from accepting possibly incorrect information that claims to restore a failed route through a different path.
These mechanisms do not eliminate all possible loop scenarios, but together they make RIP stable enough for small networks. In larger complex topologies, distance vector behavior can still lead to slow convergence and transient loops.
RIPv1 vs RIPv2 in Practice
While both RIPv1 and RIPv2 share the same metric and basic behavior, there are important practical differences that matter for configuration and design.
RIPv1 is classful. It does not send subnet masks in its updates and relies entirely on the class of the IP address (such as 10.0.0.0 as class A) to interpret network boundaries. This means:
It cannot support discontiguous networks where subnets of the same major network are separated by a different major network.
It cannot support VLSM where the same major network is divided into subnets with different mask lengths.
It uses broadcast for updates, so all hosts on the local segment receive the routing updates, even if they are not routers.
RIPv2 is classless and includes subnet mask information in each route entry. As a result:
It supports CIDR and VLSM, which are essential in modern IP addressing.
It can support discontiguous networks more effectively.
It uses multicast address 224.0.0.9 for route updates, so only devices listening for that multicast process the updates. This reduces unnecessary burden on non routing hosts.
It supports simple authentication, often using clear text or MD5 based methods. Authentication helps prevent unauthorized devices from injecting bogus routes, although the security level is basic compared to more modern approaches.
In modern environments, if RIP is used at all, RIPv2 is strongly preferred because it aligns with classless addressing and offers more control and safety.
RIPv1 LIMITATION:
No subnet masks in updates.
No support for VLSM or modern classless design.
Normally avoid RIPv1 in new networks.
RIPng for IPv6
RIPng is the RIP version for IPv6 networks. Conceptually, it behaves like RIPv2, but it is designed to carry IPv6 prefixes and to integrate with IPv6 mechanisms.
RIPng supports classless routing because IPv6 addressing is inherently classless. Prefix length information is included alongside each route.
RIPng uses IPv6 multicast address FF02::9 to send routing updates on a local link. Only routers that participate in RIPng listen on this address and process the updates.
RIPng runs on a per interface basis, similar to RIPv2. In typical configurations, you enable RIPng on specific interfaces, and the router will then send and receive RIPng updates on those links. Router identification and configuration details differ from IPv4 RIP, but the basic idea of hop count and maximum distance is similar.
RIPng is relatively rare in modern IPv6 deployments because more scalable protocols are usually preferred, but it remains useful for learning and small lab topologies.
Typical Use Cases and Limitations
RIP is usually not chosen for large or mission critical enterprise networks. Its simple metric, hop count limit, and slow convergence make it a poor fit when scale and performance are important. Still, there are niches where RIP is reasonable.
RIP can be used in very small networks where the total number of routers and routes is small and where simplicity is more important than efficiency. For example, a small branch office or lab environment where only a few routers exchange routes.
RIP is helpful in educational settings because the behavior of distance vector routing is easy to observe. Students can see periodic updates, triggered updates, route poisoning, and split horizon in action with minimal configuration.
RIP may appear in legacy networks that were built long ago and have not yet been fully modernized. In such cases, network engineers often plan migrations to more advanced protocols.
The main limitations of RIP are worth remembering:
It scales poorly because every router sends its full routing table every 30 seconds.
It cannot consider bandwidth, delay, or link reliability, which can lead to suboptimal paths.
The maximum hop count limits network diameter and makes RIP unsuitable for larger topologies.
Convergence is slow, especially when several routes change at once.
Because of these constraints, RIP is mostly a historical and educational protocol today, but understanding it provides a solid foundation for grasping distance vector concepts and appreciating why more advanced protocols were developed.