cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
639
Views
0
Helpful
7
Replies

EEM Script Question

dhopper82
Level 1
Level 1

I was told EEM could be a possible solution to an issue I'm having... I have a 2811 router in an RV that has a Cellular and a Satellite connection. The cell is primary, the satellite is secondary. I am having an issue with NAT'ing when the Cell card fails. Basically users can't get out to the internet over the satellite until I take my NAT statement off manualy for the cell card. Could EEM scripting help resolve this issue? I have pasted some commands from my router I think are pertinent...

FA 0/1

ip address 1.1.1.214

ip route 0.0.0.0 0.0.0.0 Cellular0/0/0 99 track 1

ip route 0.0.0.0 0.0.0.0 1.1.1.212 100

track 1 interface Cellular0/0/0 line-protocol

ip nat inside source list 110 interface Cellular0/0/0 overload

ip nat inside source list 112 interface FastEthernet0/0 overload

access-list 110 permit ip 10.39.4.0 0.0.0.255 any

access-list 112 permit ip 10.39.4.0 0.0.0.255 any

1 Accepted Solution

Accepted Solutions

This should work then:

event manager applet cell-down

event track 1 state down

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "no ip nat inside source list 110 interface Cellular0/0/0 overload"

action 4.0 cli command "end"

I'm guessing that the one "no ip nat" command is all that is required.

event manager applet cell-up

event track 1 state up

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "ip nat inside source list 110 interface Cellular0/0/0 overload"

action 4.0 cli command "end"

View solution in original post

7 Replies 7

Joe Clarke
Cisco Employee
Cisco Employee

What version of IOS is running on this device? Yes, EEM will be a solution here.

12.4(15)T7 Advanced security..

This should work then:

event manager applet cell-down

event track 1 state down

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "no ip nat inside source list 110 interface Cellular0/0/0 overload"

action 4.0 cli command "end"

I'm guessing that the one "no ip nat" command is all that is required.

event manager applet cell-up

event track 1 state up

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "ip nat inside source list 110 interface Cellular0/0/0 overload"

action 4.0 cli command "end"

Joe,

Wouldn't you want to add a command "wr mem" into your EEM scripts?

No. That could be very bad I would think. If the interface does not transition on reload, I would also add an applet to trigger off of the SYS-5-RESTART syslog to put the NAT statement back in. For example:

event manager applet rest-on-reboot

event syslog pattern "SYS-5-RESTART"

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "ip nat inside source list 110 interface Cellular0/0/0 overload"

action 4.0 cli command "end"

Joe, thank you. I believe this is what we're looking for! I'm going to test it out today. I'll let you know if it works.

These commands worked. Thank you. I really like EEM scripting. It could be very useful in resolving several issues we're having now.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco