How To Configure Routing Information Protocol: RIPv1
Routing Information Protocol (RIP) is one of the oldest routing protocols used by routers within a small geographic location to find routes to various networks within an internetwork. In this article I’ll provide you with the details of RIP’s operation, drawbacks and improvements. I will put emphasis on enabling and configuring RIP with the help of a three router internetwork example.
RIP version 2 is the successor of RIP version 1; it was designed to resolve the great limitations of RIP version 1. Today I will concentrate on RIPv1 and in my next article I’ll focus the newer version of RIP, RIPv2, both of which are covered in the CCENT exam objectives.
RIP protocol is also called routing by rumor protocol because RIP enabled routers to send the entire routing table to directly connected neighbors every 30 seconds. Therefore, routing updates within an internetwork are propagated from router to router in a rumor sense of way — from neighbor to neighbor. For this reason RIP has slow convergence time and this is one of the problems concerning RIP.
Let’s take a look at a sample three-router diagram (illustrated below) to indicate the steps of RIPs propagation and convergence.
The routing table in each router keeps bundle information about:
- Remote network — only classful routing supported since RIPv1 does not send subnet mask
- Output interface on the router from which packets will be sent in order to reach that network
- Hop count to reach that network
Stage 1: Each router knows only its directly connected networks
Hop count of 0 means that the specific network is a directly connected network
Stage 2: Routing tables after the first RIP update message exchange
Hop count of 1 means that the specific network is one hop away. It can be seen by looking at the above table that certain networks can be reached via 2 links. RIP is able to perform load balancing on links that point to the same network with the same hop count.
Stage 3: Converged routing tables
Finally the routing tables are converged. Now packets to all these networks can be routed successfully.
Due to the slow convergence time and the rumor behavior, RIP has certain drawbacks. The most important ones are:
The “Count to Infinity” Problem
Let’s assume that network 172.16.5.0 is unavailable. During the next RIP update, R4 finds out that it can no longer route to that network through router R5. After the second update R3 knows that it can no longer route to network 172.16.5.0 through router R4. But it is informed from router R1 that it can reach this network through it.
A loop is created; traffic to network 172.16.5.0 will go from R3 to R1 to R2 to R3 and loop continuously.
This is relative to the count to infinity problem. Changes are propagated slowly leading to unreliable and unstable network routing infrastructure. Moreover, sending the complete routing table via neighboring links causes excessive CPU processing and link bandwidth starvation. All of these, combined with the slow convergence behavior lead to inconsistent routing tables and routing loops.
Special Mechanisms: Maximum Hop Count and Split Horizon
A few Mechanisms have been developed to prevent routing RIPs routing loops. Among them are:
Maximum Hop Count
A maximum of 15 hop counts has been incorporated into RIPs design. Loops may still exist but packets don’t go around travelling in rounds. At the sixteenth hop, they are dropped. This feature controls not only the behavior of loop packets but the time that it takes for a routing table entry to become invalid
This is another mechanism used to avoid routing loops. It states that: no routing information is allowed to be sent back in the direction from which it was received. In our example, this mechanism would prevent R1 from sending back information it just received from R3 back to R3.
We will use our sample network (take a look at figure 1 above) to configure RIP on all three routers. Configuring RIP is pretty much straight forward. You just turn on the protocol stack with the help of the command router rip and then instruct RIP which networks to advertise.
Let’s start by configuring routerA. This specific router has three directly connected networks. We want these networks to be advertised by RIP and this is how we do it:
Always remember that for RIP as well as for the IGRP, we use the classful address of networks. In other words, RIP’s advertisements do not use subnet masks; they only use the network class of addresses and that is why RIP is defined as a classful routing protocol. It is responsible to find the subnets and place them in the routing table.
For example, we have advertised network 220.127.116.11 (class C) and not subnet 18.104.22.168.
To configure RIP protocol on RouterB we use the following commands:
Finally to configure RIP on RouterC we issue the following:
There are cases where you want to stop RIP messages from being advertised out a certain link segment to the internet, for example, or to another LAN. You can always stop RIP messages using the passive-interface command. For example:
This command stops RIP messages from being broadcasted out interface FE1, but at the same time that specific interface could still receive RIP messages.
Things To Keep in Mind about RIPv1
By default, RIP update messages are broadcasted every 30 seconds. Therefore, every 30 seconds each router sends its complete routing table to its neighbors.
If for some reason, an update for a particular route is not received within a period of 180 seconds then that specific route is declared as invalid and the router which identified that, informs all its neighbors about this invalid route.
Next week I’ll talk about configuring RIPv2, which is an enhancement of RIPv1. It includes subnet masks in its routing updates therefore, it is considered to be a classless routing protocol. Moreover, RIPv1 discontinuous networks are avoided since they are identified by their distinctive subnet mask.