Understand Routing Information Protocol version 2 (RIPv2)
Configure RIPv2 on Cisco routers
Verify and troubleshoot RIPv2 routes using commands
Understand auto-summary, subnet masks, and hop count limitations
Section 1: Introduction to RIPv2
1.1 What is RIP?
RIP (Routing Information Protocol) is a distance-vector routing protocol that uses hop count as its metric.
It supports a maximum of 15 hops (16 is considered unreachable).
RIP updates are broadcasted every 30 seconds.
1.2 Differences Between RIPv1 and RIPv2
Feature
RIPv1
RIPv2
Routing Type
Distance Vector
Distance Vector
Updates
Broadcasts (255.255.255.255)
Multicast (224.0.0.9)
Subnet Mask
Classful (No CIDR)
Classless (Supports VLSM)
Authentication
No
Yes
Auto-summary
Always enabled
Can be disabled
Section 2: Practical Network Topology
2.1 Network Diagram
For this lab, we will use three routers connected as follows:
R1 (Router 1) is connected to R2 via network 192.168.1.0/24
R2 (Router 2) is connected to R3 via network 192.168.2.0/24
R3 (Router 3) is connected to a LAN 192.168.3.0/24
2.2 IP Addressing Scheme
Router
Interface
IP Address
Subnet Mask
R1
Fa0/0
192.168.1.1
255.255.255.0
R2
Fa0/0
192.168.1.2
255.255.255.0
R2
Fa1/0
192.168.2.1
255.255.255.0
R3
Fa1/0
192.168.2.2
255.255.255.0
R3
Fa0/0
192.168.3.1
255.255.255.0
Section 3: Configuring RIPv2 Step by Step
3.1 Configuring R1
R1#configure terminal
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 192.168.1.0
R1(config-router)#no auto-summary
R1(config-router)#exit
R1(config)#exit
R1#write memory
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]
Building configuration...
[OK]
R1#
3.2 Configuring R2
R2#configure terminal
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 1/0
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 192.168.1.0
R2(config-router)#network 192.168.2.0
R2(config-router)#no auto-summary
R2(config-router)#^Z
R2#write memory
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]
Building configuration...
[OK]
R2#
3.3 Configuring R3
R3#configure terminal
R3(config)#interface fastEthernet 1/0
R3(config-if)#ip address 192.168.2.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.3.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#network 192.168.2.0
R3(config-router)#network 192.168.3.0
R3(config-router)#no auto-summary
R3(config-router)#^Z
R3#wr memory
*Mar 21 12:15:07.291: %SYS-5-CONFIG_I: Configured from console by console
R3#wr memory
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]
Building configuration...
[OK]
R3#
3.4 Configuring PC1
PC1> ip 192.168.3.100/24 192.168.3.1
Checking for duplicate address...
PC1 : 192.168.3.100 255.255.255.0 gateway 192.168.3.1
PC1> show ip
NAME : PC1[1]
IP/MASK : 192.168.3.100/24
GATEWAY : 192.168.3.1
DNS :
MAC : 00:50:79:66:68:00
LPORT : 20018
RHOST:PORT : 127.0.0.1:20019
MTU : 1500
PC1> save
Saving startup configuration to startup.vpc
. done
PC1>
Section 4: Verifying RIP Configuration
4.1 Check RIP Routing Table
R1
R1#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
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, H - NHRP, l - LISP
+ - replicated route, % - next hop override
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, FastEthernet0/0
L 192.168.1.1/32 is directly connected, FastEthernet0/0
R 192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:26, FastEthernet0/0
R 192.168.3.0/24 [120/2] via 192.168.1.2, 00:00:26, FastEthernet0/0
R1#
R2
R2#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
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, H - NHRP, l - LISP
+ - replicated route, % - next hop override
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, FastEthernet0/0
L 192.168.1.2/32 is directly connected, FastEthernet0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, FastEthernet1/0
L 192.168.2.1/32 is directly connected, FastEthernet1/0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:06, FastEthernet1/0
R2#
R3
R3#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
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, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:09, FastEthernet1/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, FastEthernet1/0
L 192.168.2.2/32 is directly connected, FastEthernet1/0
192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.3.0/24 is directly connected, FastEthernet0/0
L 192.168.3.1/32 is directly connected, FastEthernet0/0
R3#
4.2 Check RIP Neighbors
On any router, run:
R1#show ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 21 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
192.168.1.0
Routing Information Sources:
Gateway Distance Last Update
192.168.1.2 120 00:00:11
Distance: (default is 120)
R1#
It should display RIP version, advertised networks, and neighboring routers.
4.3 Test Connectivity with Ping
PC1> ping 192.168.3.1
84 bytes from 192.168.3.1 icmp_seq=1 ttl=255 time=9.450 ms
84 bytes from 192.168.3.1 icmp_seq=2 ttl=255 time=3.453 ms
^C
PC1> ping 192.168.2.2
84 bytes from 192.168.2.2 icmp_seq=1 ttl=255 time=8.042 ms
84 bytes from 192.168.2.2 icmp_seq=2 ttl=255 time=11.715 ms
^C
PC1> ping 192.168.2.1
84 bytes from 192.168.2.1 icmp_seq=1 ttl=254 time=32.311 ms
84 bytes from 192.168.2.1 icmp_seq=2 ttl=254 time=17.046 ms
^C
PC1> ping 192.168.1.2
84 bytes from 192.168.1.2 icmp_seq=1 ttl=254 time=31.433 ms
84 bytes from 192.168.1.2 icmp_seq=2 ttl=254 time=29.970 ms
^C
PC1> ping 192.168.1.1
84 bytes from 192.168.1.1 icmp_seq=1 ttl=253 time=24.300 ms
84 bytes from 192.168.1.1 icmp_seq=2 ttl=253 time=26.792 ms
^C
PC1>
If successful, RIP is working correctly.
4.4 Debugging RIP Updates
To monitor RIP updates in real-time, use:
R1#debug ip rip
RIP protocol debugging is on
R1#
*Mar 21 12:26:09.263: RIP: received v2 update from 192.168.1.2 on FastEthernet0/0
*Mar 21 12:26:09.263: 192.168.2.0/24 via 0.0.0.0 in 1 hops
*Mar 21 12:26:09.267: 192.168.3.0/24 via 0.0.0.0 in 2 hops
R1#
To disable debugging:
R1# undebug all
Keywords
RIPv2, RIP configuration, Cisco router, routing protocol, distance vector, hop count, subnet mask, auto-summary, network topology, RIP troubleshooting, show ip route, show ip protocols, debug ip rip, routing table, multicast updates, VLSM support, classless routing, RIP authentication, router configuration, Cisco Packet Tracer, سیسکو