cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1323
Views
0
Helpful
1
Replies

Link Degradation EEM Script

gfogleman1
Level 1
Level 1

I haven't worked with EEM scripts too much so I don't even know if what I want is plausible. After looking around it seems like it should be.

Basically I want my router to ping a device and if it drops 15 packets in 1 min to change the OSPF cost on 3 interfaces. Could anyone help me with that? If not any feedback would be appreciated!

 

Thanks,

Gage

1 Reply 1

gfogleman1
Level 1
Level 1

This is the final config i came up with does anyone have any better ideas?

basically i have a ping every 1 sec and after 10 secs it sends a log that the EEM script uses to execute the command to change the OSPF cost. After 120 secs (2 Mins) of it being up it will go back over to the primary link.
!
track 1 ip sla 1 reachability
 delay down 10
 delay up 120
ip sla 1
 icmp-echo X.X.X.X source-interface G0/2.267
 timeout 1000
 threshold 1000
 tag SDDC
 frequency 1
 vrf inet 
!
track 2 ip sla 2  reachability
 delay down 10
 delay up 120
ip sla 2
 icmp-echo X.X.X.X source-interface G0/2.267
 timeout 1000
 threshold 1000
 tag MOBL
 frequency 1
 vrf inet 
!
track 3 ip sla 3  reachability
 delay down 10
 delay up 120
ip sla 3
 icmp-echo X.X.X.X source-interface G0/2.267
 timeout 1000
 threshold 1000
 tag FLOR
 frequency 1
 vrf inet

event manager applet IPSLA_DEGRADED_SDDC
event syslog pattern "%TRACKING-5-STATE: 1 ip sla 1 reachability Down->Up"
action 1 wait 3
action 3 cli command "config t"
action 4 cli command "int tunnel 90"
action 5 cli command "ip ospf cost 1500"
action 6 cli command "int tunnel 85"
action 7 cli command "ip ospf cost 1500"


event manager applet IPSLA_DEGRADED_MOBL
event syslog pattern "%TRACKING-5-STATE: 2 ip sla 2 reachability Down->Up"
action 1 wait 3
action 3 cli command "config t"
action 4 cli command "int tunnel 92"
action 5 cli command "ip ospf cost 1500"


event manager applet IPSLA_DEGRADED_FLOR
event syslog pattern "%TRACKING-5-STATE: 3 ip sla 3 reachability Down->Up"
action 1 wait 3
action 3 cli command "config t"
action 4 cli command "int tunnel 94"
action 5 cli command "ip ospf cost 1500"

event manager applet IPSLA_OPERATIONAL_SDDC
event syslog pattern "%TRACKING-5-STATE: 1 ip sla 1 reachability Up->Down"
action 1 wait 3
action 3 cli command "config t"
action 4 cli command "int tunnel 90"
action 5 cli command "ip ospf cost 200"
action 6 cli command "int tunnel 85"
action 7 cli command "ip ospf cost 600"


event manager applet IPSLA_OPERATIONAL_MOBL
event syslog pattern "%TRACKING-5-STATE: 2 ip sla 2 reachability Up->Down"
action 1 wait 3
action 3 cli command "config t"
action 4 cli command "int tunnel 92"
action 5 cli command "ip ospf cost 300"


event manager applet IPSLA_DEGRADED_FLOR
event syslog pattern "%TRACKING-5-STATE: 3 ip sla 3 reachability Up->Down"
action 1 wait 3
action 3 cli command "config t"
action 4 cli command "int tunnel 94"
action 5 cli command "ip ospf cost 399"

 

Review Cisco Networking for a $25 gift card