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

tclsh script to update speed/duplex on interface - Cisco 2911 and 4331 routers

shima111970
Level 1
Level 1

Hello,

 

I've had some success remotley updating speed/duplex setting for Cisco 2911 and 4331 router interfaces, however it's been about 50% or less of the routers I attempt to update.  We use AT&T avpn, and the problem is many of our rourters are running at half duplex and need to be hard corded to 100/full vs. auto negotiation or auto/auto. Has anyone had better luck with updating this remotely?  

 

Thanks!  

 

 

for the 4331: 

reload in 0:05
tclsh

set fixinterface {
ios_config "interface gi0/0/1" "no negot auto" "duplex full" "speed 100"
}

eval $fixinterface

 

for the 2911:

reload in 0:05
tclsh

set fixinterface {
ios_config "interface gi0/1" "duplex full" "speed 100"
}

eval $fixinterface

 

1 Reply 1

balaji.bandi
Hall of Fame
Hall of Fame

Not sure i have not tried TCL since long

 

but i did couple of sites using EEM like below example : (test before deploying in production).

 

Setup a reload timer after 1:00am, so in case anything go wrong it will reload.

 

here is example of EEM Scritp.

 

event manager applet speedchange

event timer cron cron-entry "0 01 * * *" <-- 1AM - change as per your requirement
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "interface gi0/0/1"
action 4.0 cli command "no negot auto"
action 5.0 cli command "duplex full"
action 6.0 cli command "speed 100"
action 7.0 cli command "end"

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help