Routing Information Protocol (RIP)

Learn via video courses
Topics Covered

Overview

The RIP (Routing Information Protocol) is a distance-vector routing protocol. Routers that use the distance-vector protocol send all or a portion of their routing tables to their neighbors in routing-update messages. The Routing Information Protocol employs a distance vector algorithm to determine which path a packet should take to reach its destination. Each RIP router maintains its routing table, which lists all the destinations the router knows how to reach. In every 30 seconds, each router broadcasts its whole routing table to its closest neighbors.

Introduction to Routing Information Protocol (RIP)

Routing Information Protocol (RIP) is a dynamic routing protocol that finds the optimum path between the source and destination networks by using hop count as a routing metric. Routing Information protocol is a distance vector routing protocol with an AD value of 120 that operates on the OSI model's Network layer. RIP operates on port 520.

Note:- Administrative distance (AD) is a number of arbitrary units assigned to dynamic, static, and directly connected routes. In routers, the value is used to rank routes from most favored (low AD value) to least preferred (high AD value) (high AD value). When the Ad value is low, the protocol is more trustworthy than when the Ad value is high.

routing-information-protocol

In 1981, the Routing Information Protocol (RIP) was first developed as GWINFO in the Xerox Network Systems (XNS) protocol suite for the Xerox PARC Universal Protocol. RIP, first described in RFC 1058 in 1988, has a reputation for being simple to set up and use on small networks.

You can set up the hosts to be part of a RIP network using RIP. This sort of routing is low-maintenance and automatically reconfigures routing tables when your network changes or communication fails. The System solution now supports RIPv2 so that you can send and receive RIP packets to update routes throughout your network.

Open Shortest Path First (OSPF) routing has supplanted RIP as the most extensively utilized Interior Gateway Protocol(IGP) in the workplace. RIP has been replaced primarily because of its simplicity and inability to scale to large and complex networks. Border gateway protocol (BGP) is another distance vector protocol that is presently utilized on the Internet to convey routing information between autonomous devices.

A Few Important Points before Understanding the Structure of the Packet

  1. Since RIP is built on a distance vector-based approach, we can think of the entire structure as a graph, in which each node represents routers and links represent networks.
  2. The number of hops required to reach the destination is the cost metric. The number of hops available would determine the cost of a network. The number of networks that must be traversed to reach the destination is called the hop count.
  3. A routing table's first column is the destination, sometimes referred to as a network address.
  4. Since infinite in RIP is specified as 16, it can be applied to smaller networks or autonomous systems. As 16 is infinity, the greatest number of hops that RIP may have is 15, hence it should not contain more than 15 hops.
  5. The router's address, which must be used to send the packet to its destination, is listed in the next column.

How is the Hop Count Determined?

The hop count can be defined as the number of routers between the source and destination networks. The path with the least hops is considered the optimal route to a network, so it is added to the routing table. RIP avoids routing loops by minimizing the number of hops between the source and destination. The maximum hop count for Routing Information Protocol is 15, and a hop count of 16 indicates that the network is inaccessible.

In the diagram below, when router 1 sends a packet to router 2, it counts as one hop. Similar to this, when the packet is forwarded from router 2 to router 3, it counts as 2 hops, and when it is forwarded from router 3 to router 4, it counts as 3. Similarly, RIP can accommodate a maximum of 15 hops, so 16 routers can be configured in a RIP.

hop-count

RIP Message Format

rip-message-format

  • Command:- For requests or responses, this 8-bit field is used. The request has a value of 1, while the response has a value of 2.
  • Version:- The version in this context refers to the protocol version that we are utilizing. Assuming we are using version 1 of the protocol, we enter 1 in this box.
  • Reserved:- It is a reserved field, so it is concatenated with zeroes.
  • Family:- This field has 16 bits. Since we use the TCP/IP family, we entered the value 2 in this box.
  • Network Address:- It is specified as a 14-byte field. If we utilize IPv4, we use 4 bytes; the remaining 10 are zeros.
  • Distance:- The hop count, or the number of hops required to reach the destination, is specified in the distance field.

Working of RIP

The RIP protocol is based on the distance vector routing algorithm, one of several widely used routing algorithms that routers employ to dynamically determine the cost or metric of each potential path via the internetwork. As RIP for IP and RIP for IPX, respectively, RIP has been implemented for both IPX/SPX and TCP/IP internetworks. RIP is made for intradomain routing (routing within a routing domain).

The Routing Information Protocol employs a distance vector algorithm to determine which path a packet should take to reach its destination. Each RIP router maintains its routing table, which lists all the destinations the router knows how to reach. In every 30 seconds, each router broadcasts its whole routing table to its closest neighbors. Neighbors in this context are other routers to whom a router is directly connected. Then the information is passed on to the neighbors' nearest neighbors, and so on until all RIP hosts in the network are aware of the same routing paths.

A router will update its table entry with the length and next-hop address of the shorter path if it receives an update on a route and the new path is shorter. If the new path is longer than the previous path, it will wait for a "hold-down" period to check if subsequent updates also take the longer path into account. If the new, longer path is stable, it will just update the table entry. Suppose a router fails or a network connection is lost. In that case, the network learns about it because the router ceases delivering updates to its neighbors or stops sending and receiving updates along the severed connection. Suppose a given route in the routing table isn't updated for six consecutive update cycles (180 seconds). In that case, a RIP router will discard that route and notify the rest of the network via its periodic updates.

Features of Routing Information Protocol (RIP)

Let's look at the various features of the Routing Information Protocol.

  1. Periodically, network updates are exchanged.
  2. Routing information is constantly broadcast.
  3. In updates, full routing tables are sent.
  4. Routers always trust routing information received from neighboring routers. It's sometimes referred to as "routing on rumors."

Versions of Routing Information Protocol (RIP)

RIP v1RIP v2RIPng
It does not support the authentication of updated messages.It supports authentication of updated messages-
It was established in 1988.It was established in 1988.-
RIP v1 sends an update via broadcast.RIP v2 sends an update as multicast.RIPng sends an update as multicast.
It broadcast at 255.255.255.255It multicast at 224.0.0.9Multicast at FF02::9 (RIPng can only be used on IPv6 networks.)
It is a Classful Routing Protocol since its routing updates do not include subnet mask information.It is a Classless Routing Protocol since it includes subnet mask information in its routing updates.It is also a Classless routing protocol.

Configuration of RIP

The Routing Information Protocol setting procedure is straightforward. After assigning IP addresses to the involved computers and router interfaces, developers can send the router RIP command, which instructs the router to enable RIP, followed by the network command, which allows users to specify which networks they want to interact with. The specification is only required for the networks physically connected to the router.

The users can perform the following actions by configuring any port.

  • Send packets formatted for each RIP version to the RIPv1 broadcast address.
  • Receive packets in a variety of formats.
  • Prevent the transmission or reception of RIP packets.

routing-information-protocol

RIP always utilizes the shortest path to transmit the packets from source to destination. As shown in the above figure RIP utilizes path S->C->D instead of S->A->B->D.

RIP Timers

Update Timer: 30 seconds

The routers operating RIP typically exchange routing information every 30 seconds by default. The routers periodically swap over their routing tables using an Update timer.

Invalid Timer: 180 seconds

The RIP invalid timer is 180 seconds, indicating that if the router is unplugged from the network or a link fails, the neighbor router will wait 180 seconds before accepting the update. It will label the route unreachable if it does not receive the update within 180 seconds.

Hold Down Timer: 180 seconds

This is the time the router waits for a neighbor router to respond. If the router fails to react within a specific time, it is ruled dead. It is set to 180 seconds by default.

Flush Time: 240 seconds

The period after which the route's entry will be flushed if it does not respond within the default flush time. By default, the flush time is set to 60 seconds. This timer begins once the route is declared invalid and ends after 60 seconds. So the total time in this process is 180 + 60 = 240 seconds.

Advantages of RIP

  • Almost all routers are guaranteed to be supported.
  • It encourages load balancing.
  • Feasible configuration.
  • The CPU utilization is less.
  • Predominantly loop-free.
  • It is less complex.
  • RIP is easy to understand.

Disadvantages of RIP

  • It sends routing updates to the entire network, which generates a lot of traffic. The routing table in RIP is updated every 30 seconds. Whenever any update occurs, a copy of it is sent to all neighbors except the one who caused the update. Sending updates to all neighbors generates a lot of traffic. This is referred to as a split-horizon rule.
  • The RIP does not support the VLSM(Variable Length Subnet Mask) because it is a classful routing mechanism. The classful routing protocol excludes the subnet mask from routing updates.
  • It is confronted with the issue of slow convergence. When a router or connection fails, it can take minutes to stabilize or take an alternate path; this is known as slow convergence.
  • RIP supports a maximum of 15 hops, meaning we can configure a RIP with a maximum of 16 hops.
  • The administrative distance is 120. When the Ad value is low, the protocol is more trustworthy than when the Ad value is high. Because the RIP protocol has the greatest Ad value, it is less dependable than the other routing protocols.

Conclusion

  • The RIP (Routing Information Protocol) is a distance-vector routing protocol.
  • Routing Information Protocol is a dynamic routing protocol that finds the optimum path between the source and destination networks by using hop count as a routing metric.
  • In 1981, the Routing Information Protocol (RIP) was first developed as GWINFO in the Xerox Network Systems (XNS) protocol suite for the Xerox PARC Universal Protocol.
  • The hop count can be defined as the number of routers between the source and destination networks. The path with the least hops is considered the optimal route to a network, so it is added to the routing table.
  • The message format of a RIP includes the following components:
    • Command
    • Version
    • Reserved
    • Family
    • Network Address
    • Distance
  • There are four timers in the RIP
    • Update Timer
    • Invalid Timer
    • Hold Down Timer
    • Flush Time
  • The three versions of the RIP protocol are:
    • RIP v1
    • RIP v2
    • RIPng
  • Almost all routers are guaranteed to support RIP, which is one of the significant advantages of the RIP protocol. But RIP sends routing updates to the entire network, which generates a lot of traffic and makes the network sluggish.