What RIP is
RIP (Routing Information Protocol) is a distance-vector protocol: each router only knows what its neighbors tell it, in the form "network X at N hops". It picks the route with the fewest hops and adds one before advertising it. It uses UDP 520 and its administrative distance on Cisco is 120.
Version 1 (RFC 1058, 1988) is classful: it sends no masks. Version 2 (RFC 2453) added the mask, the next hop, authentication and the 224.0.0.9 multicast. For IPv6 there's RIPng.
RIP messages
| Message | When | In this lab |
|---|---|---|
| Request (1) | At startup, so as not to wait for the next update | R3 asks for the whole table (AFI 0, metric 16) |
| Response to a request | Right away, only to whoever asked | R1 answers 10.0.13.2 |
| Periodic Response | Every 30 seconds, the whole table | R1 out Gi0/0/0 and Gi0/0/3 |
| Triggered Response | When a route changes | New Toronto LAN, link failure and recovery |
How it works: from the first request to the mask limit
Seven steps: R3 asks for the table, R1 answers, the Toronto LAN spreads, the periodic updates, the link failure, the recovery and the LAN RIPv1 can't advertise.
R3 joins: Request
R3 is configured with router rip and the networks 10.0.0.0 and 192.168.40.0, with the LAN as passive. So it doesn't have to wait 30 seconds, R3 broadcasts a Request: a single entry with family 0 and metric 16, which means "send me your whole table". It goes to 255.255.255.255 on UDP 520, with TTL 2: it isn't meant to cross routers.
R1 answers with its table
R1 answers R3 directly (unicast) with a Response. It advertises the link to Montreal (10.0.12.0) and its LAN (192.168.10.0) at 1 hop, and the Montreal LAN (192.168.30.0) at 2: R1's hop plus R2's. It doesn't advertise the subnet of the link to R3 itself, or anything it learned through that link: that's split horizon. R3 installs the three routes with distance 120.
R3 advertises its LAN and R1 passes it on
R3 advertises its LAN, 192.168.40.0, at 1 hop. R1 installs it and, because its table changed, immediately sends a triggered update (flash update) to R2 with the same network at 2 hops. Hop by hop, everyone learns every network. Notice that R1 doesn't send R3 back the route it just learned from it.
Periodic updates
Every 30 seconds R1 sends its whole table out each interface, except what it learned through that same interface. To R2 it sends 10.0.13.0, 192.168.10.0 and 192.168.40.0; to R3, 10.0.12.0, 192.168.10.0 and 192.168.30.0. These updates also show the neighbor is still alive: if a route isn't heard for 180 seconds (invalid), it's marked as possibly down.
The link to Toronto goes down
R1's Gi0/0/3 interface goes down. R1 loses the link's network (10.0.13.0) and the Toronto LAN, which came through it. It doesn't wait for the next periodic update: it sends R2 a triggered update with both networks at metric 16, which in RIP means infinity. That's route poisoning. R2 removes them from its table right away instead of waiting 180 seconds.
The link comes back
The interface comes back up. R3 advertises 192.168.40.0 again at 1 hop; R1 reinstalls it and tells R2 with a triggered update: the 10.0.13.0 link at 1 hop and the Toronto LAN at 2. In a few seconds the network converges again: every router has the same view.
RIPv1's limit: no mask
Toronto adds a second LAN, 10.40.0.0/24, inside the 10.0.0.0 network that router rip already covers. But RIPv1 sends no masks: when the receiver is in the same major network, it uses its own interface's mask (/30). That's why IOS only advertises subnets with the same mask as the outgoing interface, and the /24 is left out: R3's update carries only 192.168.40.0. R1 never learns 10.40.0.0. The fix is RIPv2, which carries the mask in every route.
RIP timers
| Timer | Default | What it does |
|---|---|---|
| Update | 30 s | How often the whole table is sent. |
| Invalid | 180 s | If a route isn't heard in that time, it's marked as possibly down. |
| Hold down | 180 s | While it runs, worse routes to that network aren't accepted, so old information isn't believed. |
| Flush | 240 s | Time after which the route is deleted from the table. |
How RIP avoids loops
- Split horizon: a route isn't advertised out the interface it was learned on. In this lab, R1 never sends R3 back the Toronto LAN.
- Route poisoning: a network that goes down is advertised with metric 16 (infinity) instead of just going silent.
- Poison reverse: a variant that advertises back, with metric 16, what was learned on that interface.
- Triggered updates: changes are sent right away, without waiting 30 seconds.
- Maximum of 15 hops: 16 is infinity, so a count to infinity ends quickly, at the cost of limiting the network's size.
RIP on Cisco IOS XE
| Command | What it does |
|---|---|
router rip | Starts the RIP process. |
network 10.0.0.0 | Turns on RIP on the interfaces in that classful network and advertises it. |
passive-interface GigabitEthernet0/0/1 | Sends no updates on the LAN, where there are no routers; the network is still advertised. |
version 2 | Switches to RIPv2 (with mask and multicast). |
show ip route rip | The routes learned through RIP: R … [120/hops] via … |
show ip protocols | Timers, version, networks, passive interfaces and neighbors. |
debug ip rip | Every update sent and received, with its entries. |
RIPv1's problem: classes
With no mask in its updates, RIPv1 has to guess it. If the network belongs to a different major network, it uses its class's mask (A, B or C) and also summarizes at the boundary (automatic summarization). If it's in its own major network, it uses its own interface's mask. That's why all the subnets of a major network must have the same mask (no VLSM) and the subnets of a major network can't be separated by another network (no discontiguous networks).
What happens when it fails
- A subnet is missing: it's almost always VLSM. With RIPv1, IOS doesn't advertise a subnet with a mask other than the outgoing interface's. Fix: version 2.
- Discontiguous networks: two routers summarize the same classful network and traffic is split wrongly. Fix: version 2 and no auto-summary.
- No routes are learned: check that the network statements cover the interfaces, that they aren't passive and that the versions match (show ip protocols).
- A network more than 15 hops away is unreachable for RIP.
- Slow convergence: if a neighbor disappears without warning, its routes take 180 seconds to become invalid and 240 to be deleted.
Frequently asked questions
Why does RIP use TTL 2 if the messages are for the neighbor?
That's Cisco's implementation: the message shouldn't go past one router. With 255.255.255.255 as the destination, no router forwards it anyway.
What does [120/2] mean in the routing table?
120 is RIP's administrative distance (how much the source is trusted) and 2 is the metric: the hops to the network.
What's the difference between route poisoning and split horizon?
Split horizon stays quiet: it doesn't advertise a route back where it learned it. Poisoning shouts: it advertises the failed network with metric 16 so everyone deletes it quickly.
Is RIP on CCNA v2.0?
Not as a topic of its own: the v2.0 blueprint asks for OSPFv2 and OSPFv3. But topic 3.1 does ask you to interpret the routing table (code, prefix, administrative distance and metric), and RIP is the simplest way to understand distance vector.
Is RIP still used?
Rarely: in small networks, old equipment or between a router and a provider that only offers it. Enterprise networks use OSPF or EIGRP.
Key takeaways
- RIP is distance vector: each router advertises its networks and hops; neighbors add one.
- RIPv1 uses UDP 520 by broadcast, every 30 seconds, and Cisco gives it administrative distance 120.
- 16 hops is infinity: that's how a failed route is poisoned.
- Split horizon and triggered updates prevent loops and speed up convergence.
- RIPv1 sends no masks: it supports neither VLSM nor discontiguous networks. That's why RIPv2 exists.
NEXT STEP
From this lesson to the Canadá Logística network
In the CCNA 2.0 Course you interpret routing tables with different protocols, compare administrative distance and metric, and migrate the Canadá Logística network to OSPF, in Packet Tracer or CML. We'll let you know when it opens.
Upcoming labs
Sources
- RFC 1058 · Routing Information Protocol
- RFC 2453 · RIP Version 2
- Cisco · Configuring Routing Information Protocol (IOS XE)
- Cisco · Behavior of RIP and IGRP When Sending and Receiving Updates
- Cisco · IOS IP Routing: RIP Command Reference
- Cisco · 200-301 CCNA v2.0 Exam Topics (3.1)
Lesson prepared with AI assistance and checked against the sources cited. The bytes of every packet are generated according to the standard and verified with an independent tool.