Cisco Interface Range Specification assign multiple ports as trunk

7 04 2008

imageCisco IOS introduced the support of a range command in Release 12.0(7)XE, Release 12.1 E, and Release 12.1(5)T and above to select multiple ports wihtin the Cisco switch interface configuration. I am using the range function to assign my first twently gigabit ports as trunk interfaces for my VMWare ESX environment.

The Interface Range Specification feature allows specification of a range of interfaces to which subsequent commands are applied and supports definition of macros that contain an interface range. The Interface Range Specification feature is implemented with the range keyword, which is used with the interface command. In the interface configuration mode with the range keyword, all entered commands are applied to all interfaces within the range until you exit interface configuration mode.

The Interface Range Specification feature makes configuration easier because:

Identical commands can be entered once for a range of interfaces, rather than being entered separately for each interface.

Interface ranges can be saved as macros.

Switch1#enable

Switch1(config)#interface range gigabitEthernet 0/1 - 20

Switch1(config-if-range)#spanning-tree portfast

Switch1(config-if-range)#switchport mode trunk

Switch1(config-if-range)#^Z

Switch1# copy running-configuration startup-configuration

Switch1#show running-configuration

It can save some time when configuring a new Cisco switch and not assigning manual configuration for each Ethernet interface.

 image

If you are installing different VMWare ESX servers than the CDP support in the networking area can help you find the right port on your Cisco switch; for details check my previous post. After I identified the port than I went back to the switch configuration and add the interface description!