How to configure Routing Information Protocol RIPv1

Routing involves determining a path to transmit a packet from its source to the destination across a network. A router designed for this purpose is employed to identify the route. There are two main types of routing.

  • Static routing: In this method, routers utilize manually configured entries in the routing table, a task typically performed by a network administrator.

  • Dynamic routing: Routers dynamically select paths based on real-time changes in the logical network layout. Dynamic routing algorithms rely on distance vector or link state algorithms.

What is RIP?

Routing Information Protocol (RIP) is a dynamic routing protocol that employs a distance vector approach. Some key characteristics of RIPv1 include:

  • RIPv1 is class-full, eliminating the need to specify a network mask.

  • Configuration of RIPv1 is straightforward, requiring only one parameter: the network address of directly connected networks.

  • In RIPv1, routing tables are exchanged every 30 seconds, delaying any network changes within that timeframe to be updated. Additionally, RIPv1 uses broadcast to exchange routing tables, increasing network overhead for unnecessary nodes.

  • It’s important to note that RIPv1 has a maximum hop count of 15. Therefore, if a network is 16 hops or more away, RIPv1 cannot reach it.

Configuring RIP v1

We will use a sample network topology to exemplify the configuration commands.

Sample Network
Sample Network

Note: When configuring RIPv1, a general guideline is to identify all networks directly linked to the routers. In RIPv1, the process involves specifying solely the network address of directly connected networks on each router to establish a route.

In this example, there are three LANs and two Routers. We need to configure RIPv1 on both routers for full connectivity. Intuitively, the first step is to find the directly connected networks. We need a network simulator like NS2 (Network Simulator version 2) to perform the following commands. Create the above network in the network simulator.

Enabling RIP on Router1

Let’s start by configuring Router1. This specific router has two directly connected networks. We want these networks to be advertised by RIP, and this is how we do it:

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

  • By default, it uses version 1.

  • The interface gig1/0 on Router1 should be included in the routing process using the network 192.168.2.0 command.

  • We must include the link between the two routers for the routing process. This can be done by using the network 192.168.1.0 command. The interface gig1/1 on Router1 is used for this link.

Router1> enable
Router1# configure terminal
Router1(config)#router rip
Router1(config-router)#network 192.168.1.0
Router1(config-router)#network 192.168.2.0
Configuration of Router 1

If there are additional LANs connected to other interfaces of Router1, ensure to incorporate them into the RIP process by using the network command for each respective interface.

Enabling RIP on Router2

Now configure Router2. This specific router also has two directly connected networks. We want these networks to be advertised by RIP, and this is how we do it:

  • To enable RIP on Router2, follow the same steps. The interface gig1/0 on Router2 should be included in the routing process using the network 192.168.3.0 command.

  • We must have the link between the two routers for the routing process. This can be done by using network 192.168.1.0 command. The interface gig1/1 on Router2 is used for this link.

Router2> enable
Router2# configure terminal
Router2(config)#router rip
Router2(config-router)#network 192.168.1.0
Router2(config-router)#network 192.168.3.0
Configuration of Router 2

After establishing these routes, it is recommended to confirm their accurate configuration. To achieve this, examine the routing tables on each router to ensure the inclusion of RIPv1 routes, which will be indicated by an R in the routing table. The command to display the routing table is as follows:

show ip route
Showing the routing table

Let’s review the routing table on the router 1.

Router>enable
Router#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
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, GigabitEthernet0/1
L 192.168.2.1/32 is directly connected, GigabitEthernet0/1
R 192.168.3.0/24 [120/1] via 192.168.1.2, 00:00:28, GigabitEthernet0/0
Router 1’s Routing Table (connected to LAN 1 and LAN 2 via RIP v1)

Let’s review the routing table on the router 2.

Router#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
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.2/32 is directly connected, GigabitEthernet0/0
R 192.168.2.0/24 [120/1] via 192.168.1.1, 00:00:13, GigabitEthernet0/0
192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.3.0/24 is directly connected, GigabitEthernet0/1
L 192.168.3.1/32 is directly connected, GigabitEthernet0/1
Router 2’s Routing Table (connected to LAN 1 and LAN 3 via RIP v1)

Note: If a RIP router is misconfigured, it's important to note that RIPv1 routes may not appear. This is because the incorrectly configured router fails to transmit its routing table to other routers that are properly configured.

Packet routing between Router1 and Router2

Now, we will send a packet from PC1 on Router1 to PC4 on Router2. First, we need to ensure that the routers are properly configured to route the traffic between the two networks. The RIP configuration should take care of this if done correctly. To ensure we can check routing tables, we can ping PC4 from PC1. From PC1 (connected to switch 1), open the command prompt, and ping PC4 (connected to switch 2).

ping 192.168.3.4
Ping from PC1 to PC4

In case of a successful ping, we can receive a message similar to the following message:

Request timed out.
Reply from 192.168.3.4: bytes=32 time<1ms TTL=126
Reply from 192.168.3.4: bytes=32 time<1ms TTL=126
Reply from 192.168.3.4: bytes=32 time<1ms TTL=126
Ping statistics for 192.168.3.4:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Successful communication

Successful communication between PC1 and PC4 relies on correct IP configurations, routing tables, and proper connectivity between the routers and switches.

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved