Network Requirements
- RIPv2 runs between Device1 and Device2 for route interaction.
Network Topology
Figure 5-1 Networking for Configuring the RIP Version
Configuration Steps
Step 1: Create VLANs, and add ports to the required VLANs. (Omitted)
Step 2: Configure IP addresses for the ports. (Omitted)
Step 3: Configure RIP.
#Configure Device1.
Device1#configure terminal
Device1(config)#router rip
Device1(config-rip)#network 1.0.0.0
Device1(config-rip)#network 100.0.0.0
Device1(config-rip)#exit
|
#Configure Device2.
Device2#configure terminal
Device2(config)#router rip
Device2(config-rip)#network 1.0.0.0
Device2(config-rip)#network 50.0.0.0
Device2(config-rip)#exit
|
#Query the routing table of Device1.
Device1#show ip route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management, E - IRMP, EX - IRMP external
C 1.0.0.0/24 is directly connected, 00:23:06, vlan3
R 50.0.0.0/8 [120/1] via 1.0.0.2, 00:13:26, vlan3
C 100.0.0.0/24 is directly connected, 00:23:06, vlan2
C 127.0.0.0/8 is directly connected, 76:51:00, lo0
#Query the routing table of Device2.
Device2#show ip route
Codes: C - Connected, L - Local, S - static, R - RIP, B BGP, i-ISIS
U Per-user Static route
O - OSPF, OE-OSPF External, M - Management, E - IRMP, EX IRMP external
C 1.0.0.0/24 is directly connected, 00:23:06, vlan2
C 50.0.0/24 is directly connected, 00:23:06, vlan3
R 100.0.0.0/8 [120/1] via 1.0.0.1, 00:13:26, vlan2
C 127.0.0.0/8 is directly connected, 76:51:00, lo0
According to the routing table, the route advertised by the device uses an 8-bit natural mask.
Step 4: Configure the RIP version.
#Configure Device1.
Device1(config)#router rip
Device1(config-rip)#version 2
Device1(config-rip)#exit
|
#Configure Device2.
Device2(config)#router rip
Device2(config-rip)#version 2
Device2(config-rip)#exit
|
Step 5: Check the result.
#Query the routing table of Device1.
Device1#show ip route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management, E - IRMP, EX - IRMP external
C 1.0.0.0/24 is directly connected, 00:23:06, vlan3
R 50.0.0.0/24 [120/1] via 1.0.0.2, 00:13:26, vlan3
C 100.0.0.0/24 is directly connected, 00:23:06, vlan2
C 127.0.0.0/8 is directly connected, 76:51:00, lo0
#Query the routing table of Device2.
Device2#show ip route
Codes: C - Connected, L - Local, S - static, R - RIP, B BGP, i-ISIS
U Per-user Static route
O - OSPF, OE-OSPF External, M - Management, E - IRMP, EX IRMP external
C 1.0.0.0/24 is directly connected, 00:23:06, vlan2
C 50.0.0/24 is directly connected, 00:23:06, vlan3
R 100.0.0.0/24 [120/1] via 1.0.0.1, 00:13:26, vlan2
C 127.0.0.0/8 is directly connected, 76:51:00, lo0
According to the routing table, the route advertised by the device uses a 24-bit accurate mask.