The Wayback Machine - https://web.archive.org/web/20240909144905/https://www.geeksforgeeks.org/routing-information-protocol-rip/
Open In App

Routing Information Protocol (RIP)

Last Updated : 09 May, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Routing Information Protocol (RIP) is a dynamic routing protocol that uses hop count as a routing metric to find the best path between the source and the destination network. It is a distance-vector routing protocol that has an AD value of 120 and works on the Network layer of the OSI model. RIP uses port number 520. 

Hop Count 

Hop count is the number of routers occurring in between the source and destination network. The path with the lowest hop count is considered as the best route to reach a network and therefore placed in the routing table. RIP prevents routing loops by limiting the number of hops allowed in a path from source and destination. The maximum hop count allowed for RIP is 15 and a hop count of 16 is considered as network unreachable. 

Features of RIP 

1. Updates of the network are exchanged periodically. 
2. Updates (routing information) are always broadcast. 
3. Full routing tables are sent in updates. 
4. Routers always trust routing information received from neighbor routers. This is also known as Routing on rumors. 

RIP versions: 

There are three versions of routing information protocol – RIP Version1, RIP Version2, and RIPng. 

RIP v1 RIP v2 RIPng
Sends update as broadcast Sends update as multicast Sends update as multicast
Broadcast at 255.255.255.255 Multicast at 224.0.0.9 Multicast at FF02::9 (RIPng can only run on IPv6 networks) 
 
Doesn’t support authentication of updated messages Supports authentication of RIPv2 update messages –
Classful routing protocol Classless protocol updated supports classful Classless updates are sent

RIP v1 is known as Classful Routing Protocol because it doesn’t send information of subnet mask in its routing update. 
RIP v2 is known as Classless Routing Protocol because it sends information of subnet mask in its routing update. 
 

>> Use debug command to get the details : 

 # debug ip rip 

>> Use this command to show all routes configured in router, say for router R1 :  

R1# show ip route

>> Use this command to show all protocols configured in router, say for router R1 :  

R1# show ip protocols

Configuration :  

Consider the above-given topology which has 3-routers R1, R2, R3. R1 has IP address 172.16.10.6/30 on s0/0/1, 192.168.20.1/24 on fa0/0. R2 has IP address 172.16.10.2/30 on s0/0/0, 192.168.10.1/24 on fa0/0. R3 has IP address 172.16.10.5/30 on s0/1, 172.16.10.1/30 on s0/0, 10.10.10.1/24 on fa0/0. 

Configure RIP for R1 : 

R1(config)# router rip
R1(config-router)# network 192.168.20.0
R1(config-router)# network 172.16.10.4
R1(config-router)# version 2
R1(config-router)# no auto-summary

Note: no auto-summary command disables the auto-summarisation. If we don’t select any auto-summary, then the subnet mask will be considered as classful in Version 1. 

Configuring RIP for R2:  

R2(config)# router rip
R2(config-router)# network 192.168.10.0
R2(config-router)# network 172.16.10.0
R2(config-router)# version 2
R2(config-router)# no auto-summary

Similarly, Configure RIP for R3 :  

R3(config)# router rip
R3(config-router)# network 10.10.10.0
R3(config-router)# network 172.16.10.4
R3(config-router)# network 172.16.10.0
R3(config-router)# version 2
R3(config-router)# no auto-summary

RIP timers:  

  • Update timer: The default timing for routing information being exchanged by the routers operating RIP is 30 seconds. Using an Update timer, the routers exchange their routing table periodically.
  • Invalid timer: If no update comes until 180 seconds, then the destination router considers it invalid. In this scenario, the destination router mark hop counts as 16 for that router.
  • Hold down timer: This is the time for which the router waits for a neighbor router to respond. If the router isn’t able to respond within a given time then it is declared dead. It is 180 seconds by default.
  • Flush time: It is the time after which the entry of the route will be flushed if it doesn’t respond within the flush time. It is 60 seconds by default. This timer starts after the route has been declared invalid and after 60 seconds i.e time will be 180 + 60 = 240 seconds.

Note that all these times are adjustable. Use this command to change the timers :  

