Technology / Networking

What is RIP (Routing Interface Protocol)?

How to Add RIPng to IPv6 picture: A
Follow us
Updated on July 1, 2024

Quick Definition: RIP is a routing protocol used to find the most efficient path between two routers, using hop count as the metric to determine the best path. It updates regularly, sending out updates made to its routing table to other routers on the network.

To imagine what Routing Interface Protocol (RIP) does for the internet, imagine that a friend invites you over for dinner. You've never been to their place, so they give you their address. You get directions and arrive, but it's a big apartment building. 

Not only did your friend not tell you their apartment number, but the apartment numbers have letters and symbols as well. Oh, and the main door is locked. The numbering doesn't make any sense at all. Even if you knew their apartment, you wouldn't know how to find the place or get in.

This is how routers can feel in networking and routing. (If they could feel, that is.) A router knows who it's connected to, but it doesn't know what's beyond that connection. Out of the box, routers don't advertise their connections and networks to other routers just because they're connected to them. But for quite a while, there's been RIP. RIP, or Routing Interface Protocol, makes sure that all routers know where to find connections and how many hops away each one is.

RIP doesn't look very different in IPv6 compared to IPv4, but in this post, we'll explain how to implement RIP on a router in IPv6.

What is Routing Interface Protocol?

Routing Interface Protocol, also known as RIP, is used to disseminate information about networks and interfaces to other routers. Routers need to know what destinations can be reached, how far away they are, and the quickest, most efficient path. In addition, RIP is one of the oldest protocols for disseminating that information.

Advantages and Limitations of RIP

RIP, while older and simpler than other routing protocols, has advantages. It is simpler to implement and configure, making it attractive for smaller and less complex networks. Being simpler also requires less resource usage on the hardware, meaning that cheaper, less powerful routers can run it with ease. Finally, as an older protocol, it has widespread adoption on almost every make and model of router.

It isn't perfect, however, and has some disadvantages to be aware of. One is convergence time; RIP takes longer than other routing protocols to update its neighbors when network topology changes, leading to suboptimal routing paths. 

Another is the lack of support for CIDR. This limitation makes RIP unsuitable for larger networks. Finally, earlier implementations of RIP lack built-in authentication for routing updates, making them vulnerable to route poisoning and spoofing attacks.

How RIP Works: Functions and Key Components

RIP is a distance-vector routing protocol that uses several components to achieve efficient route distribution and stability within a network. Here’s a closer look at each component:

Routing Information Base (RIB)

The Routing Information Base (RIB), also known as the routing table, is a data table stored in a router that lists the routes to particular network destinations. The RIB contains information about the distance to each destination network and the next hop router to reach that destination. Each entry in the RIB includes the destination subnet, the next hop address, the metric (which for RIP is the hop count), and the timer for route expiration.

As the router learns about new routes and networks, they are added to the RIB, making them available for clients. Likewise, when a destination becomes unreachable, the route is marked as unusable and eventually removed from the RIB.

Routing Updates

RIP routers broadcast or multicast routing updates at regular intervals (typically every 30 seconds) to all neighboring routers. These updates contain the entire routing table, which helps neighboring routers recalibrate their own tables if better routes are found or if a network becomes unreachable. Each update includes the IP address of the destination network, the subnet mask, the next hop, and the number of hops to reach the destination.

Metric Calculation

RIP evaluates the best path to a destination network using the hop count metric. Each router through which a packet must pass to reach the destination counts as one hop. The path with the fewest hops to the destination is considered the best path.

Routing Tables

Routing tables in RIP are updated via a distance vector algorithm. When a router receives a routing update, it compares the hop count for each route in the update to the hop count in its existing routing table. If the new information provides a route with fewer hops, the router updates its table with the new route. These changes are then propagated in subsequent routing updates sent to other routers.

Routing Loop Prevention

RIP employs two key techniques to prevent routing loops and increase routing efficiency:

  • Split Horizon: This technique prevents a router from advertising a route back in the direction from which it was learned. Essentially, routers shouldn't create a loop by continuously advertising the same routers back to each other.

  • Poison Reverse: Poison reverse complements split horizon by actively marking the route as unreachable (setting the hop count to 16) when sending updates back in the direction from which it came. This method quickly informs other routers about unreachable routes to increase network stability.

Together, these mechanisms help maintain accurate and loop-free routing environments in networks using RIP. By understanding these key components and techniques, network administrators can effectively manage and troubleshoot RIP-configured networks.

What is IPv6 RIP or RIP Next Generation (RIPng)?

RIP was originally designed to meet the internet standard of IPv4. It's a distance vector protocol — or a protocol that determines the path to remote networks and counts the number of hops to get there. RIP eventually became replaced with RIPv2.

The IPv6 version of RIP is also known as RIP Next Generation (RIPng) or IPv6 RIP. Functionally, IPv6 RIP works the same way that RIPv2 did; it just offers more. Most importantly, it can only be run on IPv6.

An Overview of How to Add RIPng to IPv6 [VIDEO]

In this video, Keith Barker covers how to provide full connectivity in a sample network using the basic routing protocol RIPng (Next Generation) in IPv6. He'll discuss and demonstrate basic interface configuration and then demonstrate how to verify everything is working as you want it to.

How to Use RIP (Using a Virtualized Network to Demonstrate)

After setting up a network, you want to make sure that the connections are working and that each router can see everything else on that network it's supposed to. Throughout this post, we're going to cover how to use IPv6 RIP to do exactly that. But before we do that, we should visualize the test network we're going to use.

We recommend using a virtualized network and practicing on your own. Here's a brief description of our network to help you do so: 

We have three routers: R1, R2, and R3. Each is connected to the others on its serial interface. Each router also has a g2/0 interface, leading to different devices underneath it. When we set up the network, we came up with an IP addressing schema of 2001:db8:6783:X:: /64.

If this were a real-world network, we'd connect our cables and connectors. Then, virtualized or physical, we configure each s1/0 and s1/1 interface with the appropriate IP address. 

The central question we're asking throughout this post is this: once it's all in place, how do we test it? How do you check that each connection, interface, and device is operating as it should?

Verify a Network Connection Without RIP

One answer is with a simple ping. To demonstrate this, let's go into R1 and ping R3's address. This should verify whether R3 is responding and whether it's able to communicate with R1. If you have a virtualized network to work on, follow along with us by going into R1's console.

Once there, you have a choice. You can either type in all the characters of the IPv6 address for the subnet and host ID, but there's an alternative. Type:

show ipv6 int brief

This will output a table containing all the serial connections directly connected to the router. In our case, addresses at Serial1/0 and Serial1/1 go out to their own networks (the two networks that R1 has to R2 and R1 to R3). All we have to do is drag, copy, and paste the address straight from the interface table you see there.

Keep in mind that the address you'll see in that table is the network ID; you'll need to replace the final digit. In our case, what we see on that table is 2001:DB8:6783:13::1. But we want to only copy everything before that final "1". We replace that 1 with the address of the router, which happens to be "3". This leaves us with:

ping 2001:DB8:6783:13::3

We wouldn't want to speak for you, but getting a successful return on a test ping is always exciting—even when it's on a simple virtualized network with only a few connections. Success is success!

Our return shows that IPv6 is good between R1 and R3. We've named the network between R1 and R3 13, and this ping tells us that our 13 network between R1's serial s1/1 and R3's s1/1 is good.

However, this only demonstrates one thing: the route between R1 and R3's serial interfaces. What about interfaces that R1 isn't directly connected to? If you remember our original example, this is like arriving at an apartment building without an apartment number, an understanding of its numbering system, or a key.

Can You Ping Network Connections That Aren't Connected?

We named the network between R2 and R3 23. Our question now is whether R1 can see network 23 even though it's not directly connected to it. You might think that since R1 successfully pinged R3 before, it should be able to ping R3's serial connection to R2 just as well easily. After all, it's pinging the exact same router, just a different interface on that router. Spoiler alert: it's not going to work. If you want to see the failure result, type:

ping 2001:DB8:6783:23::3

You'll see we changed the network ID from "13" to "23", but the ping still fails. The error message effectively says, "I don't have the ability to ping that address." You may wonder why that is. 

Routers don't know about remote networks, only the directly connected interfaces. Just because it's connected to R3, R1 doesn't automatically learn all R3's other interfaces and networks. R1 doesn't even know about network 23's existence, and it certainly can't ping it. If only we had a way for the routers to talk to each other about the network they each know about…oh yeah, RIP!

How to Add RIPng to IPv6

RIPng (or RIP next generation) is how we'll inform R1 of R3's other IPv6 networks and interfaces. RIPng in IPv6 is different in configuration than IPv4's RIP. Instead, we go to interface configuration mode and simply tell each interface, "Participate in interface configuration and the RIP-routing process." Once configured, RIPng takes care of advertising routes it knows about and creating new routers that it learns from its neighbors.

Start by entering configuration mode in R1's console:

conf t

Then, enter the interface configuration for our gigabit interface:

int g2/0

Then, we create a routing process called "RIPTest" and enable it on the interface:

ipv6 rip RIPTest enable

Next, we switch to two serial interfaces and enable RIPng on them as well:

int ser1/0<br>
ipv6 rip RIPTest enable<br>
int ser 1/1<br>
ipv6 rip RIPTest enable

We now have R1's three physical interfaces configured to use RIPnp, but this doesn't complete the process. You have to make sure the other routers on the network also know to broadcast their networks and connections, so repeat the process on the same interfaces on R2 and R3.

What happens next is all in the background. As each interface starts up RIP, it will start advertising and receiving advertisements. Whether IPv4 RIP or IPv6 RIPng, neighbors send RIP messages back and forth to one another to count how far apart each node is.

Confirm Network Connections in IPv6 RIP

After getting R1, R2, and R3 participating in RIP, we should be able to see RIP-learned routes. Since every device is broadcasting the connections it has with its neighbors, and we have a small network to start with, this will be a small output. But we'll explain how to interpret the results.

Just a few minutes ago, R1 wasn’t able to ping the 23 network because it didn't even know it was there. But now we know that both R2 and R3 are advertising that network's existence and how to get there through the RIP-routing protocol. We should also have access to all of our loopbacks because those are also being advertised inside the RIP routing process.

Go back to R1 to see if we were successful. We'll type the same ping as before:

ping 2001:DB8:6783:23::3

Get excited – it's another success. And now, let's look at our routing table by typing:

show ipv6 route rip

This will output the routes learned via RIP. We can now examine the routes in the table: 

R1 is now aware of all the networks that R2 and R3 have advertised from their own G2/0 interfaces. Your hypothetical network may look different from ours, but if R2 has a server, R1 now knows about it and how to get there. In our network, R1 can leave s1/0, and then head out through R2's link-local address.

R1 also learns that R3 has a subnet called 3. To access it, R1 would leave its own S1/1 and the next hop is R3's link-local address.

Or there's that 23 network that exists between R2 and R3. In our case, network 23 is accessed through R2's s1/1 and R3's s1/0. If your network looks like ours, you should be seeing two equal-cost paths to get there.  One is through R1 s1/0 followed by R2 s1/1. The other through R1 s1/1 followed by R3 s1/0. What you should see is that both were put into the routing table, and both have the same metric of "2" (2 hops away).

One interesting note is that when R2 advertised this route to R1. And R3 did the same thing; it advertised network 23 with a hop of 1. However, with IPv6, when a router receives a metric of "1" with RIP, we actually add another hop to it for the ingress interface. The result of that gets put into the routing table for that router.

What that means for our sample network is that even though network 23 is directly connected to R2 and was advertised with a hop count of 1, it shows up with a hop count of 2 in R1's routing table. That's a key difference between RIPng for IPv6 and RIP with IPv4.

The routing table will also include the loopback addresses of R2 and R3. They're all showing up in the routing table, courtesy of RIP.

RIP in Comparison with Other Routing Protocols

RIP isn't the only routing protocol out there. Other protocols have different advantages and disadvantages. Choosing which to use comes down to your use case and network.

  • OSPF vs RIP: OSPF is better than RIP for larger networks. It uses an algorithm to find the best path to a destination based on the bandwidth of the links along the paths. OSPF has faster convergence and better security than RIP.

  • EIGRP vs RIP: EIGRP is a protocol developed by Cisco. They released the standard for other vendors to use most of its features but kept the most powerful features proprietary for Cisco hardware. Regardless of vendor, it is much better for larger networks and is overall more efficient and faster.

  • BGP vs RIP: BGP is specifically designed for routing between autonomous systems, while RIP is for routing within a single AS. This is a complex subject that is more of a concern for internet providers, universities, or governments running massive and spread-out networks. 

Wrapping Up

RIP is one of the oldest route-advertising and hop-counting protocols in use, but that doesn't make it obsolete. RIPng for IPv6 remains an easy-to-use tool for advertising available connections and their distance. Most importantly, RIPng helps provide full connectivity to a network. 

If learning about RIP's different versions is important to you, this CBT Nuggets video reviews RIPv2 concepts.


Download

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.


Don't miss out!Get great content
delivered to your inbox.

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.

Recommended Articles

Get CBT Nuggets IT training news and resources

I have read and understood the privacy policy and am able to consent to it.

© 2024 CBT Nuggets. All rights reserved.Terms | Privacy Policy | Accessibility | Sitemap | 2850 Crescent Avenue, Eugene, OR 97408 | 541-284-5522