Hi,
Just thought I would post a working EEM script on doing a router reload when the L2TP tunnel goes down....
I am using a 3825 router to initiate a site-to-site tunnel with a 3rd party vpn service - StrongVPN. On the odd occasion when the tunnel goes down, the l2tp tunnel state goes to "no session left" and the virtual-ppp1 interface - which is tied to the l2tp vpn - goes down. Unfortunately, because I have no control on the far end router, the only way to bring it back up is thru a router reload....
Here you go:
event manager applet L2TP-DOWN
event syslog pattern "%LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-PPP1, changed state to down"
action 1.0 syslog msg "The L2TP VPN is down"
action 1.1 cli command "enable"
action 1.2 cli command "reload in 10" pattern "confirm"
action 1.3 cli command ""
action 1.4 syslog msg "EEM scheduled reload in 10 minutes"
event manager applet L2TP-UP
event syslog pattern "%LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-PPP1, changed state to up"
action 1.0 syslog msg "The L2TP VPN is up"
action 1.1 cli command "enable"
action 1.2 cli command "reload cancel"
Jason