R1(config-router)#  timers basic
R1(config-router)#  timers basic 20   80    80    90  

Normal utilization of RIP:

  1. Small to medium-sized networks: RIP is normally utilized in little to medium-sized networks that have moderately basic directing prerequisites. It is not difficult to design and requires little support, which goes with it a famous decision for little organizations.
  2. Legacy organizations: RIP is as yet utilized in some heritage networks that were set up before further developed steering conventions were created. These organizations may not merit the expense and exertion of overhauling, so they keep on involving RIP as their directing convention.
  3. Lab conditions: RIP is much of the time utilized in lab conditions for testing and learning purposes. A basic convention is not difficult to set up, which pursues it a decent decision for instructive purposes.
  4. Backup or repetitive steering: In certain organizations, RIP might be utilized as a reinforcement or excess directing convention, on the off chance that the essential steering convention falls flat or encounters issues. RIP isn’t generally so productive as other directing conventions, however, it very well may be helpful as a reinforcement if there should be an occurrence of crisis.

Advantages of RIP :

  • Simplicity: RIP is a relatively simple protocol to configure and manage, making it an ideal choice for small to medium-sized networks with limited resources.
  • Easy implementation: RIP is easy to implement, as it does not require much technical expertise to set up and maintain.
  • Convergence: RIP is known for its fast convergence time, meaning that it can quickly adapt to changes in network topology and route packets efficiently.
  • Automatic updates: RIP automatically updates routing tables at regular intervals, ensuring that the most up-to-date information is being used to route packets.
  • Low bandwidth overhead: RIP uses a relatively low amount of bandwidth to exchange routing information, making it an ideal choice for networks with limited bandwidth.
  • Compatibility: RIP is compatible with many different types of routers and network devices, making it easy to integrate into existing networks.

Disadvantages of RIP :

  • Limited scalability: RIP has limited scalability, and it may not be the best choice for larger networks with complex topologies. RIP can only support up to 15 hops, which may not be sufficient for larger networks.
  • Slow convergence: While RIP is known for its fast convergence time, it can be slower to converge than other routing protocols. This can lead to delays and inefficiencies in network performance.
  • Routing loops: RIP can sometimes create routing loops, which can cause network congestion and reduce overall network performance.
  • Limited support for load balancing: RIP does not support sophisticated load balancing, which can result in suboptimal routing paths and uneven network traffic distribution.
  • Security vulnerabilities: RIP does not provide any native security features, making it vulnerable to attacks such as spoofing and tampering.
  • Inefficient use of bandwidth: RIP uses a lot of bandwidth for periodic updates, which can be inefficient in networks with limited bandwidth.


Previous Article
Next Article

Similar Reads

