Home » RIP Protocol | Routing Information Protocol

RIP Protocol | Routing Information Protocol

by Online Tutorials Library

RIP Protocol

RIP stands for Routing Information Protocol. RIP is an intra-domain routing protocol used within an autonomous system. Here, intra-domain means routing the packets in a defined domain, for example, web browsing within an institutional area. To understand the RIP protocol, our main focus is to know the structure of the packet, how many fields it contains, and how these fields determine the routing table.

Before understanding the structure of the packet, we first look at the following points:

  • RIP is based on the distance vector-based strategy, so we consider the entire structure as a graph where nodes are the routers, and the links are the networks.
  • In a routing table, the first column is the destination, or we can say that it is a network address.
  • The cost metric is the number of hops to reach the destination. The number of hops available in a network would be the cost. The hop count is the number of networks required to reach the destination.
  • In RIP, infinity is defined as 16, which means that the RIP is useful for smaller networks or small autonomous systems. The maximum number of hops that RIP can contain is 15 hops, i.e., it should not have more than 15 hops as 16 is infinity.
  • The next column contains the address of the router to which the packet is to be sent to reach the destination.

How is hop count determined?

When the router sends the packet to the network segment, then it is counted as a single hop.

RIP Protocol

In the above figure, when the router 1 forwards the packet to the router 2 then it will count as 1 hop count. Similarly, when the router 2 forwards the packet to the router 3 then it will count as 2 hop count, and when the router 3 forwards the packet to router 4, it will count as 3 hop count. In the same way, RIP can support maximum upto 15 hops, which means that the 16 routers can be configured in a RIP.

RIP Message Format

Now, we look at the structure of the RIP message format. The message format is used to share information among different routers. The RIP contains the following fields in a message:

RIP Protocol

  • Command: It is an 8-bit field that is used for request or reply. The value of the request is 1, and the value of the reply is 2.
  • Version: Here, version means that which version of the protocol we are using. Suppose we are using the protocol of version1, then we put the 1 in this field.
  • Reserved: This is a reserved field, so it is filled with zeroes.
  • Family: It is a 16-bit field. As we are using the TCP/IP family, so we put 2 value in this field.
  • Network Address: It is defined as 14 bytes field. If we use the IPv4 version, then we use 4 bytes, and the other 10 bytes are all zeroes.
  • Distance: The distance field specifies the hop count, i.e., the number of hops used to reach the destination.

How does the RIP work?

RIP Protocol

If there are 8 routers in a network where Router 1 wants to send the data to Router 3. If the network is configured with RIP, it will choose the route which has the least number of hops. There are three routes in the above network, i.e., Route 1, Route 2, and Route 3. The Route 2 contains the least number of hops, i.e., 2 where Route 1 contains 3 hops, and Route 3 contains 4 hops, so RIP will choose Route 2.

Let’s look at another example.

RIP Protocol

Suppose R1 wants to send the data to R4. There are two possible routes to send data from r1 to r2. As both the routes contain the same number of hops, i.e., 3, so RIP will send the data to both the routes simultaneously. This way, it manages the load balancing, and data reach the destination a bit faster.

Disadvantages of RIP

The following are the disadvantages of RIP:

  • In RIP, the route is chosen based on the hop count metric. If another route of better bandwidth is available, then that route would not be chosen. Let’s understand this scenario through an example.

RIP Protocol

We can observe that Route 2 is chosen in the above figure as it has the least hop count. The Route 1 is free and data can be reached more faster; instead of this, data is sent to the Route 2 that makes the Route 2 slower due to the heavy traffic. This is one of the biggest disadvantages of RIP.

  • The RIP is a classful routing protocol, so it does not support the VLSM (Variable Length Subnet Mask). The classful routing protocol is a protocol that does not include the subnet mask information in the routing updates.
  • It broadcasts the routing updates to the entire network that creates a lot of traffic. In RIP, the routing table updates every 30 seconds. Whenever the updates occur, it sends the copy of the update to all the neighbors except the one that has caused the update. The sending of updates to all the neighbors creates a lot of traffic. This rule is known as a split-horizon rule.
  • It faces a problem of Slow convergence. Whenever the router or link fails, then it often takes minutes to stabilize or take an alternative route; This problem is known as Slow convergence.
  • RIP supports maximum 15 hops which means that the maximum 16 hops can be configured in a RIP
  • The Administrative distance value is 120 (Ad value). If the Ad value is less, then the protocol is more reliable than the protocol with more Ad value.
  • The RIP protocol has the highest Ad value, so it is not as reliable as the other routing protocols.

How RIP updates its Routing table

The following timers are used to update the routing table:

  • RIP update timer : 30 sec

The routers configured with RIP send their updates to all the neighboring routers every 30 seconds.

  • RIP Invalid timer : 180 sec

The RIP invalid timer is 180 seconds, which means that if the router is disconnected from the network or some link goes down, then the neighbor router will wait for 180 seconds to take the update. If it does not receive the update within 180 seconds, then it will mark the particular route as not reachable.

  • RIP Flush timer : 240 sec

The RIP flush timer is 240 second which is almost equal to 4 min means that if the router does not receive the update within 240 seconds then the neighbor route will remove that particular route from the routing table which is a very slow process as 4 minutes is a long time to wait.

Advantages of RIP

The following are the advantages of a RIP protocol:

  • It is easy to configure
  • It has less complexity
  • The CPU utilization is less.

Next TopicUDP Protocol

You may also like