RIP – Routing Information Protocol Explained

RIP operates using the distance-vector routing method. In distance-vector routing, routers obtain route information from directly connected neighbors, who may have learned about other networks from their own neighbors. Routers running RIP learn about destination networks from neighboring routers through broadcast message exchanges. These routers periodically broadcast all configured networks from each port, allowing devices to update their routing tables with current information.

The following image shows an example network.

RIP routing exchange process

At network initialization, routers recognize only the IP subnets present on their directly connected interfaces.

  • R1 knows that the networks 10.0.0.0/8 and 192.168.1.252/30 are available on interfaces F0/1 and S0/0.
  • R2 knows that the networks 192.168.1.252/30 and 192.168.1.248/30 are available on interfaces S0/0 and S0/1.
  • R3 knows the networks 192.168.1.248/30 and 20.0.0.0/8 are available on interfaces S0/0 and F0/1.

After initialization, routers disseminate their configured routes throughout the network using broadcast messages, known as routing updates.

Network running the RIP routing protocol

Routers receive routing updates on active interfaces and compare them with existing routing table entries to identify new IP subnets.

  • R1 receives one broadcast from router R2 and learns one new IP subnet 192.168.1.248/30.
  • R2 receives two broadcasts: one from router R1 and another from R3. From these broadcasts, R2 learns two new IP subnets: 10.0.0.0/8 and 20.0.0.0/8.
  • R3 receives one broadcast from R2 and learns one new IP subnet 192.168.1.252/30.

Routers add newly learned IP subnets and associated interfaces to their routing tables.

Routing tables after routing update

At the default 30-second interval, all routers rebroadcast their routing tables, including any new or updated information.

  • R1 broadcasts the IP subnets: 10.0.0.0/8, 192.168.1.248/30, and 192.168.1.252/30.
  • R2 broadcasts the IP subnets: 10.0.0.0/8, 20.0.0.0/8, 192.168.1.248/30 and 192.168.1.252/30.
  • R3 broadcasts the IP subnets: 20.0.0.0/8, 192.168.1.248/30, and 192.168.1.252/30.

Routers update their routing tables in response to the broadcasts they receive.

  • R1 learns about the network 20.0.0.0/8 from R2's broadcast.
  • R2 learns nothing new from R1's and R3's broadcasts.
  • R3 learns about the network 10.0.0.0/8 from R2's broadcast.

The following image shows the routing tables of all routers after these routing updates.

RIP Routing Convergence

After another 30 seconds, routers rebroadcast their routing information. At this point, all routers have learned all network routes, eliminating the need for further updates. This state is called convergence, where all routers share a consistent view of the network topology. The RIP protocol continues to broadcast routing updates even after convergence. This ongoing process allows routers to detect and adapt to subsequent changes in the network.

Selecting and calculating the optimal route

Distance-vector routing protocols use distance, defined as the accumulated metric value, and direction, represented as a vector, to identify and select the optimal route for each IP subnet. When a router operating under a distance-vector protocol learns about network routes, it acquires three key pieces of information: the destination subnet, the distance (routing protocol metric), and the vector (the link and next-hop router for that route).

RIP determines the optimal route to each destination subnet by measuring hop count. Each time a packet passes through a router, it is counted as a hop. The path with the fewest hops is selected as the optimal route. The vector indicates the direction of the destination subnet, represented by the next-hop router's interface. The following example demonstrates this concept.

Example of distance vector routing

In this network, router A has three routes to the destination network. These routes are the following.

  • The four-hops route (distance) through router B (vector)
  • The one-hop route (distance) through router F (vector)
  • The two-hop route (distance) through router G (vector)

Since the second route has the lowest hop count, router A selects it to forward all packets to the destination network.

Key Points:-

  • Distance-vector protocols do not have a mechanism for determining which neighbors they have.
  • Distance-vector protocols learn about their neighbors by receiving their broadcasts.
  • Distance-vector protocols do not perform any formal handshake or hello process with neighbors before broadcasting routing information.
  • Distance-vector protocols do not verify whether neighbors received routing updates.
  • Distance-vector protocols assume that if a neighbor misses an update, it will learn about the change in the next broadcast update.
  • RIP is a distance-vector routing protocol.
  • RIP routing protocol uses local broadcasts to share routing information.
  • RIP broadcasts routing updates every 30 seconds, regardless of whether the network has changed. Once 30 seconds have expired, routers running RIP protocol will broadcast their routing information to any devices connected to their interfaces.
  • Before sending routing updates, a router adds an initiating metric to every route it has and increments the metric of incoming routes in advertisements so listing routers can learn how far the destination network is.
  • When sending a broadcast, RIP does not care who listens and who does not.
  • After sending the broadcast, RIP does not care whether neighbors received it.
  • When a router receives routing updates, it compares them with the routes that it already has in its routing table.
  • If the update includes a route that is not present in its routing table, the router will treat it as a new route.
  • The router will add all new routes in the routing table before updating existing routes.
  • If the update has better information for any existing route, the router will replace the old entry with the new route information.
  • If the update has worse information for any existing route, the router will ignore it.
  • If the update has the same information about any existing route, the router will reset the timer for that route in the entry.

This tutorial is part of the tutorial series "RIP (Routing Information Protocol) Features, Functions, and Configurations Explained". Other parts of this series are the following.
Chapter 1  How RIP Routing works
Chapter 2  RIP – Routing Information Protocol Explained
Chapter 3  RIP Routing features and functions
Chapter 4  Routing Loops Explained with Examples
Chapter 5  Split Horizon Explained with Examples
Chapter 6  Infinity Metric and Route Poisoning Explained
Chapter 7  RIP Protocol Configuration Guide with Examples

Conclusion

Distance-vector routing protocols play a foundational role in dynamic network routing. RIP, as a distance-vector protocol, uses hop counts as its metric and periodically broadcasts updates. This approach enables routers to efficiently learn and share network paths. While RIP's simplicity facilitates configuration and understanding, it is limited in scalability and convergence speed compared to more advanced protocols. Nevertheless, RIP offers an effective introduction to the core principles of routing and network topology updates. A thorough understanding of distance-vector routing concepts provides a strong basis for exploring more complex protocols and network architectures.

ComputerNetworkingNotes CCNA Study Guide RIP – Routing Information Protocol Explained

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com