a TCL Shutdown

TCL script that could also help in doing a shutdown to several interfaces UP and running

R3#en
R3#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#int lo0
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#int lo1
R3(config-if)#exit
R3(config)#int lo2
R3(config-if)#exit
R3(config)#int lo3
R3(config-if)#exit
R3(config)#int lo4
R3(config-if)#exit
R3(config)#exit
R3#
R3#tclsh
R3(tcl)#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#foreach i {
+(config)#lo0
+(config)#lo1
+(config)#lo2
+(config)#} {
+(config)#int $i
+(config)#sh
+(config)#exit
+(config)#}


*Nov  6 13:41: 35.433: %LINK-5-CHANGED: Interface Loopback0, changed state to adm
inistratively down
*Nov  6 13:41: 35.451: %LINK-5-CHANGED: Interface Loopback1, changed state to adm
inistratively down
*Nov  6 13:41:35.463: %LINK-5-CHANGED: Interface Loopback2, changed state to adm
inistratively down
R3(config)#


A Networker Blog

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s