Routing information protocol (RIP) is a routing protocol that lets routers of an autonomous system inform each other about the changes inside the network. It is an intra-domain routing protocol as it updates the routing tables of routers inside an autonomous system. Routing specifies all those protocols that define the route of packets from source to destination across multiple networks.
The routing protocols upgrade the dynamic routing table whenever there is a change in the Internet. In this section, we will discuss the working of the RIP routing protocol along with its message format. We will also study the RIP timers, advantages, and disadvantages.
Content: Routing Information Protocol (RIP)
Working of RIP
As Routing Information Protocol is an intra-domain protocol it updates the routers inside the autonomous system about any change in the network such as a path failure, path validity, path expiry, etc. The RIP protocol implements the features of distance vector routing with some consideration listed below:
- The RIP protocol refers to all the routers and links between those routers present in the autonomous system as nodes.
- The first column in the routing table i.e., destination defines the logical address (network address) of the destination node.
- The metric or cost we see in distance vector routing is expressed by hop counts in RIP protocol. The hop count specifies a number that defines the number of links (networks) the packet has to travel to before reaching the destination.
- Any route in RIP protocol has maximum 15 hops as it an intradomain protocol. The infinite route is expressed as 16.
- The next node column in the routing table specifies the network address or the logical address of the next router to which the packet should be forwarded in order to reach the destination node.
RIP Example
Consider that router R1 wants to send a packet to the router R8. If you observe the figure below then you can see that there are 3 routes from router R1 to R8 i.e., via R2, R4, and R5. The hop count value of route 1 is 3, the hop count value of route 2 is 2 and the hop count value of route 3 is 4.
The route with the lowest hop count is chosen i.e., route 2 with hop count 2. The RIP also performs load balancing when there are multiple routes with same lowest hop count then the source router sends data from both the route to balance the load on the network.
Message Format
The RIP message can either be a request message or a response message.
Request Message
The RIP request message enquires about some specific entries of the routing table or about all the entries of the routing table. The RIP request message can be sent by the router that has just entered the network and wants the information about its neighboring routers or by the router that contains some time-out entries.
Response Message
The RIP message can be classified as solicited response message and an unsolicited response message it is also referred to as an update packet. The solicited message is sent in response to the RIP request message. The solicited response message has information about the destination node that is mentioned in the RIP request message.
The unsolicited response message is either sent at a regular interval of 30 sec or in case there is some change in the routing table. Let us discuss the format of the RIP message.
Command: The content of this field indicated whether the RIP message is a request message or a response message. This is an 8-bit field.
Version: This field indicates the version of the RIP protocol used. This is also an 8-bit field.
Family: This is a 16-bit field that defines the family to which the RIP protocol belongs.
Network Address: This is a 32-bit which indicates the address of the destination network.
Distance: This is a 32-bit field that defines the hop count from the router that advertises the RIP message to the destination router.
Timers in Routing Information Protocol
To regulate the operation of the Routing Information Protocol, it is accompanied by three timers a periodic timer, an expiration timer, and a garbage-collection timer.
1. Periodic Timer
For each particular route in the routing table, a periodic timer is set between 25 sec and 35 sec. The router receives an update message for that particular before the periodic timer reaches 0. Once the route is updated the timer is set again.
2. Expiration Timer
Whenever a router in an autonomous system receives any update message for a particular route at that time the expiration counter is set to 180 for that particular route. In the section above, we have seen the update message (unsolicited message) is sent every 30 sec.
Now if the expiration counter reaches 0 and due to some reason, the update message is not received for that particular route, the route gets expired and its metric is set to 16 which means the route is unreachable.
3. Garbage Collection
When information regarding a certain route becomes invalid the routing table does not remove that route immediately. Instead, the routing table displays the invalid route with the metric 16 and sets the garbage-collection timer to 120 sec. When the timer count reaches 0 the route is removed from the routing table and this removal is informed to the neighboring routers.
Advantages and Disadvantages of RIP
Advantage of RIP Protocol
- The RIP protocol is easy to implement.
- Most convenient for a small network.
- RIP also perform load balancing.
Disadvantages of RIP Protocol
- The RIP sent the update message to its neighboring router at a regular interval of 30 sec, it increases the traffic of the network.
- RIP has a maximum hop count of 15 which limits its use in a large network.
- RIP does not guarantee the shortest path as it only chooses the closest path by observing the hop count.
So, this is all about the Routing Information Protocol that updates the routers in an autonomous system about the changes in the network. The RIP protocol has been advanced to the newer version RIPv2 and RIPng that overcomes the shortcomings of the previous version RIPv1.
reyhan says
thanks, a lot of information amazing