Monday, May 7, 2007

TCL Snippet for Cisco Routers

You might come across a situation where you might have to configure etherchannel across multiple card modules of a Cisco 6500 Switch. Manually configuring a large number of port pairs across multiple card modules could be very time consuming and monotonous.

Well, here comes the solution with the help of tcl interpreter built within Cisco IOS (select models only).

Following is an example wherein the ports of 48-port 10/100 ethernet modules in slot 2 and 3 are configured for etherchannel.

Traditional Method

configure terminal
interface fastethernet 2/1
channel-group 1 mode on
interface fastethernet 3/1
channel-group 1 mode on
interface fastethernet 2/2
channel-group 2 mode on
interface fastethernet 3/2
channel-group 2 mode on
...and so on.

Smart Method using TCL

tclsh
set i 1;
while {$i < 49} {
ios_config "interface fastethernet 2/$i" "channel-group $i mode on"
ios_config "interface fastethernet 3/$i" "channel-group $i mode on"
incr i;
}

Hope this helps. Suggestions and Feedback, welcome. Will come up with more in the future, so watch this space.
Sridhar.

5 comments:

Show you said...

We alpha the accumulating tomorrow.”
When I alleged for the contributions the next day, I apparent that about anybody had forgotten
buy eden gold
eden gold
RS Gold

cheaptera said...

Thanks for sharing and letting us aware about this information. This is a great thread, so much info.it ls a good article and love your words , so charming and make people learn a lot , thanks !
Here are my blogs posts:
http://wowguides.xtrablog.dk/buying-wow-gold-is-fairly-popular-among-players-now-post246234
http://www.vibesconnect.com/coolwow/blog/What_is_wow_gold_for_sale_your,53711
http://cheapwowbuy.blogshells.com/2011/12/09/what_is_the_fastest_and_the_most_convenient_way_to_get_wow_gold
http://wowgoldeu.bloguez.com/wowgoldeu/3708605/Where-there-is-a-reputable-wow-gold-supplier-

Joe said...

This is a paradise of hermes handbags outlet handbags. You can see various kinds of handbags which including shoulder bags, handle handbags, cross - body handbags, and evening handbags and so on. As the blogger of this blog, I will continuously bring you the most fashionable handbags in the cambridge satchel us present time, as well as the review of some classical handbags styles. So ladies, get ready to enjoy the handbags feast that I will share with you in the future.Coach Handbags - Luxurious Designer Handbags hermes birkin cheap.

wow9gamer said...

You might come across a situation where you might have to configure etherchannel across multiple card modules of a Cisco 6500 Switch. League of Legends Boost
League of Legends Elo Boost

hou said...

This decorative stitching technique is done mainly by hand and is time consuming but generates astonishing results.

meizu m2 note review
meizu mx5 specs
xiaomi mi4i review