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

L2TP script to initiate a router reload when tunnel goes down - working

j_friedrich
Level 1
Level 1

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

0 Replies 0
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: