ARTICLES

IP SLA track configuration

Topology:

Basic configuration, Interface addresses and static routing:

  • R1 interface addresses configuration:

R1(config)#int gi0/0

R1(config-if)#ip address 192.168.1.1 255.255.255.252

R1(config-if)#no sh

%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

R1(config-if)#int gi0/1

R1(config-if)#ip address 192.168.2.1 255.255.255.252

R1(config-if)#no sh

%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up


  • ISP1 addresses configuration:

Router>en

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname ISP1

ISP1(config)#int gi0/0

ISP1(config-if)#ip address 192.168.2.2 255.255.255.252

ISP1(config-if)#no sh

%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

ISP1(config-if)#int gi0/1

ISP1(config-if)#ip address 172.16.20.1 255.255.255.0

ISP1(config-if)#no sh

%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up


  • ISP2 addresses configuration:

Router>en

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname ISP2

ISP2(config)#int gigabitEthernet 0/0

ISP2(config-if)#ip address 192.168.1.2 255.255.255.252

ISP2(config-if)#no sh

%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

ISP2(config)#int gigabitEthernet0/1

ISP2(config-if)#ip address 172.16.20.2 255.255.255.0

ISP2(config-if)#no sh

%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

  • Configure static routing to 172.16.20.0/24 through ISP1 and ISP2 from R1:

We configure Static routes to 172.16.20.0 with the default administrative distance so that ISP1 will be our primary line and ISP2 is backup (secondary), to do so, we set the administrative distance of 20 > 1 for static route through ISP2 (ISP1 has an administrative distance of 1 by default)

R1(config)#ip route 172.16.20.0 255.255.255.0 192.168.1.2

R1(config)#ip route 172.16.20.0 255.255.255.0 192.168.2.2 20

we can verify from the routing table of R1:

IP SLA Tracking configuration:

  • Step1: define the IP SLA:

R1(config)#ip sla 1

R1(config-ip-sla)#icmp-echo 192.168.1.2 source-interface Gi0/0

R1(config-ip-sla-echo)#timeout 5000

R1(config-ip-sla-echo)#frequency 10

R1(config)#ip sla schedule 1 life forever start-time now

  • Step2: Track the defined ip SLA:

R1(config)# track 1 ip sla 1 reachability

  • Step3: Apply the track on static route (to the primary ISP):

R1(config)#ip route 172.16.20.0 255.255.255.0 192.168.1.2 track 1

Related Articles

Back to top button
error: Content is protected !!