RIP and hop count
How RIP learns a route
Routing Information Protocol (RIP) is a distance-vector interior routing protocol. Instead of learning the complete network graph, a router learns destination networks and distances from its neighbors. RIPv2 carries subnet masks, so routes can describe CIDR prefixes. Start with a fictional router R that receives metric 3 for 192.0.2.0/24 from a neighbor. With an incoming network cost of 1, R calculates metric 4.
Calculate and compare metrics
For ordinary unit-cost links, each step increases the learned metric by one. Use the smaller of 16 and the advertised metric plus local network cost. The destination is reachable at metrics 1–15; 16 represents infinity (unreachable). Compare two advertisements for the same prefix at R:
Neighbor A: advertised 2 + cost 1 = 3Neighbor B: advertised 5 + cost 1 = 6Preferred RIP path: ANeighbor C: advertised 15 + cost 1 = 16 (unreachable)Why a failure can take time to settle
Suppose the destination behind A disappears. Neighbors can briefly retain outdated information and advertise it back, causing increasing metrics until the route is considered unreachable. Split horizon limits advertisements back toward the source of a learned route; poisoned reverse instead advertises an unreachable metric in that direction. Triggered updates help propagate changes without waiting for the ordinary periodic exchange. These techniques reduce instability but do not guarantee that all transient loops disappear.
When a small metric is not a good design
A two-hop slow path can win over a three-hop high-capacity path because RIP does not directly optimize link speed. Its limited metric range and periodic exchanges make it a poor default for large networks. Recognize RIPv1 as historical and distinguish RIPv2 for IPv4 from RIPng for IPv6. For a new network, compare supported OSPF or IS-IS implementations and operational requirements rather than assuming RIP is prohibited or obsolete in every installation.
Try it offline
With advertisements of 7 and 9 and a cost of 1 for both, predict the preferred neighbor. Then calculate what happens if a neighbor advertises 16. Explain why a faster link does not automatically receive a better RIP metric. See RFC 2453, sections 3.2 and 3.4, for the protocol model.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
RIP and hop count — knowledge check
Apply protocol concepts to fictional routing scenarios.
A neighbor advertises metric 5 and the local incoming cost is 1. What is the new RIP metric?
A neighbor advertises 15 and the local cost is 1. What is the result?
Two eligible RIP routes to the same prefix have metrics 3 and 5. Which is preferred?
What does poisoned reverse advertise toward the neighbor from which a route was learned?
Which feature allows RIPv2 to represent CIDR prefixes?