cisco ccna ip sla with tracking configuration
TRANSCRIPT
CISCO CCNAIP SLA with Tracking Configuration
To watch our Cisco CCNA Video Trainings Please Check out the link below:www.asmed.com/c1
ASM Educational Center Inc. (ASM)Where Training, Technology & Service ConvergePhone: (301) 984-7400Rockville,MD
IP SLA with Tracking Configuration
IP SLA with Tracking ConfigurationNow we will do Lab for Tracking In here we have as follow Above we have a router (R1) that is connected to two ISPs. We want to use ISP1 as the primary and ISP2 as the backup link. All traffic will be sent towards ISP1 but when it’s unreachable we’ll switch over to ISP2. You can achieve this by using two default routes: R1=f0/0 192.168.12.1 /24 connected to ISP1=192.168.12.2R1=F0/1 192.168.13.1 /24 connected to ISP2= 192.168.13.3 R1#show ip int brief
IP SLA with Tracking Configuration
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.12.1 YES manual up up
FastEthernet1/0 192.168.13.1 YES manual up up
Serial0/1/0 unassigned YES Unset administratively down down
IP SLA with Tracking Configuration
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.13.3 50 As we see in above we are using the floating Static route that is top one has AD=1 for static route and 2nd one the AD=50 , so when I go toR1#show ip route
IP SLA with Tracking ConfigurationI will see the top commands on the routing tables R1#show ip routeCodes: 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.12.2 to network 0.0.0.0 C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.2R1#
IP SLA with Tracking ConfigurationHere R1 can ping both ISP and from above we see it prefer top ISP1 R1#ping 192.168.12.2 Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 msR1# R1#ping 192.168.13.3 Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.13.3, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 msR1#
IP SLA with Tracking Configuration
R1#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, D - Remote, C - CVTA, M - Two-port Mac Relay Device ID Local Intrfce Holdtme Capability Platform Port IDISP2 Fas 1/0 136 R 7206VXR Fas 1/0ISP1 Fas 0/0 143 R 7206VXR Fas 0/0
IP SLA with Tracking Configuration
Now If I go to R1 and shut down the f0/0 (which is connected to ISP1) then since I have theFloating point the R1 #show ip route will be pointed to ISP2 R1#config tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#int f0/0R1(config-if)#shut
IP SLA with Tracking ConfigurationR1#show ip routeCodes: 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.13.3 to network 0.0.0.0 C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [50/0] via 192.168.13.3R1#
IP SLA with Tracking Configuration
As we see in above now R1 goes to internet via ISP2 , which is called the floating point---- But what happen if the link on ISP1 goes than ; then R1 in his table still will have original route to ISP1=192.168.12.2 so in here we will use the concept of Ip SLA with adding the track on the static route of R1
IP SLA with Tracking Configuration
Lets bring up the int f0/0 on r1; R1#config tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#int f0/0R1(config-if)#no shut
IP SLA with Tracking ConfigurationR1#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.12.1 YES manual up up
FastEthernet1/0 192.168.13.1 YES manual up up
Serial0/1/0 unassigned YES Unset administratively down down
IP SLA with Tracking ConfigurationR1#R1#R1#show ip rouR1#show ip routeCodes: 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.12.2 to network 0.0.0.0 C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.2R1#
IP SLA with Tracking Configuration
Now life is back to normal, that is using ISP1=192.168.12.2Now we will do tracking with Ip SLA
Step 1) I will create an IP SLA instance that pings the IP address of the ISP1 router: R1(config)#ip sla 1R1(config-ip-sla)#
IP SLA with Tracking ConfigurationR1(config-ip-sla)#?IP SLAs entry configuration commands: dhcp DHCP Operation dns DNS Query Operation ethernet Ethernet Operations exit Exit Operation Configuration frame-relay Frame-relay Operation ftp FTP Operation http HTTP Operation icmp-echo ICMP Echo Operation icmp-jitter ICMP Jitter Operation path-echo Path Discovered ICMP Echo Operation path-jitter Path Discovered ICMP Jitter Operation tcp-connect TCP Connect Operation udp-echo UDP Echo Operation udp-jitter UDP Jitter Operation voip Voice Over IP Operation
IP SLA with Tracking ConfigurationR1(config-ip-sla)#?IP SLAs entry configuration commands: dhcp DHCP Operation dns DNS Query Operation ethernet Ethernet Operations exit Exit Operation Configuration frame-relay Frame-relay Operation ftp FTP Operation http HTTP Operation icmp-echo ICMP Echo Operation icmp-jitter ICMP Jitter Operation path-echo Path Discovered ICMP Echo Operation path-jitter Path Discovered ICMP Jitter Operation tcp-connect TCP Connect Operation udp-echo UDP Echo Operation udp-jitter UDP Jitter Operation voip Voice Over IP Operation
IP SLA with Tracking ConfigurationNow we will use the same concept as before that is icmp-echo R1(config-ip-sla)#icmp-echo 192.168.12.2 ( Point to ISP1=192.168.12.2)R1(config-ip-sla-echo)#R1(config-ip-sla-echo)#?IP SLAs echo Configuration Commands: default Set a command to its defaults exit Exit operation configuration frequency Frequency of an operation history History and Distribution Data no Negate a command or set its defaults owner Owner of Entry request-data-size Request data size
IP SLA with Tracking Configuration tag User defined tag threshold Operation threshold in milliseconds timeout Timeout of an operation tos Type Of Service verify-data Verify data vrf Configure IP SLAs for a VPN Routing/Forwarding instance R1(config-ip-sla-echo)#frequency ? <1-604800> Frequency in seconds (default 60) R1(config-ip-sla-echo)#frequency 20 ? <cr> R1(config-ip-sla-echo)#frequency 20
IP SLA with Tracking Configuration
Here is show run so far R1#show run ip sla 1 icmp-echo 192.168.12.2 frequency 20
IP SLA with Tracking Configuration
Step 2) Go back to global configuration to schedule now for forever R1#R1#config tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#ip slaR1(config)#ip sla ? <1-2147483647> Entry Number
IP SLA with Tracking Configuration enable Enable Event Notifications ethernet-monitor IP SLAs Auto Ethernet configuration group Group Configuration or Group Scheduling key-chain Use MD5 authentication for IP SLAs Control Messages logging Enable Syslog low-memory Configure Low Water Memory Mark reaction-configuration IP SLAs Reaction-Configuration reaction-trigger IP SLAs Trigger Assignment reset IP SLAs Reset responder Enable IP SLAs Responder restart Restart An Active Entry schedule IP SLAs Entry Scheduling
IP SLA with Tracking Configuration
R1(config)#ip sla schedule ? <1-2147483647> Entry number R1(config)#ip sla schedule 1 ? ageout How long to keep this Entry when inactive life Length of time to execute in seconds recurring Probe to be scheduled automatically every day start-time When to start this entry <cr>
IP SLA with Tracking Configuration
R1(config)#ip sla schedule 1 staR1(config)#ip sla schedule 1 start-time ? after Start after a certain amount of time from now hh:mm Start time (hh:mm) hh:mm:ss Start time (hh:mm:ss) now Start now pending Start pending
IP SLA with Tracking ConfigurationR1(config)#ip sla schedule 1 start-time now ? ageout How long to keep this Entry when inactive life Length of time to execute in seconds recurring Probe to be scheduled automatically every day <cr> R1(config)#ip sla schedule 1 start-time now liR1(config)#ip sla schedule 1 start-time now life ? <0-2147483647> Life seconds (default 3600) forever continue running forever
IP SLA with Tracking Configuration
R1(config)#ip sla schedule 1 start-time now life forR1(config)#ip sla schedule 1 start-time now life forever ? ageout How long to keep this Entry when inactive recurring Probe to be scheduled automatically every day <cr> R1(config)#ip sla schedule 1 start-time now life foreverR1(config)#
IP SLA with Tracking Configuration
Here is show run so far R1#show run ip sla 1 icmp-echo 192.168.12.2 frequency 20ip sla schedule 1 life forever start-time now
IP SLA with Tracking Configurationlet’s check with show commandslife is good now R1#show ip sla staR1#show ip sla statisticsIPSLAs Latest Operation Statistics IPSLA operation id: 1Type of operation: icmp-echo Latest RTT: 1 millisecondsLatest operation start time: *05:40:17.723 UTC Thu Dec 15 2016Latest operation return code: OKNumber of successes: 6Number of failures: 1Operation time to live: Forever
IP SLA with Tracking ConfigurationR1#show ip sla statisticsIPSLAs Latest Operation Statistics IPSLA operation id: 1Type of operation: icmp-echo Latest RTT: 1 millisecondsLatest operation start time: *05:40:57.723 UTC Thu Dec 15 2016Latest operation return code: OKNumber of successes: 8Number of failures: 1Operation time to live: Forever
IP SLA with Tracking ConfigurationR1#show ip sla statisticsIPSLAs Latest Operation Statistics IPSLA operation id: 1Type of operation: icmp-echo Latest RTT: 1 millisecondsLatest operation start time: *05:41:37.723 UTC Thu Dec 15 2016Latest operation return code: OKNumber of successes: 10Number of failures: 1Operation time to live: Forever
IP SLA with Tracking ConfigurationStep 3) now I will define the track number; and then later on I will append it to default route pointed to ISP1=192.168.12.2 R1#R1#R1#config tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#tracR1(config)#track 1 ? interface Select an interface to track ip IP protocol list Group objects in a list stub-object Stub tracking object
IP SLA with Tracking ConfigurationR1(config)#track 1 ip ? route IP route sla IP Service Level Agreement R1(config)#track 1 ip sla ? <1-2147483647> Entry number R1(config)#track 1 ip sla 1 ? reachability Reachability state Return code state <cr>
IP SLA with Tracking Configuration
R1(config)#track 1 ip sla 1 reR1(config)#track 1 ip sla 1 reachability ? <cr> R1(config)#track 1 ip sla 1 reachabilityR1(config-track)#
IP SLA with Tracking ConfigurationHere is show run so far track 1 ip sla 1 reachability ip route 0.0.0.0 0.0.0.0 192.168.12.2ip route 0.0.0.0 0.0.0.0 192.168.13.3 50!!!ip sla 1 icmp-echo 192.168.12.2 frequency 20ip sla schedule 1 life forever start-time now
IP SLA with Tracking ConfigurationStep 4) now I go to default router that I had; remove it and add it with new track number 1R1#config tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#no ip route 0.0.0.0 0.0.0.0 192.168.12.2R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2 ? <1-255> Distance metric for this route name Specify name of the next hop permanent permanent route tag Set tag for this route track Install route depending on tracked item <cr> R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2 trR1(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2 track ? <1-500> tracked object number
IP SLA with Tracking Configuration
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2 track 1 ? <1-255> Distance metric for this route name Specify name of the next hop tag Set tag for this route <cr> R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2 track 1
IP SLA with Tracking ConfigurationSo here is show run so far:r1#show run !track 1 ip sla 1 reachability!interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto!interface FastEthernet0/1 ip address 192.168.13.1 255.255.255.0 duplex auto speed auto!
IP SLA with Tracking Configuration!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.12.2 track 1 ( here I have added the Track)ip route 0.0.0.0 0.0.0.0 192.168.13.3 50
!
!
!
ip sla 1
icmp-echo 192.168.12.2 ( this is IP address of Main ISP1 that I am looking ) frequency 20
ip sla schedule 1 life forever start-time now
!
IP SLA with Tracking ConfigurationNow we will test it That is if ISP1=f0/0=192.168.12.2 goes down ; then when I go to R1#show ip route I will see the routing table has been changed to the new one
ISP1#show ip int briefInterface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.12.2 YES manual up up
FastEthernet1/0 unassigned YES NVRAM administratively down down
FastEthernet1/1 unassigned YES NVRAM administratively down down
IP SLA with Tracking Configuration
ISP1#config tEnter configuration commands, one per line. End with CNTL/Z.ISP1(config)#int f0/0ISP1(config-if)#shutISP1(config-if)#
IP SLA with Tracking ConfigurationNow I will go to R1#show ip route and see the routing table should point to ISP2=192.168.13.3R1#show ip routeCodes: 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.13.3 to network 0.0.0.0 C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [50/0] via 192.168.13.3R1#
IP SLA with Tracking ConfigurationWhich it did with AD=50 Now let’s look at some show commands it shows it changedR1#show ip sla statisticsIPSLAs Latest Operation Statistics IPSLA operation id: 1Type of operation: icmp-echo Latest RTT: NoConnection/Busy/TimeoutLatest operation start time: *05:50:57.723 UTC Thu Dec 15 2016Latest operation return code: No connection (here says no connection)Number of successes: 34Number of failures: 5 ( here is number changing)Operation time to live: Forever
IP SLA with Tracking ConfigurationR1#show ip sla statisticsIPSLAs Latest Operation Statistics IPSLA operation id: 1Type of operation: icmp-echo Latest RTT: NoConnection/Busy/TimeoutLatest operation start time: *05:51:37.723 UTC Thu Dec 15 2016Latest operation return code: No connectionNumber of successes: 34Number of failures: 7 ( here is the number changes)Operation time to live: Forever
IP SLA with Tracking ConfigurationR1#R1#show ip sla statisticsIPSLAs Latest Operation Statistics IPSLA operation id: 1Type of operation: icmp-echo Latest RTT: NoConnection/Busy/TimeoutLatest operation start time: *05:52:17.723 UTC Thu Dec 15 2016Latest operation return code: No connectionNumber of successes: 34Number of failures: 9Operation time to live: Forever
IP SLA with Tracking ConfigurationR1#R1#show ip routeCodes: 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.13.3 to network 0.0.0.0 C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [50/0] via 192.168.13.3R1#
IP SLA with Tracking ConfigurationR1#R1#show ip routeCodes: 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.13.3 to network 0.0.0.0 C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [50/0] via 192.168.13.3R1#
IP SLA with Tracking ConfigurationNow I go back to ISP1 and bring back onlineISP1#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.12.2 YES manual up up
FastEthernet1/0 unassigned YES NVRAM administratively down down
FastEthernet1/1 unassigned YES NVRAM administratively down down
IP SLA with Tracking Configuration
ISP1#config t
Enter configuration commands, one per line. End with CNTL/Z.
ISP1(config)#int f0/0
ISP1(config-if)#no shut
ISP1(config-if)#
IP SLA with Tracking ConfigurationNow I go back to R1#show ip route and check the work
R1#show ip routeCodes: 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.12.2 to network 0.0.0.0 C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.2
IP SLA with Tracking ConfigurationLife is back to normal
R1#show ip sla statisticsIPSLAs Latest Operation Statistics IPSLA operation id: 1Type of operation: icmp-echo Latest RTT: 1 millisecondsLatest operation start time: *05:54:37.723 UTC Thu Dec 15 2016Latest operation return code: OKNumber of successes: 36Number of failures: 14Operation time to live: Forever
IP SLA with Tracking ConfigurationR1#show ip sla statisticsIPSLAs Latest Operation Statistics IPSLA operation id: 1Type of operation: icmp-echo Latest RTT: 1 millisecondsLatest operation start time: *05:54:57.723 UTC Thu Dec 15 2016Latest operation return code: OKNumber of successes: 37Number of failures: 14Operation time to live: Forever
IP SLA with Tracking ConfigurationR1#show ip sla statistics
IPSLAs Latest Operation Statistics
IPSLA operation id: 1
Type of operation: icmp-echo
Latest RTT: 1 milliseconds
Latest operation start time: *05:55:17.723 UTC Thu Dec 15 2016
Latest operation return code: OK
Number of successes: 38
Number of failures: 14
Operation time to live: Forever
IP SLA with Tracking ConfigurationSo summary on R1 show runR1#show run!track 1 ip sla 1 reachability ( track 1 is pointed to default route)!!!interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto
IP SLA with Tracking Configuration!interface FastEthernet0/1 ip address 192.168.13.1 255.255.255.0 duplex auto speed auto!
IP SLA with Tracking Configuration!ip forward-protocol ndip route 0.0.0.0 0.0.0.0 192.168.12.2 track 1 ( here we are tracking 1) ip route 0.0.0.0 0.0.0.0 192.168.13.3 50 ( this is 2ndary static route since it has AD=50)
!!!ip sla 1 icmp-echo 192.168.12.2 ( this is pointed to Main ISP1 =primary) frequency 20ip sla schedule 1 life forever start-time now
ASM Educational Center Inc. (ASM)Where Training, Technology & Service Converge
To watch our Cisco CCNA Video Trainings Please Check out the link below:www.asmed.com/c1Phone: (301) 984-7400Rockville,MD