Introduction to RIP Protocol
RIP stands for Routing Information Protocol. RIP protocol is a distance vector routing protocol that is used to employ hop count as a routing metric. By implementing a limit on the number of hops allowed in the path from source to destination, it prevents the routing loops. The largest number of hops allowed for RIP is 15 which limits the size of the network that RIP can support. It uses UDP (User Datagram Protocol) as its transport protocol and is assigned the reverse port number 520. To prevent incorrect routing information, It implements a split-horizon, hold down and route poisoning mechanism.
How does RIP Protocol Work?
Let’s understand the working with an example:
In the above-mentioned image, there are 8 routers in the network. Router 1 wants to send data to router 3. If the network is configured with RIP protocol, then the network will choose the route which contains the least numbers of hops. In the above image, there are three routes in the network, route 1, route 2, and route 3. Route 1 contains 3 hops, Route 2 contains 2 hops and route 3 contains 4 hops. As RIP protocol choose the route which contains the least number of hops, in this case, the network will choose route 2 as it contains the least numbers of hops i.e. 2.
In the above-mentioned image, there are 6 routers in the network, and Router 1 wants to send the data to router 4. There are two route in the network, route 1 and route 2. Route 1 contains 3 hops and route 2 contains 3 hops. As both routes contain the same number of routes, the Network will send the data to both routes simultaneously. In this way, the network manages load balancing and data to reach the destination a bit faster.
RIP Protocol Message
The message format is used to share information among different routers. RIP protocol message uses UDP i.e. User Datagram Protocol and all RIP messages exchanged between routers are encapsulated in the UDP segment. The format of the RIP protocol message is as follows:
- Command: This field is an 8-bit field that is used for requests or reply. The value of the request is 1 and the value of the reply is 2.
- Version: This field is used to define the version of the RIP protocol that the user use. For example, if the version of RIP protocol is 1, then the field contains a value as 1.
- Reserved: It is a reserved field that is reserved for future use.
- Family: It is a 16-bit field. As it uses TCP/ip family, the field will continue 2 as a value.
- Network Address: It defines the address of the network, consists of 14 bytes. If the network address is IPV4, then we use 4 bytes and the other 10 bytes are zeros. If the network address is IPV6, then we use 6 bytes and the other 8 bytes are zeros.
- Distance: This field defines the Hop count. That is the number of hops that are used to reach the destination.
RIP Protocol Timers
Various timers present in RIP protocol are as follows:
- Update Timer: Using an update timer, routers exchange their routing table information periodically. The default timing for routing information being exchanged by the routers operating RIP is 30 Seconds.
- Hold down Timer: It is time for which the routers to wait for the neighbor router to respond. The default time is 180 seconds. If the neighborhood router does not respond with a given time limit then that router is declared as a dead router.
- Invalid Timer: It is the same as a hold-down timer, if the destination router does not respond within 180 seconds, then it is considered as an invalid timer and the destination router marks hop count as 16.
- Flush Timer: It is the time after which the entry of the route will be flushed if it doesn’t respond within the flush time. The default is 60 seconds. This timer starts after the route has been declared invalid and after 60 seconds i.e. time will be 180 + 60 = 240 seconds.
Advantages & Disadvantages of RIP Protocol
Below are the advantages & disadvantages are as follows:
- It is easy to configure.
- CPU utilization is less.
- It has less complexity.
- It provides fast convergence.
- When the network changed, it automatically sends a triggered update.
- It works only on Hop count.
- It is not scalable as the hope count is only 15, if there is a requirement of more routers in the network, then it will be a problem.
- It does not support variable-length subnet mask.
- It broadcast the routing update to the entire network, which creates lots of traffic.
Here in this article, we have discussed the basic concepts of RIP protocol with its working and examples. We have also discussed the advantages and disadvantages of the RIP protocol. Hope you enjoyed the article.
This is a guide to RIP Protocol. Here we discuss the basic concept, Message, Timers along with the Advantages & Disadvantages of RIP Protocol. You can also go through our other suggested articles to learn more –