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

TCL Script to add a line of config

Chad Knowlton
Level 1
Level 1

I am trying to figure out if I can use a TCL script to remove a line of config and add a line of config to multiple IP addresses. 

 

I need to issue the below AAA commands and save the config across 200 routers. All routers are accessible from our datacenter core. I would like a script I can push from the core, downstream to all edge nodes. I know I can use the script below in TCL Shell but not sure how to add multiple IPs to automate the script. If TCL is not the best way any suggestions will be appreciated. 

 

ios_config "no aaa authentication login default group local tacacs+"
ios_config "aaa authentication login default group tacacs+ local"

 

 

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

If you need to talk to multiple devices, it would be better to use something like Expect from a host and wrap SSH for each device.  Attached is a sample Expect script that is designed to do config backups.  It should give you what you need to complete your task.

Thanks for the help I will look into your script.