Monday, April 17, 2017

cisco, reactive to link failure two hops away

*****info

              ------------r3 ---------(30.0.0.1)-p1 ------------
cl1--->r1                                           internet
             ------------r2 ------------(30.0.0.5)p2------------



1- r1 configuration


track 1 ip sla 1 reachability
!
track 2 ip sla 2 reachability
!
track 3 ip sla 3 reachability
!
track 4 ip sla 4 reachability
interface FastEthernet0/0
 ip address 1.1.1.1 255.255.255.252
 speed auto
 duplex auto
!
interface FastEthernet0/1
 ip address 20.0.0.2 255.255.255.252
 speed auto
 duplex auto
!
interface FastEthernet1/0
 ip address 10.0.0.2 255.255.255.252
 speed auto
 duplex auto
!
ip route 0.0.0.0 0.0.0.0 10.0.0.1 10


ip sla 3ip nat inside source list 1 interface FastEthernet0/1 overload

 icmp-echo 30.0.0.1 source-interface FastEthernet1/0
ip sla schedule 3 life forever start-time now
ip sla 4 
 icmp-echo 30.0.0.5 source-interface FastEthernet0/1
ip sla schedule 4 life forever start-time now
event manager applet trackgw1
 event syslog pattern "ip sla 3 reachability Up->Dow"
 action 1.0 cli command "enable"
 action 2.0 cli command "conf t"
 action 3.0 cli command "ip route 0.0.0.0 0.0.0.0 20.0.0.1 20"
 action 4.0 cli command "no ip route 0.0.0.0 0.0.0.0 10.0.0.1"
 action 5.0 cli command "end"
event manager applet trackgw2
 event syslog pattern "ip sla 4 reachability Up->Dow"
 action 1.0 cli command "enable"
 action 2.0 cli command "conf t"
 action 3.0 cli command "ip route 0.0.0.0 0.0.0.0 10.0.0.1 10"
 action 4.0 cli command "no ip route 0.0.0.0 0.0.0.0 20.0.0.1"
 action 5.0 cli command "end"








2- do in event that provider 1 is disconnected , r1 will remove its gateway and install the gateway of provider2

No comments:

Post a Comment