Lab – Configuring Basic RIPv2

GNS3

Topology

Step 1: Configure basic settings for each router.

  • R1

R1#configure terminal
R1(config-if)#ip address 172.30.10.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int s1/0
R1(config-if)#ip add 10.1.1.1 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no shut
  • R2

R2#configure terminal
R2(config)#int fa0/0
R2(config-if)#ip address 209.165.201.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int s1/0
R2(config-if)#ip address 10.1.1.2 255.255.255.252
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int s1/1
R2(config-if)#ip address 10.2.2.2 255.255.255.252
R2(config-if)#no shut
  • R3

R3#configure terminal
R3(config)#int fa0/0
R3(config-if)#ip address 172.30.30.1 255.255.255.0
R3(config-if)#no shut
R3(config-if)#exit
R3(config)#int s1/1
R3(config-if)#ip address 10.2.2.1 255.255.255.252
R3(config-if)#clock rate 64000
R3(config-if)#no shut

Step 2: Configure RIPv2 routing.

  • On R1, configure RIPv2 as the routing protocol and advertise the appropriate networks.

R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#passive-interface fa0/0
R1(config-router)#network 10.0.0.0
R1(config-router)#network 172.30.0.0

The passive-interface command stops routing updates out the specified interface.

  • Configure RIPv2 on R2 and use the network statement to add appropriate networks and prevent routing updates on the LAN interface.

R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#passive-interface fa0/0
R2(config-router)#network 209.165.201.0
R2(config-router)#network 10.0.0.0
  • Configure RIPv2 on R3 and prevent routing updates on the LAN interface.

R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#passive-interface fa
R3(config-router)#passive-interface fa0/0
R3(config-router)#network 10.0.0.0
R3(config-router)#network 172.30.0.0
  • Configure your PCs with IP addresses and default gateways.

PC-1> ip 172.30.10.3 255.255.255.0 172.30.10.1
Checking for duplicate address...
PC1 : 172.30.10.3 255.255.255.0 gateway 172.30.10.1

PC-1>
PC-2> ip 209.165.201.2 255.255.255.0 209.165.201.1
Checking for duplicate address...
PC1 : 209.165.201.2 255.255.255.0 gateway 209.165.201.1

PC-2>
PC-3> ip 172.30.30.3 255.255.255.0 172.30.30.1
Checking for duplicate address...
PC1 : 172.30.30.3 255.255.255.0 gateway 172.30.30.1

PC-3>

Step 3: Examine current state of network.

  • The status of the two serial links can quickly be verified using the show ip interface brief command on R2.

R2#show ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            209.165.201.1   YES manual up                    up
FastEthernet0/1            unassigned      YES unset  administratively down down
Serial1/0                  10.1.1.2        YES manual up                    up
Serial1/1                  10.2.2.2        YES manual up                    up
Serial1/2                  unassigned      YES unset  administratively down down
Serial1/3                  unassigned      YES unset  administratively down down
R2#
  • From PC-1, is it possible to ping PC-2? No

PC-1> ping 209.165.201.2
209.165.201.2 icmp_seq=1 timeout
209.165.201.2 icmp_seq=2 timeout
209.165.201.2 icmp_seq=3 timeout
209.165.201.2 icmp_seq=4 timeout
209.165.201.2 icmp_seq=5 timeout

PC-1>
  • From PC-1, is it possible to ping PC-3? No

PC-1> ping 172.30.30.3
*172.30.10.1 icmp_seq=1 ttl=255 time=11.000 ms (ICMP type:3, code:1, Destination host unreachable)
*172.30.10.1 icmp_seq=2 ttl=255 time=10.000 ms (ICMP type:3, code:1, Destination host unreachable)
*172.30.10.1 icmp_seq=3 ttl=255 time=7.001 ms (ICMP type:3, code:1, Destination host unreachable)
*172.30.10.1 icmp_seq=4 ttl=255 time=10.001 ms (ICMP type:3, code:1, Destination host unreachable)
*172.30.10.1 icmp_seq=5 ttl=255 time=7.000 ms (ICMP type:3, code:1, Destination host unreachable)

