What is RIP?

Welcome back to another beautiful Wednesday morning blog post. This week, let’s discuss the process of implementing RIPv1.

RIP stands for Routing Information Protocol, and the P just stands for protocol. RIPv2 uses UDP port 520, and RIPv1 uses UDP port 520 as well. Surprise, surprise. The main difference between the two is that RIPv1 uses broadcasts to send updates regarding routing info, while RIPv2 uses a multicast address to accomplish this. RIP is useful because it uses these techniques to prevent routing loops, as it limits the number of hops allowed in one path.

For demonstrative purposes, I will be using pre-existing virtual machines courtesty of Glendale’s Netlab system that have internet connections. Similar results can be achieved using virtual machines of your own. I will be configuring RIPv1 on an Ubuntu server installation. Let’s begin.

Changing Machine IP Addresses

For this demonstration, I will be using an Ubuntu Server virtual machine (172.16.1.175 for the IPv4 address my virtual machine) that resides within my internal network (192.168.0/24) and a Windows virtual machine that resides within that same network.

We will begin by logging into the Ubuntu Server machine and opening up a terminal window. We must set the IP address of our Ubuntu Server machine (sudo ifconfig nameofinterface IPaddressofmachine netmask desirednetmask up), set the gateway of the ubuntu server (sudo route add default gw gatewyIPaddress), view the gateway(netstat -r) and ping the gateway a couple of times for good measure as shown below. ubuntu config1

You have successfully configured your Ubuntu Server and its gateway. Nice. I will now log onto the Windows 8 machine and test out a few things. First, run Command Prompt as an administrator. We will use ncpa.cpl to jump to the adapter in the network connections Control Panel applet. Right click on the adapter / interface you wish to configure and open the Properties option. We are interested in the IPv4 option here. Double click it and configure it as shown below. We will make sure this is valid ourselves. ipv4 config

On the same Windows machine, I will now test these configurations by scanning the network for hosts. We can accomplish this by using nmap as always. In the command prompt, simply type nmap x.x.x.* (the x is a wildcard) to scan the network for hosts. In this depiction, I am scanning the network 172.16.1.0/24 network for hosts. depiction

Configuring Routing, RIPv2 and RIP

Now, this is most certainly not going to be a popular or agreeable choice, but since Glendale’s Netlab interface has already configured it, I will be using a Windows 2008 Firewall machine. I know, super lame and very, VERY out of date, but it shall serve its purpose for a simple demonstration.

I will begin by opening the Routing and Remote Access application on my machine, and then right click FW (local) and click Disable Routing and Remote Access. depiction2

Of course I hit the yes prompt, and from there we will right click FW (local) again and this time re-enable it. This will lead to having to select the Custom configuration option, and then select LAN routing, since that is the goal of this tutorial. Select finish and start the service once more.

Next, we will expand the IPv4 section in FW (local), and right click General. Select the New Routing Protocol option and select RIP Version 2 for Internal Protocol, and press Ok to enable RIPv2.

To enable RIPv1 (or just RIP), right click RIP, select New Interface, select LAN-Internal, and select OK. Configure the menu screen following this for RIP version 1 broadcasting, as shown here. Click apply and OK. ripv1cast

Under the same Routing and Remote Access window, under the IPv4 tab, right click RIP and create another new interface. There should only be WAN - External, but if there are other options, just select WAN - External. We will change the Outgoing Packet protocol to RIP version 1 broadcast, and again apply and OK. ripv1cast2

Conclusion

Congratulations! Using just three different machines, I have now configured RIPv1 and RIPv2. There are multiple testing methodologies, and perhaps in the future I will cover some of them, but for now let’s leave it here.

As a reminder, there is a difference between RIPv1 and RIPv2. RIPv1 uses classful routing, while RIPv2 uses classless routing. RIPv1’s classful model updates routing periodically and have no subnet information, and thus do not support variable length subnet masks. RIPv2’s classless routing, on the other hand, does include subnet masks with network addresses included in its routing updates.

And of course, as mentioned in the What is RIP? section, RIPv1 uses broadcasts, while RIPv2 uses a multicast address. You can actually see this illustrated clearly in the pictures above, where I configured the RIP properties in the LAN and WAN properties of the Routing and Remote Access panel. This is shown in the Outgoing Packet Protocol tab of the RIP properties.

Happy… RIP configuring? RIPing? Not sure how to end this. But yes, it can definitely be a useful tool to consider when designing your network.