RIP Lab
Basic RIP Lab.
Diagram:

Objectives:
- Connect the routers as shown.
- Assign IP addresses to interfaces as shown. For addresses not connected on links use loopback interfaces.
- Verify base connectivity.
- Verify the routing table and observe the routes.
- Enable RIPv2 on all routers.
- Verify the routing tables and observe the routes
- Set R3's interface connecting to R2 to passive.
- Using debug commands verify the passive settings is working correctly.
- Verify the routing tables and observe the changes now that R3 is not advertising routes over the link to R2.
Solution for R2 Only:
Assign IP Addresses to Interfaces as Shown
At this point it's assumed you have the knowledge to assign IP addresses to physical interfaces so we'll only go over the loopback interface here.
R2(config)#interface loopback 0 R2(config-if)#ip address 10.1.2.252 255.255.255.0
Loopback interfaces once created are automatically in an up/up state, so the no shutdown command isn't required. Interesting face, you can have up to 2147483647 loopback interfaces!
Enable RIPv2 on all Routers
R2(config)#router rip R2(config-router)#version 2 R2(config-router)#network 10.0.0.0
RIP uses classful network commands. Because all our interfaces are Class A this single network command enables RIP on all of the interfaces.
Verify the Routing Tables and Observe the Routes
R2#sh 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
10.0.0.0/24 is subnetted, 6 subnets
R 10.1.3.0 [120/1] via 10.1.129.253, 00:00:14, Ethernet0/1
C 10.1.2.0 is directly connected, Loopback0
R 10.1.1.0 [120/1] via 10.1.128.251, 00:00:07, Ethernet0/0
R 10.1.130.0 [120/1] via 10.1.129.253, 00:00:14, Ethernet0/1
[120/1] via 10.1.128.251, 00:00:07, Ethernet0/0
C 10.1.129.0 is directly connected, Ethernet0/1
C 10.1.128.0 is directly connected, Ethernet0/0As you can see we now have multiple RIP routes in the routing table as indicated by the 'R'. You can also use the command show ip route rip to view just the rip routes. You can also see the route to the 10.1.130.0/24 network has two next hop addresses, being both R1 and R3. This is because both routes are being advertised with the same metric, 1.
Set R3's Interface Connecting to R2 as Passive
By setting the passive-interface in the RIP configuration, we are disabling that interface from sending RIP updates. It will however still receive updates from the adjacent router.
R3(config-router)#passive-interface ethernet 0/1
Using Debug Commands Verify the Passive Setting is Working Correctly
R3#debug ip rip *Mar 1 00:54:39.871: RIP: sending v2 update to 224.0.0.9 via Ethernet0/0 (10.1.130.252) *Mar 1 00:54:39.871: RIP: build update entries *Mar 1 00:54:39.871: 10.1.2.0/24 via 0.0.0.0, metric 2, tag 0 *Mar 1 00:54:39.871: 10.1.3.0/24 via 0.0.0.0, metric 1, tag 0 *Mar 1 00:54:39.871: 10.1.129.0/24 via 0.0.0.0, metric 1, tag 0 !!!!! TRUNCATED !!!!!
As you follow the debug output you will notice R3 never sends a RIP update out of the passive-interface, in my lab this is interface Ethernet0/1. Another command you should be aware of for the CCNA is the show ip protocols command. The output of this command shows a wealth of information about the routing protocols running on the router. How does it apply to this part of the lab right now? You can see in the output it details and passive interfaces currently configured.
R3#sh 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 13 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
Ethernet0/0 2 2
Loopback2147483647 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Passive Interface(s):
Ethernet0/1
Routing Information Sources:
Gateway Distance Last Update
10.1.130.251 120 00:00:13
10.1.129.252 120 00:00:12
Distance: (default is 120)Verify R2's Routing Table Now That R3 Is Not Advertising Routes Over The Link To R2
R2#sh ip route
!!!!! TRUNCATED !!!!!
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
R 10.1.3.0 [120/2] via 10.1.128.251, 00:00:09, Ethernet0/0
C 10.1.2.0 is directly connected, Loopback0
R 10.1.1.0 [120/1] via 10.1.128.251, 00:00:09, Ethernet0/0
R 10.1.130.0 [120/1] via 10.1.128.251, 00:00:09, Ethernet0/0
C 10.1.129.0 is directly connected, Ethernet0/1
C 10.1.128.0 is directly connected, Ethernet0/0You'll now notice that all the RIP routes list R1 as the next hop address, including the LAN segment on R3. Using the traceroute command we can verify this:
R2#traceroute 10.1.3.253 Type escape sequence to abort. Tracing the route to 10.1.3.253 1 10.1.128.251 8 msec 12 msec 28 msec 2 10.1.130.252 16 msec 44 msec *
As a final check will use the extended ping command using the loopback interface IP from R2 as the source and the loopback interface IP on R3 as the destination
R2#ping Protocol [ip]: Target IP address: 10.1.3.253 Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y Source address or interface: loopback 0 Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.3.253, timeout is 2 seconds: Packet sent with a source address of 10.1.2.252 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/12/24 ms
You will notice that instead of entering the source IP address, I simply entered the source interface instead.
Another useful command you should be aware of it the show ip route address command. Adding the IP address which falls into one of the routes will give you more detailed information:
R2#sh ip route 10.1.3.6
Routing entry for 10.1.3.0/24
Known via "rip", distance 120, metric 2
Redistributing via rip
Last update from 10.1.128.251 on Ethernet0/0, 00:00:02 ago
Routing Descriptor Blocks:
* 10.1.128.251, from 10.1.128.251, 00:00:02 ago, via Ethernet0/0
Route metric is 2, traffic share count is 1Creating Backup Static Routes
Like some of the previous labs rather then create an entire new lab for an additional concept, I'll use this lab to demonstrate. Each route in the routing table is assigned an Administrative Distance. For connected routes this value is 0, and for static routes the value is 1. RIPv1 and 2 both have a value of 120. When you are viewing the routing table on a router you can see this listed in each route - 10.1.3.0 [120/2]. In some cases it is desirable to create backup static routes, such as in this Lab. To do that we create a static route the same way as in previous labs however we set an AD to a value higher then the routing protocol. To demonstrate we will create backup static routes on R2 and R3 for both of there LAN Segments. We will then shut down R1 to simulate a failure.
R2(config)#ip route 10.1.3.0 255.255.255.0 10.1.129.253 150
After entering this command disable RIP on R1. After doing this now watch the routing table on R2, keep refreshing it ever few seconds. Once the invalid timer is reached (180 seconds by default) the routing table will look something like this:
R2#sh ip route
!!!!! TRUNCATED !!!!!
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
R 10.1.3.0/24 is possibly down,
routing via 10.1.128.251, Ethernet0/0
C 10.1.2.0 is directly connected, Loopback0
R 10.1.1.0/24 is possibly down,
routing via 10.1.128.251, Ethernet0/0
R 10.1.130.0/24 is possibly down,
routing via 10.1.128.251, Ethernet0/0
C 10.1.129.0 is directly connected, Ethernet0/1
C 10.1.128.0 is directly connected, Ethernet0/0After another 60 seconds the routes will be flushed from the routing table, resulting in our backup static route now becoming active.
R2#sh ip route
!!!!! TRUNCATED !!!!!
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 4 subnets
S 10.1.3.0 [150/0] via 10.1.129.253
C 10.1.2.0 is directly connected, Loopback0
C 10.1.129.0 is directly connected, Ethernet0/1
C 10.1.128.0 is directly connected, Ethernet0/0Once an engineer has fixed R1 the RIP with a lower AD then our static route would then be added back to the routing table and the static route removed




