RIPv1 Basic Configuration


RIPv1 is the oldest version of RIP (Routing Information Protocol). It is a simple distance vector protocol, which you can use it on routers that do not support other routing protocols such as RIPv2, EIGRP, and OSPF (these protocols are part of the CCNA syllabus).
RIPv1 sends routes without their subnet masks. It is the function of the router receiving the RIP route to set a subnet mask for it. In the coming paragraphs, we will discuss the process of sending RIPv1 updates.
Before discussing how RIP sends updates, let us see how to calculate the major network IP address of a specific subnet IP address w.x.y.z. The process is simple, and we have three cases:

  • First case: if the subnet IP address belongs to Class A then the major network is w.0.0.0.
  • Second case: if the subnet IP address belongs to Class B then the major network is w.x.0.0.
  • Third case: if the subnet IP address belongs to Class C then the major network is w.x.y.0.

Assume that a RIP-enabled Router wants to advertise a subnet X out of an interface Y. Then:

  • If X’s major network does not match Y’s major network, then the router will send the major instead of the subnet IP address. This behavior is called autosummarization.
  • If X’s major network matches Y’s major network and X’s subnet mask matches Y’s subnet mask, then the router will send subnet IP address.
  • If X’s major network matches Y’s major network and X’s subnet mask does not match Y’s subnet mask, then the router will not send subnet IP address unless the subnet mask is equal to /32.

Now, let’s discuss the following network topology.

RIPv1 Basic Configuration

R1 will send the following routes to R2:

  • 10.0.0.0 instead of 10.10.10.0 because the major network of 10.10.10.0 does not match the major network of the interface Serial 1/2.
  • 140.1.1.0 because its major network and subnet mask match those of the interface Serial 1/2.


R2#show ip route
Codes: 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
i - IS-IS, su - IS-IS summary, 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

140.1.0.0/16 is variably subnetted, 3 subnets, 2 masks
C 140.1.12.0/24 is directly connected, Serial1/1
R 140.1.1.0/24 [120/1] via 140.1.12.1, 00:00:04, Serial1/1
C 140.1.23.0/28 is directly connected, FastEthernet0/0
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, FastEthernet0/1
R 10.0.0.0/8 [120/1] via 140.1.12.1, 00:00:04, Serial1/1
R2#

R2 will advertise to R1 the route 20.0.0.0 instead of 20.20.20.0 because the major network of 20.20.20.0 does not match the major network of the interface Serial 1/1.
R2 will not send the subnet 140.1.23.0 because its major network match the major network of the interface Serial 1/1 and its subnet mask does not match the subnet mask of the interface Serial 1/2.


R1#show ip route
Codes: 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
i - IS-IS, su - IS-IS summary, 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

140.1.0.0/24 is subnetted, 2 subnets
C 140.1.12.0 is directly connected, Serial1/2
C 140.1.1.0 is directly connected, FastEthernet0/0
R 20.0.0.0/8 [120/1] via 140.1.12.2, 00:00:07, Serial1/2
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, FastEthernet0/1
R1#


Unlike other routing protocols such as RIPv2, EIGRP, and OSPF, the subnet mask associated with each RIPv1 route is calculated at the destination router (the router that receives the RIPv1 update). Let us say that a RIPv1-enabled router received a subnet X on an interface Y. The rules of calculating the subnet mask are as follow:

  • If X’s major network does not match Y’s major network, then the router will choose the subnet mask (/8 for Class A, /16 for Class B, or /24 for Class C) associated with the IP address Class of this route. However, if the route X is not a classful IP address, then the router will set its subnet mask to the value of /32.
  • If X’s major network matches Y’s major network, then the router will apply the subnet mask of the interface Y. However, if the route X is a host IP address, then the router will set its subnet mask to the value of /32

Note that a destination router will ignore the subnet X if X’s major network does not match Y’s major network, and the router’s routing table includes a subnet having the same major network of X and learned from a different interface other than Y.

Now, let us go back to our network diagram and discuss how R1 and R2 will set the subnet masks for the received RIPv1 routes.

  • R2 will set the subnet mask of the route 10.0.0.0 to /8 because its major network does not match the major network of the interface Serial 1/1 and belongs to Class A.
  • R2 will set the subnet mask of the route 140.1.1.0 to /24 (the subnet mask associated with the interface Serial1/1) because its major network matches the one of the interface Serial 1/1 and 140.1.1.0 is not a host address.
  • R1 will set the subnet mask of the route 20.0.0.0 to /8 because its major network does not match the major network of the interface Serial 1/2 and belongs to Class A.

In the coming paragraphs, you will see how to enable RIPv1 according to the network diagram above. To configure RIPv1, you need at least two commands: router rip and network.

The router rip command enables the RIP process globally on the router. In addition, this command instructs the router to send RIPv1 updates and accept both RIPv1 and RIP2 updates. To enable RIPv1 natively on the router, you must use the version command like this:
router rip
version 1

The network command has two roles:

  • Instruct the router to advertise all the subnets directly connected and having the major network specified in the command.
  • Instruct the router to send RIP updates over all the interfaces having the major network specified in the command.

The syntax applied to the network command is network ip_address, where ip_address is a major network. For example, assume that you want to advertise the subnet 166.2.3.0/24. Therefore, you will not type in router’s CLI network 166.2.3.0. Instead, you will enter network 166.2.0.0 because 166.2.0.0 is the major network of the subnet 166.2.3.0/24. However, even if your enter network 166.2.3.0, the router will change it to network 166.2.0.0 in the configuration file on some IOS versions.

Now, I will show you how to configure each router according to the network diagram:

R1:
router rip
network 144.1.0.0
network 10.0.0.0

R2:
router rip
network 144.1.0.0
network 20.0.0.0

Finally, use the show ip route rip and show ip protocols commands in order to verify your configuration. In the coming days, I’ll upload a video that will shows the exact step to configuration the routers in the network diagram above.



Leave a Reply