L3 · igp · reviewed

RIPv2

Routing Information Protocol Version 2

The clearest distance-vector lesson: hop count to 15, infinity at 16, split horizon, and poison reverse.

Presenter modeEmbed this figure

Preventing instabilityRFC 2453 · INTERNET STANDARD · November 1998Split horizonRFC 2453 · INTERNET STANDARD · November 1998Triggered updatesRFC 2453 · INTERNET STANDARD · November 1998Message FormatRFC 2453 · INTERNET STANDARD · November 1998Subnet maskRFC 2453 · INTERNET STANDARD · November 1998MulticastingRFC 2453 · INTERNET STANDARD · November 1998

Why it exists

Before link-state IGPs dominated, networks exchanged distance vectors — “I can reach this prefix at this cost.” RIP is the simplest surviving form of that idea, and it still teaches the failure modes every distance-vector protocol must contain.

RIPv2 (RFC 2453) keeps hop count as the metric, raises the ceiling to a usable fifteen hops, and adds subnet masks, next hop, tags, authentication, and multicast advertisement. The infinity problem does not go away; the mitigations become visible. JustificationRFC 2453 · INTERNET STANDARD · November 1998

A Response carries mask and metric

Two routers exchange RIPv2 Responses on UDP/520. Each route entry names a prefix, a subnet mask, an optional next hop, and a hop-count metric — not the classful advertisement RIPv1 sent.

R1 originates 192.0.2.0/24. A RIPv2 Response goes to UDP port 520. On multi-access media the destination is the multicast 224.0.0.9, not a broadcast. R1: Advertising 192.0.2.0/24 metric 1. R2. 192.0.2.0/24.

R1Advertising: 192.0.2.0/24 metric 1R2192.0.2.0/24
  • Link
  • Blocking
  • Packet in flight
  • Discarded
  • Emphasis
Select a device to read its state. Arrow keys walk the topology.
Text equivalent of this diagram
Devices and links at this step
ElementKindState
R1routerAdvertising: 192.0.2.0/24 metric 1
R2router
192.0.2.0/24host
R1R2linkup
R1192.0.2.0/24linkup
1 / 3

R1 originates 192.0.2.0/24. A RIPv2 Response goes to UDP port 520. On multi-access media the destination is the multicast 224.0.0.9, not a broadcast.

What changed

  • Response · v2: R1 → R2
  • R1: Advertising → 192.0.2.0/24 metric 1

How it works

A Response message on UDP/520 carries one or more twenty-octet route entries. Version 2 entries include subnet mask and next hop. Metric 1–15 is usable; 16 is infinity. Message FormatRFC 2453 · INTERNET STANDARD · November 1998

Split horizon does not advertise a route back out the interface it was learned on. Poison reverse advertises it as 16 on that interface. Triggered updates announce changes without waiting for the periodic timer. Split horizonRFC 2453 · INTERNET STANDARD · November 1998

On multi-access networks RIPv2 multicasts Responses to 224.0.0.9. That is an operational difference from RIPv1’s broadcast, and a reason version mismatches look like “one side never sees updates.” MulticastingRFC 2453 · INTERNET STANDARD · November 1998

On the wire

Constructed examples, encoded from the field table below them — not captured traffic.

RIPv2 Response advertising 192.0.2.0 mask 255.255.255.0, next hop 0.0.0.0 (self), metric 1.

UDP
Destination port 520. RIPv2 Responses are multicast to 224.0.0.9 when advertising on multi-access media. RFC 2453
RIP header
Command, version, and two reserved octets that must be zero. RFC 2453
RIPv2 RTE
Twenty octets: AFI, route tag, IPv4 prefix, subnet mask, next hop, and metric 1–16. RFC 2453

Configure it

RIPv2 only with split horizon on the WAN.

Cisco IOS-XE 17.12 · ISR 4451draft

  1. router rip
     version 2
     no auto-summary
     network 192.0.2.0

    Version 2 multicast updates; disable classful auto-summary.

  2. router rip
     passive-interface default
     no passive-interface GigabitEthernet0/0/0

    Send updates only on the WAN facing interface.

Verify

show ip rip database
Prefixes and metrics present.
show ip protocols
RIP v2, networks, passive interfaces.

Caveats

  • Marked draft: syntax has not been checked against a device.

When it breaks

Symptom first, because that is what you have when it happens.

  1. A prefix’s metric climbs and then sticks at 16 after a link failure.

    Narrow it down

    1. Check whether split horizon or poison reverse is active on the interface that faces the neighbour.
    2. Compare the two routers’ RIP databases for the prefix during the climb.
    3. Look for a missing triggered update after the failure.

    Cause

    Without split horizon, neighbours re-advertise a lost prefix to each other and increment the metric until infinity.

    Fix

    Ensure split horizon / poison reverse on the shared interface; after the event, confirm the prefix is gone rather than held at 16 as a stale black hole.

    Preventing instabilityRFC 2453 · INTERNET STANDARD · November 1998
  2. One router shows RIP neighbours or routes; the other never installs the prefix.

    Narrow it down

    1. Confirm both ends send and accept version 2.
    2. Check whether one side still expects broadcast RIPv1 while the other multicasts to 224.0.0.9.
    3. Verify UDP/520 is not filtered.

    Cause

    RIPv1 and RIPv2 are not interchangeable on the wire. Mask and multicast behaviour differ.

    Fix

    Force version 2 on both ends and confirm multicast reachability to 224.0.0.9.

    MulticastingRFC 2453 · INTERNET STANDARD · November 1998
  3. A subnet is advertised as a classful network and traffic blackholes for more-specific destinations.

    Narrow it down

    1. Inspect the RTE mask in the Response — or whether auto-summary collapsed it.
    2. Compare the installed prefix length on each hop.

    Cause

    RIPv1 behaviour or classful auto-summary discarded the subnet mask RIPv2 was meant to carry.

    Fix

    Run version 2 end to end and disable auto-summary where the platform still offers it.

    Subnet maskRFC 2453 · INTERNET STANDARD · November 1998
  4. After a failure, the alternate path appears only after a long delay.

    Narrow it down

    1. Check whether triggered updates are suppressed or filtered.
    2. Compare invalid and flush timers against the expected failover.

    Cause

    Distance-vector recovery waits on timers when triggered updates do not propagate the loss.

    Fix

    Confirm triggered updates; accept that RIP will not match link-state failover times.

    Triggered updatesRFC 2453 · INTERNET STANDARD · November 1998
  5. Updates ignored on a passive interface.

    Narrow it down

    1. List passive interfaces
    2. Confirm the related configuration and counters.

    Cause

    Interface configured passive so it will not send updates.

    Fix

    Remove passive where adjacency updates are required.

Design notes

A diameter greater than fifteen hops cannot be expressed. Metric 16 is unreachable, not “a long way.” Networks that outgrow fifteen hops need a different IGP, not a creative metric scheme. Limitations of the ProtocolRFC 2453 · INTERNET STANDARD · November 1998

RIPv2 is still a teaching and edge protocol. Redistributing it into OSPF or EIGRP without filtering is how a lab accident becomes a production routing table.

Misconceptions

Metric 16 means a distant but usable route.
Sixteen is infinity. The prefix is unreachable. Usable metrics stop at 15. Preventing instabilityRFC 2453 · INTERNET STANDARD · November 1998
Split horizon is an optional tuning knob with no correctness role.
It is the primary defence against two-router count-to-infinity. Turning it off to “see more updates” recreates the textbook loop. Split horizonRFC 2453 · INTERNET STANDARD · November 1998
RIPv2 is just RIPv1 with a new version number.
Version 2 adds subnet masks, next hop, tags, authentication, and multicast. Running “RIP” without pinning version 2 often leaves you in classful behaviour. Protocol ExtensionsRFC 2453 · INTERNET STANDARD · November 1998

More walkthroughs

Counting to sixteenfailure

The LAN behind R1 fails. Without split horizon, R1 and R2 bounce the prefix at each other, raising the metric by one each exchange until it hits 16 — RIP’s infinity.

Both routers had a path to 192.0.2.0/24. The LAN fails. R1 should withdraw it. If it still accepts an advertisement of that prefix from R2 — the neighbour that learned it from R1 — the loop begins. R1: LAN down. R2. LAN · down.

R1Prefix should dieLAN: downR2LAN · down
  • Link
  • Blocking
  • Packet in flight
  • Discarded
  • Emphasis
Select a device to read its state. Arrow keys walk the topology.
Text equivalent of this diagram
Devices and links at this step
ElementKindState
R1routerLAN: down
R2router
LAN · downhost
R1R2linkup
R1LAN · downlinkdown
1 / 3

Both routers had a path to 192.0.2.0/24. The LAN fails. R1 should withdraw it. If it still accepts an advertisement of that prefix from R2 — the neighbour that learned it from R1 — the loop begins.

What changed

  • Link R1 ↔ LAN · down is now down
  • R1: LAN → down
  • Prefix should die

Split horizon and poison reversedesign-choice

Split horizon refuses to advertise a route back out the interface it was learned on. Poison reverse advertises it as metric 16 on that interface instead — louder, and sometimes clearer to the neighbour.

R2 learns 192.0.2.0/24 from R1 on the shared link. That interface is now the wrong direction to advertise the prefix back toward R1. R1. R2: 192.0.2.0/24 via R1. 192.0.2.0/24.

R1R2192.0.2.0/24: via R1192.0.2.0/24
  • Link
  • Blocking
  • Packet in flight
  • Discarded
  • Emphasis
Select a device to read its state. Arrow keys walk the topology.
Text equivalent of this diagram
Devices and links at this step
ElementKindState
R1router
R2router192.0.2.0/24: via R1
192.0.2.0/24host
R1R2linkup
R1192.0.2.0/24linkup
1 / 3

R2 learns 192.0.2.0/24 from R1 on the shared link. That interface is now the wrong direction to advertise the prefix back toward R1.

What changed

  • Learn: R1 → R2
  • R2: 192.0.2.0/24 → via R1

Terms

Split horizon
A distance-vector rule: do not advertise a route out the interface it was learned on. Poison reverse advertises it as unreachable instead.

Check yourself

  • In RFC 2453, what does metric 16 mean?
  • What does simple split horizon do?
  • How does poison reverse differ from simple split horizon?
  • Which RIPv2 RTE field lets classless prefixes be advertised correctly?
  • On multi-access media, where do RIPv2 Responses go?
  • Without split horizon, what happens after a prefix’s true path fails?
  • What are triggered updates for?
  • What is the largest usable hop-count metric in RIP?