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.