Wiki DE Start in the browser

Wiki › Protocols

RIP and RIPng

Distance vector routing: routers tell their neighbours which networks they reach in how many hops – simple, but with limits.

Layer
7 (über UDP 520 bzw. 521)
Standard
RFC 2453, RFC 2080
See an example
2 demos

The idea

With the Routing Information Protocol every router regularly sends its whole table to its neighbours: “I reach network A in 1 hop, network B in 2.” A neighbour adds one and takes over the route if it is better than its own. The metric is hops (number of routers); 16 means unreachable. RIP therefore cannot handle more than 15 routers in a row.

Split horizon

A router does not report a route back to the neighbour it learned it from. Otherwise, after a failure, two routers could fool each other with a route that no longer exists, slowly counting the hops up to 16.

Count to infinity

If a network disappears, two routers may report the old route back to each other and increase the metric by 1 with every exchange: 2, 3, 4 … Only at 16 is the network considered unreachable. This is called count to infinity (RFC 2453, Section 3.4.2). That is why 16 was chosen so small, and why there are remedies:

  • Split horizon (see above): do not report a route back to where it came from.
  • Poison reverse: report it back after all, but with metric 16 (“not via me”).
  • Triggered updates: send changes immediately, not only after 30 seconds (RFC 2453, Section 3.4.4).

Setting up

Router(config)# router rip
Router(config-router)# version 2
Router(config-router)# network 10.0.0.0/30
Router(config-router)# network 192.168.1.0/24
Router# show ip route

RIPng is the same for IPv6: updates to ff02::9 over UDP 521, the source is the link-local address.

How to do it in leyoNET

The same text as in the app’s help (F1 key).

RIP

RIP v2 is a distance-vector protocol: routers regularly send their whole table to neighbours (standard every 30 s, shortened to 5 s in the simulator) (UDP 520, multicast 224.0.0.9). The metric is the hop count; 16 means unreachable. Simple but slow to converge.

RIPng (IPv6)

RIPng (RFC 2080) is RIP for IPv6: routers send their table regularly (every 5 s in the simulator) by UDP 521 to ff02::9, with their link-local address as source and hop limit 255. The metric is the number of routers; 16 means unreachable. Split horizon as with RIP v2.

CLI: router ripng, network eth0 (interface instead of network), redistribute connected, default-information originate, show ipv6 ripng, show ipv6 route (code R).

See an example

  • Demo “RIP” in leyoNETDemo “RIP” in leyoNET
    RIP

    The same triangle, this time with RIP v2 (distance vector).

    Regular updates via UDP 520; the metric counts hops.

    Watch live Project file

  • Demo “RIPng for IPv6” in leyoNETDemo “RIPng for IPv6” in leyoNET
    RIPng for IPv6

    Three routers learn their IPv6 prefixes by RIPng: distance vector with hop count, like RIP v2.

    Updates by UDP 521 to ff02::9. The IPv6 routing table fills with R routes, tracert finds the way to PC 2.

    Watch live Project file

“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, ready to present.

Practise

  • ★★★☆☆ RIP in a chain · 2 goals · Worksheet (German)

In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.

What leyoNET simplifies

ProtocolLayerSimplification in the simulation
RIP v27Update every 5 s instead of 30 s, timeout 30 s instead of 180 s; split horizon
RIPng7Like RIP v2 over IPv6: UDP 521 to ff02::9, link-local source, hop limit 255; only updates from link-local sources; no next-hop entries

Standards

Read on

Found a mistake or have an idea? Source of this page on GitHub.