Lab Objective
The objective of this lab exercise is for you to learn how to implement IP SLA functionality on a Cisco router.
Lab Purpose:
Configuring and applying the IP SLA (Service Level Agreement) protocol is a fundamental skill for any network administrator in order to monitor reachability of objects and based on that reachability perform changes in the routing table of the router. As a Cisco engineer, as well as in the Cisco CCNA exam, you will be expected to know how to implement IP SLA functionality.
Certification Level:
This lab is suitable for CCNA and ICND2 certification exam preparation.
Lab Difficulty:
This lab has a difficulty rating of 8/10.
Readiness Assessment:
When you are ready for your certification exam, you should complete this lab in no more than 10 minutes.
Lab Topology:
Please use the following topology to complete this lab exercise:
Task 1:
Configure hostnames on R1, R2, and R3 as illustrated in the topology.
Task 2:
Configure IP addresses on the Gig0/0 and Gig0/1 interfaces of R1, R2, and R3 as illustrated in the topology.
Note: R1 will always have the .1 IP in each of its Gig interfaces.
Note: R2 and R3 will have the .1 IP in its Gig0/1 interfaces.
Task 3:
Configure two default static routes on R1:
- The first one (primary one) will go to R2 with an administrative distance of 1; and
- The secondary one will go to R3 with an administrative distance of 254.
Based on this, all traffic going to an unknown destination will be sent via R2.
Task 4:
Create an IP SLA monitor process numbered 17, and make sure that you ping the Internet host of 4.2.2.2 to perform the monitoring. Also, make sure that the IP SLA starts running now and that it will run forever.
NOTE: In Cisco IOS software versions 12.3(14)T, 12.4, 12.4(2)T, and 12.2(33)SXH, IP SLA is configured using the ip sla monitor [operation number] global configuration command. In Cisco IOS 12.4(4)T and later, IP SLA is configured using the ip sla [operation number] global configuration command.
Task 5:
Create a track object that makes reference to this IP SLA process and attach it to the primary default route to monitor the state of this link (make sure that you only have the primary tracked route and the secondary route in your routing table).
Task 6:
Check the state of the IP SLA by running the following commands:
- show ip sla monitor statistics
- show ip sla monitor operational-state
- show ip route
Note: You should see the secondary default route as the route being used because IP SLA is failing, as 4.2.2.2 is not responding to the ICMP packets.
Let’s create a Loopback interface numbered 1 in R2 with an IP of 4.2.2.2/24 to change this:
R2(config)#interface loopback1 R2(config-if)ip address 4.2.2.2 255.255.255.0
Run the same show commands and check how the results change as now 4.2.2.2 exists and it’s reachable.
Configuration and Verification
Task 1:
For reference information on configuring hostnames, please refer to earlier labs.
Task 2:
R1#conf t Enter configuration commands, one per line. End with CTRL/Z. R1(config)#int gig0/0 R1(config-if)#no shutdown R1(config-if)#ip add 192.168.10.1 255.255.255.252 R1(config-if)#end R1(config)#int gig0/1 R1(config-if)#no shutdown R1(config-if)#ip add 192.168.20.1 255.255.255.252 R1(config-if)#end R1# R2(config)#int gig0/0 R2(config-if)#no shutdown R2(config-if)#ip add 192.168.10.2 255.255.255.252 R2(config-if)#end R2(config)#int gig0/1 R2(config-if)#no shutdown R2(config-if)#ip add 192.168.30.1 255.255.255.252 R2(config-if)#end R2# R3(config)#int gig0/0 R3(config-if)#no shutdown R3(config-if)#ip add 192.168.20.2 255.255.255.252 R3(config-if)#end R3(config)#int gig0/1 R3(config-if)#no shutdown R3(config-if)#ip add 192.168.40.1 255.255.255.252 R3(config-if)#end R3#
Task 3:
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2 R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.20.2 254
Task 4:
R1(config)#ip sla monitor 17 R1(config)#type echo protocol ipIcmpEcho 4.2.2.2 R1(config)#ip sla monitor schedule 17 life forever start-time now
Task 5:
R1(config)#track 10 rtr 17 reachability R1(config)#no ip route 0.0.0.0 0.0.0.0 192.168.10.2 R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2 track 10
Task 6:
R1#sh ip sla monitor statistics Round trip time (RTT) Index 17 Latest RTT: NoConnection/Busy/Timeout Latest operation start time: *00:26:03.323 UTC Fri Mar 1 2002 Latest operation return code: No connection Number of successes: 0 Number of failures: 2 Operation time to live: Forever R1#sh ip sla monitor operational-state Entry number: 17 Modification time: *00:06:03.319 UTC Fri Mar 1 2002 Number of Octets Used by this Entry: 2224 Number of operations attempted: 2 Number of operations skipped: 0 Current seconds left in Life: Forever Operational state of entry: Active Last time this entry was reset: Never Connection loss occurred: TRUE Timeout occurred: FALSE Over thresholds occurred: FALSE Latest RTT (milliseconds): NoConnection/Busy/Timeout Latest operation start time: *00:26:03.323 UTC Fri Mar 1 2002 Latest operation return code: No connection RTT Values: RTTAvg: 0 RTTMin: 0 RTTMax: 0 NumOfRTT: 0 RTTSum: 0 RTTSum2: 0 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 192.168.20.2 to network 0.0.0.0 192.168.10.0/30 is subnetted, 1 subnets C 192.168.10.0 is directly connected, FastEthernet0/0 192.168.20.0/30 is subnetted, 1 subnets C 192.168.20.0 is directly connected, FastEthernet0/1 S* 0.0.0.0/0 [254/0] via 192.168.20.2
Let’s make IP SLA work by having 4.2.2.2 respond to the probes as the lab indicates:
R2#conf t Enter configuration commands, one per line. End with CTRL/Z. R2(config)#int loop 1 R2(config-if)#ip address 4.2.2.2 255.255.255.0
Then let’s wait for a couple of seconds and run the same show commands:
R1#sh ip sla monitor statistics Round trip time (RTT) Index 17 Latest RTT: 16 ms Latest operation start time: *01:10:54.727 UTC Fri Mar 1 2002 Latest operation return code: OK Number of successes: 4 Number of failures: 2 Operation time to live: Forever R1#sh ip sla monitor operational-state Entry number: 17 Modification time: *01:09:54.727 UTC Fri Mar 1 2002 Number of Octets Used by this Entry: 2224 Number of operations attempted: 4 Number of operations skipped: 0 Current seconds left in Life: Forever Operational state of entry: Active Last time this entry was reset: Never Connection loss occurred: FALSE Timeout occurred: FALSE Over thresholds occurred: FALSE Latest RTT (milliseconds): 16 Latest operation start time: *01:10:54.727 UTC Fri Mar 1 2002 Latest operation return code: OK RTT Values: RTTAvg: 16 RTTMin: 16 RTTMax: 16 NumOfRTT: 1 RTTSum: 16 RTTSum2: 256 R1#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 192.168.10.2 to network 0.0.0.0 192.168.10.0/30 is subnetted, 1 subnets C 192.168.10.0 is directly connected, FastEthernet0/0 192.168.20.0/30 is subnetted, 1 subnets C 192.168.20.0 is directly connected, FastEthernet0/1 S* 0.0.0.0/0 [1/0] via 192.168.10.2