How RIPv2 works
RIPv2 routers advertise their known routes to neighbours using UDP port 520. The metric is hop count: a directly reachable network has a low hop count, and each advertising router increments the metric. A metric of 16 represents infinity, so valid routes cannot exceed 15 hops.
| Feature | RIPv2 behaviour |
|---|---|
| Algorithm | Distance vector based on Bellman-Ford principles. |
| Metric | Hop count only; bandwidth and delay are not considered. |
| Transport | UDP port 520 for IPv4 RIP. |
| Updates | Periodic full routing advertisements, plus triggered updates after changes. |
| Addressing | Classless; carries subnet masks and supports VLSM/CIDR. |
| Multicast | Normally sends updates to 224.0.0.9. |
RIPv2 message fields and route information
RIP uses request and response messages. A response contains one or more route entries with address-family identifier, route tag, IPv4 prefix, subnet mask, next hop and metric. The route tag can preserve limited information about an external routing source during redistribution.
RIPv2 improved on RIPv1 by carrying subnet masks, supporting authentication and using multicast rather than broadcast by default. Authentication mechanisms and their security strength depend on implementation; old plain-text methods should not be treated as strong protection.
Timers and convergence
| Timer | Common Cisco default | Purpose |
|---|---|---|
| Update | 30 seconds | Interval between regular routing advertisements. |
| Invalid | 180 seconds | Marks a route invalid when updates stop. |
| Holddown | 180 seconds | Helps suppress unstable or contradictory updates. |
| Flush | 240 seconds | Removes an invalid route from the routing table. |
These values are common implementation defaults rather than universal requirements. Slow timer-driven convergence is a major reason RIP is unsuitable for large or highly available networks.
Loop-prevention mechanisms
- Split horizon: do not advertise a route back through the interface from which it was learned.
- Route poisoning: advertise a failed route with metric 16.
- Poison reverse: explicitly advertise a route back to its source with an infinite metric.
- Triggered update: send changed information without waiting for the next regular interval.
- Holddown: temporarily reject certain unstable information after failure.
Configuration and verification
router rip version 2 no auto-summary network 10.0.0.0 passive-interface default no passive-interface GigabitEthernet0/0
show ip protocols show ip route rip show ip rip database show interfaces debug ip rip
Use debug commands carefully on production equipment. Prefer counters, packet capture and filtered logging when debug volume could affect the device.
Troubleshooting checklist
- Confirm interfaces and IP subnets are operational.
- Verify RIPv2 is enabled for the correct major networks.
- Check passive-interface settings and UDP 520 filtering.
- Confirm route masks and disable unwanted classful auto-summary where applicable.
- Inspect metric 16 routes, timer expiry and route filtering.
- Check whether a better route from another source wins due to administrative distance.
- Validate redistribution and default-route origination.
Interview focus
Use these points to practise concise, operations-focused answers. Explain the concept first, then give a verification or troubleshooting example.
- What metric does RIP use? Hop count.
- What does hop count 16 mean? The destination is unreachable.
- Why is RIPv2 called classless? It includes subnet masks in route advertisements and supports VLSM/CIDR.
- Which UDP port does IPv4 RIP use? UDP 520.
- What is split horizon? A router does not advertise a learned route back out the interface on which it was learned.
