How to Configure Routing Information Protocol (RIP)

Routing Information Protocol (RIP) is a dynamic routing protocol that defines a way for routers to connect different networks using the Internet Protocol (IP) to share information about how to route traffic among these other networks.

The routing information protocol (RIP) uses hop count as a routing metric to find the best path between the source and the destination network. Hop count is the number of routers along the path between the source and destination network. The path with the lowest hop count between the source and destination is considered the best and, therefore, placed in the routing table.

RIP exchange routing updates periodically in a broadcast every 30 seconds. It broadcasts the entire routing table to its closest neighbours’ routers each time. The neighbours are the routers that are connected directly to this router.

The neighbours will pass the information on to their nearest neighbours, and so on. The routers always trust routing information received from neighbour routers. This is also known as routing on rumours. There are three versions of the routing information protocol: RIP Version 1, RIP Version 2, and RIPng.

In case of a router crash or a network connection disruption, the network discovers this because that router will not send an update to its neighbours. If the discontinued route remains for 180 seconds, the RIP router will drop that route.

RIP also prevents routing loops by limiting the hops allowed in a path from source to destination. The maximum hop count allowed for RIP is 15, and a hop count 16 is considered network unreachable.

RIP is a distance-vector routing protocol with an AD value of 120. It works on the application layer of the OSI model. RIP uses port number 520.

The RIP cannot scale extensive and complex networks. It pushes its whole routing table every 30 seconds, so it cannot converge quickly. RIP is used only due to its simplicity. RIP is primarily not used in modern networking; it is only the foundation for networking students to understand routing.

RIP Configuration

This article explains how to configure the RIP Routing protocol in detail. RIP is a Distance Vector routing protocol. Learn how to enable router RIP configuration mode and configure Routing Information Protocol routing in a Cisco router with the example in packet tracer.

Routing Information Protocol Configuration Mode

Routing Information Protocol

The figure above shows the reference topology, including its IP addresses. In the topology, all routers are configured with basic management features, and all interfaces are configured and enabled.

No dynamic and static routes are configured; therefore, we cannot access the routers remotely. We can enable RIP protocol using the router rip command, as shown below.

  • Router0(config)#router rip
  • Router0(config-router)#

The command provides access to the router configuration mode where the RIP routing settings are configured.

To eliminate and remove the RIP configuration, use the no router rip command in global configuration mode. This command immediately stops the RIP process and erases all existing RIP configurations. To display and check the router mode command, execute the question mark(?) command in router mode, as shown in the figure below.

Advertising Networks

After entering the RIP router configuration mode, it needs to know which local interfaces should use to communicate with other routers, as well as which locally connected networks it should advertise to those routers. To configure a RIP routing for a network, use the following command:

  • Router0(config-router)#network <netwowrk address>

Enter the classful network address for each directly connected network in the network address. This command enables Routing Information Protocol on all interfaces that belong to a specific network, and the associated interfaces now can also send and receive RIP updates.

The router can advertise the particular network in RIP routing updates sent to other routers every 30 seconds. If we enter the subnet in the network address parameter, the router IOS automatically converts the classless network address to a classful network address. Because RIPv1 is a classful routing protocol for IPv4.

For example, if we enter the network address 192.168.1.32, the IOS would automatically convert the 192.168.1.0 in the running configuration file without displaying any error message but instead correct the input and enter the classful network address. Following is the route advertisement configuration of this topology

  • Router0 Route Advertisement
  • Router1 Route Advertisement

Router1 has five networks to advertise after configuring IP addresses to the router interface. The following is the procedure to promote its network.

The remaining routers in the topology have one route each to advertise in this topology. We can advertise routes in the same way. The complete configuration can be viewed in the video.

Examining Default RIP Settings

To examine and show the default RIP setting, use the show ip protocols command in privileged exec mode. The figure below illustrates the output of this command on Router0 of the reference topology:

The command should display the IPv4 routing protocol settings currently configured on the router. The parameters displayed in the Figure above include the following:

  • The configured routing protocol is RIP.
  • The timer values, for example, the next routing update, are sent by R1 in 21 seconds. Invalid after 180 seconds, hold down timing and flush timing.
  • The version of RIP currently configured
  • Current route summarization state
  • Current paths and routing for the network.
  • The routing information source, including administrative distance value, is currently configured.
  • This command is also helpful to verify other routing protocols and their operation.

The other command that shows and verifies the routing protocol is the show ip route command. The command should display the Routing Information Protocol routing table. We can also verify the Routing Information Protocol configuration from show startup-config and show running-config

Enabling RIPv2

When a Routing Information Protocol is configured on a Cisco router, by default it is running RIPv1, which is displayed in the output of the show ip protocol command. However, the router can only send RIPv1 messages; we can read both RIPv1 and RIPv2 messages. A RIPv1 router ignores the RIPv2 fields in the route entry. We can enable RIPv2 using the version 2 command in router configuration mode, as shown below.

  • Router0(config-router)version 2

Now you can verify the version configuration using the show ip protocol command. The Routing Information Protocol process also includes the subnet mask in all updates, making RIPv2 a classless routing protocol. We can again switch to the version using the below command:

  • Router0(config-router)#no version 2

This command returns the router to the default setting of sending version 1 updates but listening for version 1 or version 2 updates.

Disabling Auto-Summarization

RIPv2 automatically summarizes networks at major network boundaries by default, Just like RIPv1, so we can modify the default RIPv2 behaviour using the following command:

  • Router0(config-router)#no auto-summary

This command modifies the default RIPv2 behaviour of automatic summarization. In the case of using RIPv1, the command does not affect. After executing this command, route summarization to their classful address should be disabled at boundary routers.

RIPv2 now includes all subnets with their masks in its routing updates. The show ip protocols display and state that automatic network summarization is ineffective. It is essential to enable RIPv2 before automatic summarization is disabled.