cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

283
Views
0
Helpful
1
Replies
Highlighted
Beginner

Config merging - Question.

So I have a pretty important part of my configuration that I'm trying to get out to a bunch of remote sites. The best way that I can do this seems to be putting that portion of the config in a file and then putting that file on the [boot]flash of the pertinent devices. Then I want my management tool to go out and execute a configuration merge.

I was doing some research and running a TCL script seemed to be a good option, but from my testing it seems that a TCL script cannot alter the configuration.

So I have questions:

1. Can I run a config merge from file "Importantstuff.txt" to the Running-config? If so, how?

2. Can a TCL script alter the configuration of the device? If so, how?

Also, some of my devices are IOS and some are NX-OS, so no doubt there will be differences there.

 

Thanks.

1 REPLY 1
Highlighted
Cisco Employee

Re: Config merging - Question.

TCL can send configurations commands with ios_config.  starts at config mode and nest other commands to traverse the cli tree.   

ios_config "interface $interface.$vlan" "encap dot1q $vlan"

ios_config "interface $interface.$vlan" "ip address $net"

 

To merge importantstuff.txt to running config = copy flash:importantstuff.txt running-config

 

CreatePlease to create content
Content for Community-Ad