PC-1>

Step 4: Verify that RIPv2 is running on the routers.

  • You can use the debug ip rip, show ip protocols, and show run commands to confirm that RIPv2 is running. The show ip protocols command output for R1 is shown below.

R1#show ip protocols
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 25 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
    Serial1/0             2     2
  Automatic network summarization is in effect
  Maximum path: 4
  Routing for Networks:
    10.0.0.0
    172.30.0.0
  Passive Interface(s):
    FastEthernet0/0
  Routing Information Sources:
    Gateway         Distance      Last Update
    10.1.1.2             120      00:00:18
  Distance: (default is 120)

R1#

When issuing the debug ip rip command on R2, what information is provided that confirms RIPv2 is running? RIP: RIP: sending v2 update to 224.0.0.9 via Serial1/1 (10.2.2.2)

Step 5: Examine the automatic summarization of routes.

  • The LANs connected to R1 and R3 are composed of discontiguous R2 displays two equal-cost paths to the 172.30.0.0/16 network in the routing table. R2 displays only the major classful network address of 172.30.0.0 and does not display any of the subnets for this network.

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

R    172.30.0.0/16 [120/1] via 10.2.2.1, 00:00:15, Serial1/1
                   [120/1] via 10.1.1.1, 00:00:16, Serial1/0
C    209.165.201.0/24 is directly connected, FastEthernet0/0
     10.0.0.0/30 is subnetted, 2 subnets
C       10.2.2.0 is directly connected, Serial1/1
C       10.1.1.0 is directly connected, Serial1/0
R2#
  • R1 displays only its own subnets for the 172.30.0.0 network. R1 does not have any routes for the 172.30.0.0 subnets on R3.

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

     172.30.0.0/24 is subnetted, 1 subnets
C       172.30.10.0 is directly connected, FastEthernet0/0
R    209.165.201.0/24 [120/1] via 10.1.1.2, 00:00:25, Serial1/0
     10.0.0.0/30 is subnetted, 2 subnets
R       10.2.2.0 [120/1] via 10.1.1.2, 00:00:25, Serial1/0
C       10.1.1.0 is directly connected, Serial1/0
R1#
  • R3 only displays its own subnets for the 172.30.0.0 network. R3 does not have any routes for the 172.30.0.0 subnets on R1.

R3#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

     172.30.0.0/24 is subnetted, 1 subnets
C       172.30.30.0 is directly connected, FastEthernet0/0
R    209.165.201.0/24 [120/1] via 10.2.2.2, 00:00:06, Serial1/1
     10.0.0.0/30 is subnetted, 2 subnets
C       10.2.2.0 is directly connected, Serial1/1
R       10.1.1.0 [120/1] via 10.2.2.2, 00:00:06, Serial1/1
R3#

Step 6: Disable automatic summarization.

  • Disable auto summarization on all routers. The no auto-summary command is used to turn off automatic summarization in RIPv2. Issue the clear ip route * command to clear the routing table.

R1(config)#router rip
R1(config-router)#no auto-summary
R1(config-router)#^Z
R1#clear ip route *
R2(config)#router rip
R2(config-router)#no auto-summary
R2(config-router)#^Z
R2#clear ip route *
R3(config)#router rip
R3(config-router)#no auto-summary
R3(config-router)#^Z
R3#clear ip route *
  • Examine the routing tables. Remember will it take some time to converge the routing tables after clearing them.

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

     172.30.0.0/16 is variably subnetted, 3 subnets, 2 masks
R       172.30.30.0/24 [120/2] via 10.1.1.2, 00:00:01, Serial1/0
R       172.30.0.0/16 [120/2] via 10.1.1.2, 00:00:01, Serial1/0
C       172.30.10.0/24 is directly connected, FastEthernet0/0
R    209.165.201.0/24 [120/1] via 10.1.1.2, 00:00:01, Serial1/0
     10.0.0.0/30 is subnetted, 2 subnets
R       10.2.2.0 [120/1] via 10.1.1.2, 00:00:01, Serial1/0
C       10.1.1.0 is directly connected, Serial1/0
R1#
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

     172.30.0.0/16 is variably subnetted, 3 subnets, 2 masks
R       172.30.30.0/24 [120/1] via 10.2.2.1, 00:00:02, Serial1/1
R       172.30.0.0/16 [120/1] via 10.2.2.1, 00:02:12, Serial1/1
R       172.30.10.0/24 [120/1] via 10.1.1.1, 00:00:03, Serial1/0
C    209.165.201.0/24 is directly connected, FastEthernet0/0
     10.0.0.0/30 is subnetted, 2 subnets
C       10.2.2.0 is directly connected, Serial1/1
C       10.1.1.0 is directly connected, Serial1/0
R2#
R3#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

     172.30.0.0/24 is subnetted, 2 subnets
C       172.30.30.0 is directly connected, FastEthernet0/0
R       172.30.10.0 [120/2] via 10.2.2.2, 00:00:16, Serial1/1
R    209.165.201.0/24 [120/1] via 10.2.2.2, 00:00:16, Serial1/1
     10.0.0.0/30 is subnetted, 2 subnets
C       10.2.2.0 is directly connected, Serial1/1
R       10.1.1.0 [120/1] via 10.2.2.2, 00:00:16, Serial1/1
R3#

Step 7: Verify connectivity.

  • From PC-1, is it possible to ping PC-2? Yes

PC-1> ping 209.165.201.2
84 bytes from 209.165.201.2 icmp_seq=1 ttl=62 time=36.505 ms
84 bytes from 209.165.201.2 icmp_seq=2 ttl=62 time=27.503 ms
84 bytes from 209.165.201.2 icmp_seq=3 ttl=62 time=33.505 ms
84 bytes from 209.165.201.2 icmp_seq=4 ttl=62 time=39.505 ms
84 bytes from 209.165.201.2 icmp_seq=5 ttl=62 time=38.505 ms

PC-1>
  • From PC-1, is it possible to ping PC-3? Yes

PC-1> ping 172.30.30.3
172.30.30.3 icmp_seq=1 timeout
84 bytes from 172.30.30.3 icmp_seq=2 ttl=61 time=46.003 ms
84 bytes from 172.30.30.3 icmp_seq=3 ttl=61 time=62.004 ms
84 bytes from 172.30.30.3 icmp_seq=4 ttl=61 time=68.004 ms
84 bytes from 172.30.30.3 icmp_seq=5 ttl=61 time=48.003 ms

PC-1>

Step 8: Configure and redistribute a default route for Internet access.

  • Configure RIPv2 on R2 in a way that does not advertise the 209.165.201.0 network.

R2(config)#router rip
R2(config-router)#no network 209.165.201.0
R2(config-router)#exit
  • From R2, create a static route to network 0.0.0.0 0.0.0.0, using the ip route command. This forwards any unknown destination address traffic to the R2 fa0/0 toward PC-2, simulating the Internet.

R2(config)#ip route 0.0.0.0 0.0.0.0 209.165.201.2
  • R2 will advertise a route to the other routers if the default-information originate command is added to its RIP configuration.

R2(config)#router rip
R2(config-router)#default-information originate
  • View the routing table on R1.

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 10.1.1.2 to network 0.0.0.0

     172.30.0.0/24 is subnetted, 2 subnets
R       172.30.30.0 [120/2] via 10.1.1.2, 00:00:19, Serial1/0
C       172.30.10.0 is directly connected, FastEthernet0/0
     10.0.0.0/30 is subnetted, 2 subnets
R       10.2.2.0 [120/1] via 10.1.1.2, 00:00:19, Serial1/0
C       10.1.1.0 is directly connected, Serial1/0
R*   0.0.0.0/0 [120/1] via 10.1.1.2, 00:00:19, Serial1/0
R1#

Keyword

show ip route , RIPv2 , passive-interface , router rip , LAN interface , yaser rahmati , cisco , ccna , default gateway , ip address , show ip interface brief , subnet , یاسر رحمتی

Last updated