The Routing Information Protocol Version 2 (RIPv2) is a classless, distance vector routing protocol that uses hop count as its metric to determine the best path to a destination network. While OSPF and EIGRP are preferred in modern enterprises, RIPv2 remains a core CCNA topic for understanding fundamental routing loop prevention dynamics.
Classless vs. Classful
Unlike RIPv1, which is classful, RIPv2 is classless. It includes subnet masks in its routing updates, enabling support for VLSM (Variable Length Subnet Masking) and CIDR.
1. Key Characteristics of RIPv2
- Metric: Hop count. Each router the packet traverses counts as 1 hop.
- Maximum Hops: 15 hops. A network
16 hopsaway is considered unreachable (infinity metric), limiting RIPv2 to small networks. - Updates: Transmitted every
30 secondsvia multicast address224.0.0.9(instead of broadcast, which wastes CPU on non-routing nodes). - Administrative Distance:
120.
2. Routing Loop Prevention Mechanisms
Distance vector protocols are susceptible to routing loops (such as counting to infinity) because routers do not have a complete map of the topology. RIPv2 uses several built-in mechanisms to prevent loops:
Split Horizon
A router cannot advertise a route back out the same interface through which it originally learned that route. If Router A learns about network 192.168.1.0 via Serial 0/0 from Router B, Router A will not advertise 192.168.1.0 back out Serial 0/0 to Router B.
Route Poisoning & Poison Reverse
When a locally connected network goes down, a router immediately advertises the route with a hop count of 16 (unreachable/poisoned). The receiving router responds with a Poison Reverse, sending the advertisement back with a metric of 16 to confirm receipt of the poisoned route.
Holddown Timers
If a route is flagged as unreachable, the router enters a holddown period (typically 180 seconds). During this time, it ignores any updates showing a lower-quality path to that network, preventing fluctuating links from causing loops.
3. Basic RIPv2 Configuration
Configuring RIPv2 requires enabling the routing process, selecting version 2, disabling automatic summary, and declaring matching local interfaces using the classful network statement:
Router(config)# router rip Router(config-router)# version 2 Router(config-router)# no auto-summary Router(config-router)# network 192.168.12.0 Router(config-router)# network 10.0.0.0
The Network Statement Caveat
The network command under RIPv2 only accepts classful class A, B, or C network addresses. For example, if you configure network 10.1.1.0, the IOS parser will automatically convert it to the classful parent network network 10.0.0.0 and activate RIPv2 updates on all local interfaces falling within the 10.0.0.0/8 range.
| Feature | RIPv1 | RIPv2 |
|---|---|---|
| Subnet Mask Support | Classful (No masks sent) | Classless (Sends VLSM/CIDR masks) |
| Update Transmission | Broadcast (255.255.255.255) | Multicast (224.0.0.9) |
| Security | None | Cleartext & MD5 Authentication |
| Route Summarization | Automatic (Cannot disable) | Manual & Auto (Can disable using no auto-summary) |