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 255.255.255.255 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 ?:
After these commands are entered, you will have to add the neighboring networks by typing: network [network ip address]:
Ripv1 uses auto-summarization feature to summarize multiple networks. Imagine you have two networks 192.168.2.64 and 192.168.2.128. If you try to add these two networks, Ripv1 will summarize them as the 192.168.2.0 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:
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: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. 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
The networks are added in the same way as Ripv1, by using the network [network ip]
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:
To verify the RIPv2 configuration, use the same commands as with RIPv1: show ip route, show ip protocols, show running-config, debug ip rip:
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:
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!