Difference between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP)
When dealing with network routing, it's crucial to understand the various protocols that help direct traffic across complex networks. Two significant protocols in this space are the Border Gateway Protocol (BGP) and the Routing Information Protocol (RIP). Each serves different purposes and operates under different principles. This article explores
5 min read
Routing Information Protocol (RIP) V1 & V2
Routing Information Protocol (RIP) protocol are the intradomain (interior) routing protocol which is based on distance vector routing and it is used inside an autonomous system.Routers and network links are called node. The first column of routing table is destination address. The cost of metric in this protocol is hop count which is number of netw
4 min read
What is Routing Loop and How to Avoid Routing Loop?
Routing is a procedure that helps the packet choose an optimal path to reach its destination as soon as possible. For example, a device can be a router, which is used to handle traffic within networks. Optimal network routing methods help maintain your network operating efficiently at help in some ways i.e. faster data access and preventing overloa
3 min read
Unicast Routing - Link State Routing
Prerequisite: Distance Vector Routing, Dijkstra algorithm Unicast means the transmission from a single sender to a single receiver. It is a point-to-point communication between the sender and receiver. There are various unicast protocols such as TCP, HTTP, etc. TCP is the most commonly used unicast protocol. It is a connection-oriented protocol tha
6 min read
Difference between Distance vector routing and Link State routing
Routing, a process in computer networks, is responsible for the best path to transmit data packets from one node to another, Distance Vector Routing and Link State Routing are two of the most prominent dynamic routing algorithms, they each have their own procedures for calculating routes and disseminating information about those routes throughout a
4 min read
Difference Between Classful Routing and Classless Routing
Classful and classless routing are two different ways through which the IP addresses are managed and structured in a network. Classful Routing is an older approach whereby the IP addresses are divided by fixed classes such as A, B, C, and the rest all with a preset mask. This way, the subnet mask information is not carried in routing updates and it
5 min read
Features of Enhanced Interior Gateway Routing Protocol (EIGRP)
Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco-proprietary Hybrid routing protocol that contains features of distance-vector and link-state routing protocols. It is a network layer protocol that works on protocol number 88. Some of its features are: Rapid convergence - EIGRP uses a DUAL algorithm to support rapid convergence. If a ro
4 min read
IGRP Routing Protocol
In a host network, the Interior Gateway Routing Protocol (IGRP) is a proprietary distance vector routing protocol that is used to exchange routing information. Cisco was the one who came up with the idea. The Interior Gateway Routing Protocol (IGRP) regulates the transfer of routing information among linked routers in the host network or autonomous
5 min read
Difference between Hierarchical and Flat routing protocol
1. Hierarchical Routing Protocol: Hierarchical Routing is the method of routing in networks that is based on hierarchical addressing. Most transmission control protocol, Internet protocol (TCPIP). Routing is based on two level of hierarchical routing in which IP address is divided into a network, person and a host person. Gateways use only the netw
3 min read
Optimized Link State Routing Protocol
OLSR stands for Optimized Link State Routing Protocol. In this, each node periodically floods status of its links. Each node re-broadcasts link state information received from its neighbors. Each node keeps track of link state information received from other nodes. Each node uses above information to determine next hope to each destination. It is p
6 min read
Working of Manets AODV Reactive Routing Protocol
In this article, we will discuss the overview of Manets AODV Reactive Routing Protocol and our main focus will be on Working of Manets AODV Reactive Routing Protocol. Also, will cover its routing types. Let's discuss it one by one. Prerequisite - Difference between manet and Vanet. Introduction : In this, we will discuss the overview of Manets AODV
3 min read
Hierarchical Ad-hoc Network Routing Protocol
Hierarchical State Routing Protocol(HSR) is a distributed multi-level hierarchical routing protocol that employs clustering at different levels. Clustering has various advantages in itself. A leader of the cluster is selected at each level of clustering. The benefits of this protocol are:- Reduction in routing table size Better scalabilityClusterin
2 min read
Routing Protocol Code
Routing is the process of moving packets across a network from one host to another host by using the best path from the router table. In other words, it may also be defined as the process of selecting a specific path for a traffic in a network or across multiple networks. It is performed by network layer devices in order to deliver the packet by ch
4 min read
RPL (IPv6 Routing protocol)
What is RPL (IPv6 Routing protocol)?RPL stands for Routing Protocol for Low Power and Lossy Networks for heterogeneous traffic networks. It is a routing protocol for Wireless Networks. This protocol is based on the same standard as by Zigbee and 6 Lowpan is IEEE 802.15.4 It holds both many-to-one and one-to-one communication. It is a Distance Vecto
5 min read
Distance Vector Routing (DVR) Protocol
Distance Vector Routing (DVR) Protocol is a method used by routers to find the best path for data to travel across a network. Each router keeps a table that shows the shortest distance to every other router, based on the number of hops (or steps) needed to reach them. Routers share this information with their neighbors, allowing them to update thei
5 min read
Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol used to provide redundancy in a network. Only one router is the active router while others will be in standby state i.e the standby router will be responsible for forwarding the traffic when the active router fails. Virtual Router Redundancy Protocol (VRRP) is an open standard proto
3 min read
Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
FTP (File Transfer Protocol) It is a protocol that is used to transfer or copy the file from one host to another host. But there may be some problems like different file names and different file directories while sending and receiving a files in different hosts or systems. And in FTP, a secure channel is not provided to transfer the files between t
3 min read
Difference between Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)
The main difference between the Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP) is that Serial Line Internet Protocol is the Predecessor protocol of Point-to-Point Protocol. On the other hand, Point-to-Point Protocol is the Successor protocol of Serial Line Internet Protocol. Features of SLIP: Simple: SLIP is a simple protoco
4 min read
Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) in Data Link Layer
Layer 2 or the Datalink layer provides physical addressing and access to media. It defines how data is to be formatted for transmission and how access to the network is to be controlled. It also provides error detection, ensuring data on higher layers is formatted correctly for transmission. Cisco Discovery Protocol (CDP) and Link Layer Discovery P
2 min read
Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
1. Spanning Tree Protocol (STP) : STP is also known as spanning tree protocol is a layer 2 (Data link layer) protocol, it runs on switches and bridges. The IEEE standard of STP is 802.1D. STP is a feature used to prevent loops when using redundant switches. For example, we have three switches they are all linked together and without STP a loop coul
4 min read
Difference between Stop and Wait protocol and Sliding Window protocol
Both the Stop and Wait protocol and the Sliding Window protocol are the techniques to the solution of flow control handling. The main difference between the Stop-and-wait protocol and the Sliding window protocol is that in the Stop-and-Wait Protocol, the sender sends one frame and waits for acknowledgment from the receiver whereas in the sliding wi
5 min read
Information Assurance vs Information Security
In the world of modern technologies, the security of digital information is an important aspect. Cyber-attacks and theft, exploitation and loss of data are the constant threats these days. To prevent all these, there is a variety of techniques available. But in all other ways, the two most common and used ways are information Assurance and informat
9 min read
What is Passive-Interface Command Behavior in RIP, EIGRP & OSPF?
Routing protocols specify how routers talk to each other to exchange information about routes within the same system. This communication happens by sending all or a portion of routing tables in routing-update messages to their neighbors. Passive-Interface Command Behavior in RIPWhile configuring a router, if we want to prevent an interface from par
2 min read
Configuring RIP Versions 1 and 2 in Cisco
Pre-requisite Routing Information Protocol (RIP) Routing is a process of finding a path and then sending packets across networks, the device which performs these functions is called a router. Types of Routing:  Static Routing Dynamic RoutingDynamic Routing Algorithms are based on Distance Vector or Link State routing. RIP is a Dynamic, Distance Vec
4 min read
Difference between RIP and OSPF
Among the dynamic routing protocols, RIP and OSPF are the most commonly used routing protocols for networking. RIP is necessary for the exchange of routing information between routers while OSPF is used for the same purpose but it is different from RIPE in that its function depends on the size and complexity of the network. In this article, I will
6 min read
Difference between RIP and IGRP
Routing protocols play a critical role in the process of identifying how data are to be transmitted within a given network infrastructure. Generally, the two most acknowledged distance-vector routing protocols are Routing Information Protocol (RIP) and Interior Gateway Routing Protocol (IGRP). Although both of them are meant for forwarding the data
6 min read
Difference between RIP and EIGRP
Routing protocols are used to ensure the data flows through different networks in a proper manner and as efficiently as possible. There are two well-known routing protocols in networking (EIGRP). Both IGP and routing are used to characterize optimal routes for data to flow within an AS and though they are similar in purpose they work in different w
6 min read
Fixed and Flooding Routing algorithms
In most situations, packets require multiple hops to make a journey towards the destination. Routing is one of the most complex and crucial aspects of packet-switched network design. Desirable Properties of Routing Algorithms:- Correctness and SimplicityRobustness: Ability of the network to deliver packets via some route even in the face of failure
5 min read
Difference between Transparent Bridge and Source Routing Bridge
Bridge is a device that is attached to connect two or more LANs to create continued LAN. A bridge works at data link layer of the OSI reference model. Transparent Bridge: Transparent bridge automatically maintains a routing table and update table in response to maintain changing topology. Transparent bridge mechanism consists of three mechanisms: 1
5 min read
Probabilistic shortest path routing algorithm for optical networks
Data transfer operations is a crucial aspect in case of networking and routing. So efficient data transfer operations is a must need, with minimum hardware cost (Optical Cables, WDM Network components, Decoders, Multiplexers) and also in the minimum time possible. Thus, the need is to propose an algorithm that finds the shortest path between two no
5 min read