EEM Scripting Magic

I decided  to use cisco’s EEM Scripting Engine to activate and deactivate the cellular interface to support a Primary link failure of our MPLS Link combined with an IP SLA:

ip sla auto discovery

ip sla 100

 icmp-echo 1.1.1.1 source-interface GigabitEthernet0/1

 threshold 1000

 frequency 15

ip sla schedule 100 life forever start-time now

EEM Scripts

event manager applet Activate-3G

 event track 60 state down

 action 1  cli command “enable”

 action 2  cli command “configure terminal”

 action 3  cli command “interface cellular0/1/0”

 action 4  cli command “no shutdown”

 action 5  cli command “end”

 action 99 syslog msg “Primary Link Down – Activating 3G interface”

 

event manager applet Deactivate-3G

 event track 60 state up

 action 1  cli command “enable”

 action 2  cli command “configure terminal”

 action 3  cli command “interface cellular0/1/0”

 action 4  cli command “shutdown”

 action 5  cli command “end”

 action 99 syslog msg “Primary Link Restored – Deactivating 3G interface”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s