How to configure router RIPv2

The distance vector group of dynamic routing protocols includes routing information protocol (RIP). It works by routers exchanging routing data via regular broadcasts known as RIP updates. The number of routers a packet must pass through to reach a destination network is represented by the hop count, which is the primary statistic used by RIP.

Based on the changes they get, RIP routers update their routing tables, choosing routes with fewer hops. Additionally, RIP delivers triggered updates when the network topology changes and employs timers to gauge how current the routing information is.

RIP configuration

The process of configuring RIPv2Routing Information Protocol version 2 is relatively simple. There are only three steps needed:

  1. Using the router rip global configuration command to enable RIP

  2. Using the version two command to tell the router to use RIPv2

  3. Instructing RIP with one or more network commands on which networks to advertise

The last command requires a little more thought than the first two, which are both simple to understand. You can define which interfaces will take part in routing with the network command. This command takes the classful network as a parameter and enables the RIP on corresponding interfaces. Let us configure the given sample network.

Sample network
Sample network

The routers, Router1 and Router2, have subnets connected directly to them. We want to configure routes for these subnets in the network using RIP routing.

Enabling RIP on Router1

  • To enable RIP on Router1, use the router rip command in global configuration mode.

  • Use the version 2 command to set the protocol version to two in RIP configuration mode.

  • The Fa0/1 interface on the router Router1 should then be included in the routing process using the network 10.0.0.0 command. Every interface with an IP address that starts with ten will be included in the RIP process because, as you may recall, the network command accepts a classful network number as a parameter. IP addresses that start with ten are, by default, class A addresses and have the default subnet mask of 255.0.0.0.

  • You must include the link between the two routers for the routing process. This can be done by using the network 172.16.0.0 command.

Configuration on Router1 will look like this:

Router1(config)#router rip
Router1(config-router)#version 2
Router1(config-router)#network 10.0.0.0
Router1(config-router)#network 172.16.0.0
Configuration on Router1

In case another interface exists on Router1 with an IP address 120.1.0.1, it must be included in the RIP process by using the network command as well.

Enabling RIP on Router2

  • To enable RIP on Router2, you will follow the same steps. This time the included interfaces will be different.

  • The Fa0/1 interface on the router R2 should then be included in the routing process using the network 192.168.0.0 command.

  • You must have the link between the two routers for the routing process. This can be done by using network 172.16.0.0 command.

Configuration on Router2 will look like this.

Router2(config)#router rip
Router2(config-router)#version 2
Router2(config-router)#network 192.168.0.0
Router2(config-router)#network 172.16.0.0
Configuration on Router2

You should check the routes after configuring using the following command.

Router1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.1.0 is directly connected, FastEthernet0/0
C 172.16.0.0/16 is directly connected, FastEthernet0/1
R 192.168.0.0/24 [120/1] via 172.16.0.2, 00:00:25, FastEthernet0/1
Router1#
Configured routes

This command displays all the interfaces directly connected to it and those indirectly connected through a link.

Packet routing between Router1 and Router2

In the illustration, at Router1, a subnetted network is interfaced. One of the devices from that subnet wants to send a packet to a device connected to Router2. By using this router rip command, the routes are configured, and a connection is made between the two routers.

The packet moves from the sender to the router that is its default gatewayWhen a certain route is not accessible for the target IP address, a router known as a default gateway is used to forward network traffic to other networks., i.e., Router1. Then, that router looks at the receiving address and sends it to Router2 which moves the packet to the device with the given address.

Illustration of packet transferring
1 of 5

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved