The RIP protocol is one of the oldest routing protocols still in use. It helps routers share what networks they can reach and pick the path with the fewest hops, meaning the fewest routers along the way. Every 30 seconds, each RIP router sends its full routing table to its neighbors.
It's simple to set up, works on almost any router, and makes a great teaching tool. However, its 15-hop limit and slow reaction to failures keep it out of most modern business networks. You'll still find it in small networks, home labs, older equipment, and plenty of networking classes around the world.
What Is RIP in Networking?
What is RIP in networking, put plainly? It's a distance vector routing protocol. "Distance" means hop count, and "vector" means direction, so each router knows how far away a network is and which neighbor leads there.
RIP first appeared in the 1980s and was written up as RFC 1058 in 1988. That was around the same time thick coax ruled office networks, long before modern twisted pair took over. You can trace that whole shift through a history of Ethernet cables.
RIP routes traffic using IP addresses, while switches deliver frames using hardware addresses. That's the core difference between IP and MAC addresses in any routed network.
How the RIP Routing Protocol Works
RIP keeps things simple, which is both its biggest strength and its biggest weakness. Routers count hops, share their tables on a timer, and follow a few rules to avoid loops. These pieces explain how the RIP routing protocol finds paths and why it reacts so slowly to change.
Counting Hops
RIP measures distance in hops. Each router a packet crosses adds one hop. A directly connected network has a hop count of 0 or 1, depending on the vendor.
The maximum is 15 hops. A route with 16 hops is marked unreachable, which RIP treats as infinity. This limit keeps routing loops from running forever, but it also caps the size of any RIP network.
Hop count ignores speed, congestion, and reliability completely. RIP would pick a two-hop path over slow 10 Mbps links instead of a three-hop path over 10 Gbps fiber. That's one reason faster protocols replaced it. Some vendors let you add extra hops to slow links by hand, but that's a clumsy fix.
Sharing Updates Every 30 Seconds
Every 30 seconds, each RIP router sends its entire routing table to its neighbors. Neighbors add one hop to each route and update their own tables. If a neighbor already has a shorter path, it simply ignores the longer one.
These updates travel over UDP port 520. With many routes, the regular blasts use real bandwidth, since each message carries up to 25 routes. A table with 500 routes takes 20 messages every 30 seconds from every router. On older WAN links, that steady chatter could eat a noticeable share of the bandwidth.
The RIP Timers
RIP uses four timers to manage routes. The update timer sends the table every 30 seconds. The invalid timer marks a route as bad after 180 seconds without an update.
The holddown timer then waits another 180 seconds before accepting a worse route to the same network. Finally, the flush timer removes the dead route after 240 seconds. That adds up to several minutes for a failure to fully clear, which feels like forever on a busy network. Cisco lets you shorten these timers, but every router must use the same values or routes will flap.
Stopping Routing Loops
Distance vector protocols can create loops, where two routers keep sending traffic back and forth until it expires. Each router only knows what its neighbors say, not the full map. RIP uses several tricks to stop them.
Split horizon stops a router from advertising a route back out the interface it learned it on, which breaks the most common two-router loop. Route poisoning marks dead routes with 16 hops so neighbors drop them fast.
Poison reverse sends that poisoned route back to the sender as extra insurance. Triggered updates send changes right away instead of waiting for the next 30-second timer. Without these tricks, RIP would suffer from "count to infinity," where routers slowly raise a dead route's hop count one step at a time.
RIP Versions
RIP has changed over the years to keep up with new addressing needs. Three versions exist, each adding features the last one lacked. Most networks running RIP today use version 2, but it's worth seeing how each one differs.
RIPv1
The original RIPv1 protocol is classful. It doesn't send subnet masks in its updates, so every network must use the default mask for its class.
RIPv1 broadcasts updates to 255.255.255.255, which every device on the segment must process. It also has no authentication, so any device could inject fake routes. A misconfigured laptop running routing software could quietly hijack traffic on the whole segment.
Today, RIPv1 is mostly found in textbooks and very old equipment. Most modern routers still support it, but almost nobody should choose it for a new network.
RIPv2
The RIPv2 protocol, usually written as RIPv2, arrived in RFC 2453 in 1998. It fixed most of version 1's problems.
So, what is RIPv2 protocol adding? It sends subnet masks, which support classless addressing and variable-length subnets. It uses multicast address 224.0.0.9 instead of broadcast, so only RIP routers process updates.
PCs, printers, and phones on the same segment can ignore the traffic completely. It also supports MD5 authentication and route tags for marking routes from other protocols.
RIPng
RIPng, short for RIP next generation, brings RIP to IPv6. It's defined in RFC 2080 and works much like RIPv2. RIPng uses UDP port 521 and the multicast address FF02::9. It also uses link-local addresses as next hops, which keeps routes tied to the local link.
It relies on IPv6's built-in security features instead of its own authentication. It's rare in production, but some home routers and lab setups support it. If you're learning IPv6 routing, RIPng is an easy first step before OSPFv3.
|
Feature |
RIPv1 |
RIPv2 |
RIPng |
|
Year |
1988 |
1998 |
1997 |
|
IP version |
IPv4 |
IPv4 |
IPv6 |
|
Subnet masks |
No (classful) |
Yes (classless) |
Yes (prefixes) |
|
Update method |
Broadcast |
Multicast 224.0.0.9 |
Multicast FF02::9 |
|
Authentication |
None |
Plain text or MD5 |
Uses IPv6 security |
|
UDP port |
520 |
520 |
521 |
|
Max hops |
15 |
15 |
15 |
Inside a RIP Packet
Every RIP packet has a simple structure, which makes it easy to read in a packet capture tool like Wireshark. It starts with a short header and is followed by a list of route entries. Here's what each part holds.
The RIP Header
The RIP header is only 4 bytes long. The first byte is the command, where 1 means request and 2 means response. The second byte holds the version number, either 1 or 2. Routers ignore packets with a version they don't support.
The last two bytes are unused in RIPv1 and reserved in RIPv2. A router sends a request when it first starts up, asking neighbors for their full tables right away. That way, it doesn't have to wait 30 seconds to learn its first routes.
Route Entries
After the header, each route entry takes 20 bytes. A single packet holds up to 25 entries, which keeps it under 512 bytes.
|
Field |
Size |
What It Holds |
|
Address Family Identifier |
2 bytes |
Usually 2, meaning IPv4 |
|
Route Tag |
2 bytes |
Marks routes from other protocols (RIPv2) |
|
IP Address |
4 bytes |
The destination network |
|
Subnet Mask |
4 bytes |
The network's mask (RIPv2) |
|
Next Hop |
4 bytes |
A better next router, if any (RIPv2) |
|
Metric |
4 bytes |
Hop count from 1 to 16 |
Configuring RIP on a Router
Setting up RIP takes only a few lines. On Cisco gear, start with the router RIP command in global configuration mode. Then type version 2 to switch from the default version 1.
Next, add network statements for each directly connected network, such as network 10.0.0.0. Finally, type no auto-summary so RIP sends exact subnets instead of summarizing them by class. Add passive-interface on ports facing users, so RIP doesn't send updates where no routers live.
Use show ip route to check learned routes, which appear with an "R" code. The number in brackets, such as [120/2], shows the administrative distance and hop count. The show ip protocols command lists timers and neighbors.
Many home routers and open firmware like OpenWrt also support RIP through a simple settings page. A home lab with a few routers linked by Cat5e cables is a cheap way to practice.
Pros and Cons of RIP
RIP's simplicity cuts both ways, and that's worth weighing before you pick it. It's easy to learn and easy to run, but it can't keep up with large or busy networks. These points show where it still makes sense and where you'll want something stronger.
- Easy to configure: A few commands get RIP running, which makes it perfect for students and small labs.
- Wide support: Almost every router, from cheap home units to enterprise gear, supports RIPv2.
- Low router load: RIP needs very little memory or CPU, so old and small routers handle it fine.
- Slow convergence: Timers can leave dead routes in place for minutes, which interrupts apps and calls.
- 15-hop limit: Networks larger than 15 router hops simply can't use RIP at all.
Where RIP Is Still Used
Most enterprises moved to OSPF or EIGRP years ago. Still, RIP in networking hangs on in a few places. Networking classes use it to teach distance vector ideas, since it's easy to watch in action.
Small offices with two or three routers sometimes run it because it's simple and free on almost every device. Some older industrial systems and legacy gear only support RIP. Home lab fans also use it to experiment and to link a second router or a home network segment without typing static routes.
Some service providers also run RIP on customer edge links, where only a few routes need sharing. It's simple enough that both sides can set it up in minutes.
Learn the Basics, Then Build Bigger
RIP counts hops, shares its full table every 30 seconds, and stops at 15 hops. It's slow but simple, and it's still a great way to learn how routing works. RIP in computer networks still needs solid links, so start with quality Ethernet patch cables from TS Cables.
FAQs
What port does RIP use?
RIPv1 and RIPv2 use UDP port 520. RIPng, the IPv6 version, uses UDP port 521 and the multicast address FF02::9.
Why does RIP have a 15-hop limit?
The limit stops routing loops from counting forever. Any route with 16 hops is marked unreachable, so bad routes disappear instead of spreading.
Is RIP still used today?
Yes, but rarely in large networks. RIP shows up in classrooms, home labs, small offices, and older equipment that doesn't support newer protocols.
What is the administrative distance of RIP?
RIP has an administrative distance of 120. Routes from OSPF at 110 and EIGRP at 90 win over RIP routes to the same network.
What is the difference between RIP and OSPF?
RIP counts hops and shares full tables every 30 seconds. OSPF builds a full network map, uses link speed, and converges much faster.
Further Reading
Even simple routing needs cables that never drop a packet. These TS Cables picks explain Ethernet basics, category ratings, Cat6 vs Cat8 upgrades, shielding, and buying tips for labs and offices: