03-08-2011 03:44 PM
Hi,
I'm looking for a way to automate vlan and vlan name configuration with tcl!
e.g.
vlan x
name xxx
vlan y
name yyy
Unfortunately the tcl command "ios_config" let me configure vlans but vlan sub-commands, like "name xxx", are not possible!
ios_config does only in interface sub-mode a good job...
Any ideas how this works? Is there a better way to automate vlan configuration within ios?
Thanks for any suggestion
Christian
Solved! Go to Solution.
03-08-2011 10:10 PM
I don't understand what you mean by ios_config is not working. It seems to work fine for me:
ios_config "vlan 10" "name test_10" "end"
An alternative to tclsh is to use the Embedded Event Manager Tcl. This gives you a more flexible CLI interface.
03-08-2011 10:10 PM
I don't understand what you mean by ios_config is not working. It seems to work fine for me:
ios_config "vlan 10" "name test_10" "end"
An alternative to tclsh is to use the Embedded Event Manager Tcl. This gives you a more flexible CLI interface.
03-10-2011 05:57 AM
uups, ok...with the "end" parameter ios_config command works fine for vlan/name configuration!
Within interface configuration i never used the "end" before.
I didn't understand the exactly reason behind the difference, but it works and i'm fine!
Vlan config needs an end
ios_config "vlan 100" "name test" "end"
If-config works without end:
ios_config "interface gig 1/0/12" "description free"
Many thanks for the fast solution!
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