11-12-2009 08:11 AM
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
Solved! Go to Solution.
11-12-2009 02:30 PM
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"
11-12-2009 10:03 AM
What version of IOS is running on this device? Yes, EEM will be a solution here.
11-12-2009 01:24 PM
12.4(15)T7 Advanced security..
11-12-2009 02:30 PM
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"
11-12-2009 07:47 PM
Joe,
Wouldn't you want to add a command "wr mem" into your EEM scripts?
11-12-2009 08:22 PM
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"
11-13-2009 05:24 AM
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.
11-13-2009 12:38 PM
These commands worked. Thank you. I really like EEM scripting. It could be very useful in resolving several issues we're having now.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide