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
RIP
The same triangle, this time with RIP v2 (distance vector).
Regular updates via UDP 520; the metric counts hops.