07-14-2011 09:21 AM - edited 03-04-2019 12:59 PM
Hi all
I've been searching for a way to have the router check the status of the dialed and if it's not responding and or down to have a TCL scrip reset the interface.
Is this possible?
Sent from Cisco Technical Support iPad App
07-14-2011 10:14 AM
EEM would also serve the purpose.
Sent from Cisco Technical Support iPad App
07-15-2011 03:47 AM
Hi,
I have a similuar TCL script but for PPPoE dialer and it just checks if the VI interface in UP status and tries to reset the assotiated physical interface if it's in DOWN status.
07-15-2011 05:53 AM
Umm okay I would be interest in having a look
Sent from Cisco Technical Support iPad App
07-15-2011 04:25 AM
i recomnd you sereach the fourm in the network managment section and if you cant find it then put your post there
good luck
07-15-2011 06:34 AM
it's quite "rough" as it was "developed" for a test purpose but went in production
You can assign it the even manger and serach in logging or, as we do it, just call it very 10 minutes from event manager.
#create flash file#
after 30000
#::cisco::eem::event_register_syslog maxrun 60
#namespace import ::cisco::eem::*
#namespace import ::cisco::lib::*
#get all lines in PADISNT status
set sh_pppoe_ses [ split [ exec "show pppoe session | i PADISNT" ] "\n" ]
foreach line $sh_pppoe_ses {
if { [ llength $line ] > 0 } {
#Find the according Vi interface and it Vlan interface
if { [ regexp {Vl[0-9]+} [ lindex $line 3 ] ] } {
set result [regexp {Vl([0-9]+)} [ lindex $line 3 ] match IF ]
#Find the all existing Vlan
set sh_int_sta [ split [ exec "sh vlan-sw bri | e unsup"] "\n" ]
#Find the Phisycal interface assotiated with a VLAN interface which assotiated with the Vi interface
foreach line_sta $sh_int_sta {
if { [ llength $line_sta ] > 0 } {
if { [ regexp "$IF" [ lindex $line_sta 0 ] ] && [ regexp "active" [ lindex $line_sta 2] ] } {
set LENGTH [ expr [ llength $line_sta ] - 1 ]
set result [regexp {(Fa[0-9]+)} [ lindex $line_sta $LENGTH ] match FA ]
set syslog [open "syslog:" w+]
puts $syslog "%Reset-PPP-Int-TCL shutting down interface $FA"
flush $syslog
ios_config "interface $FA" "shutdown"
after 10000
puts $syslog "%Reset-PPP-Int-TCL starting interface $FA"
ios_config "interface $FA" "no shutdown"
close $syslog
}
}
}
}
#Find the according Vi interface and its Phisycal interface if PPPoE
#is directly configured on a phisycal interfaceif { [ regexp {Fa[0-9]+} [ lindex $line 3 ] ] } {
set result [regexp {Fa([0-9]+)} [ lindex $line 3 ] match IF ]
set FA "Fa$IF"
set syslog [open "syslog:" w+]
puts $syslog "%Reset-PPP-Int-TCL shutting down interface $FA"
flush $syslog
ios_config "interface $FA" "shutdown"
after 10000
puts $syslog "%Reset-PPP-Int-TCL starting interface $FA"
ios_config "interface $FA" "no shutdown"
close $syslog
}
}
set IF ""
set FA ""
}
07-15-2011 10:28 AM
Thanks I'll give it a shot and let you know how things go
Sent from Cisco Technical Support iPad App
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