23 Feb 2013

Routing protocols - Routing Information Protocol (RIP)

   In the last post I've talked about the elements that you need to know before talking about Interior Gateway Protocols. Also, I've told you that IGPs are divided into two categories, distance vector protocols and link state routing protocols. In today's post I will describe two of the distance vector protocols, Ripv1 and Ripv2. We will see the differences between these two protocols and how they operate. I don't think Ripv1 is still in use today, but it will be a good starting point in order to understand the functionality of dynamic routing protocols.
    As you know so far, Rip is a distance vector routing protocol that uses hop count as a metric. Rip uses broadcast address to propagate routing information to other devices in the network. These messages are sent once every 30 seconds. One important aspect of Rip is that the metric can be set to 15 at maximum. When a route has the metric set to a value over 15, it is marked as invalid. Rip uses 520 UDP port when sending and receiving data.
   The way in which Rip updates routing information to network devices is pretty simple. There are two types of messages used in the Rip protocol, the request and the response messages. Upon startup, a router sends a request message to all it's neighbours in order to receive their entire routing table (by the way, Rip sends it's whole routing table information during routing information exchange). Once a device receives the routing table information, it compares data with it's own routing tables entries. If there is a new route in the received data, it is added to the routing table. If the route is already in the routing table, it is updated with the new information. After these steps are complete, the router sends it's routing table information through it's interfaces. Once every 30 seconds the routing information is exchanged again. 
   I've told you in a previous post that Ripv1 is a classful protocol and therefore it does not send network mask in the routing messages. The main difference between Ripv1 and Ripv2 is that Ripv2 does support VLSM implementations. Because it's a classful protocol, you can use class A,B or C IP addresses with /8 /16 and /24 network masks. The administrative distance of Rip is 120 (for both versions).
   It is very simple to configure Ripv1, there are few commands that you need to remember. To enable Rip type router rip from the global configuration mode, the prompt will be changed and you will enter the Rip configuration mode. You must also set the Rip version by typing version 1. To explore additional commands type rip ?:
Configure Rip version

   After these commands are entered, you will have to add the neighboring networks by typing: network [network ip address]:
Configure RIP protocol

   Ripv1 uses auto-summarization feature to summarize multiple networks. Imagine you have two networks and If you try to add these two networks, Ripv1 will summarize them as the classful network.
   To verify your configuration use the following commands: show ip route, show ip protocols, show running-config.
   I recommend that you set the interfaces, that do not participate in the routing exchange operation, to the passive-interface mode. To do this type: passive-interface [interface]. The following image displays an example in which I have set the interface fastEthernet1/0 in the passive-interface mode:
Passive-interface command

By using this method, routing messages are not sent through interfaces that do not need to receive them. This is also an enhanced security measure because routing information is not sent outside your network.
   If you have problems with your Rip configuration, you can type debug ip rip to see real-time exchange messages. 
  This is all about the Routing Information Protocol version 1 (Ripv1), I have pointed out all it's features and configuration commands.
   Ripv2 is an improved version of the RIP protocol, invented to address Ripv1 limitations. The main problem with Ripv1 was that it does not support VLSM implementations (subnetting a network with different network masks). As you may recall from a previous article, there are three main private IP addresses used today:, and When implementing a private network you will have to choose between one of these IP addresses ranges.
   The configuration of RIPv2 is not so different as RIPv1. When you want to enable Ripv2 on a router, do the following:
- enter the global configuration mode
- type router rip
- and set the version 2 for Ripv2
   The networks are added in the same way as Ripv1, by using the network [network ip] statement.
Ripv2 with default settings will summarize routing entries just like RIPv1. A cool feature of RIPv2 is that you can disable the auto-summarization feature by typing no auto-summary. You can try the same thing to Ripv1 but the command will have no effect:
disable auto summary

To verify the RIPv2 configuration, use the same commands as with RIPv1: show ip route, show ip protocols, show running-config, debug ip rip:
show ip protocols command

   You know how to configure static routes, RIPv1 and RIPv2. Remember that when configuring static routes, you have to use the ip route [network ip][mask][next hop/exit interface] statement.
A cool feature of RIPv2 is that you can redistribute static routes so you would have to work less. The command is: Router(config-router)#redistribute static. By doing this, all static routes will be sent to all routers in the network. This method will spare your time because you don't have to configure the same static route to all routers in the network:
redistribute static route

That's about it folks, I hope this article will serve you well. Leave a comment if you have any questions or something to add. I will add in the following days video tutorials of static routes, Ripv1 and Ripv2 configurations. I wish you all the best!  


About me

After finishing a Computer Science University I've started working as an IT support technician for an Outsourcing company. Since then, I've changed my profile a couple of times and now I work as a System Administrator at one of the biggest companies in the gaming industry. I'm constantly learning new things in this domain so I thought of creating this website for sharing my experiences. Until now, I've taken the Cisco Certificate Network Associate exam and several Microsoft certifications. Now, I am in the process of learning Unix and enhance my programming skills.