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!



VMWare ESX3i Cisco CDP protocol L2 overview

6 02 2008

Cisco Discovery Protocol (CDP) allows ESX Server 3 administrators to determine which Cisco switch port is connected to a given vSwitch. When CDP is enabled for a particular vSwitch, you can view properties of the Cisco switch (such as device ID, software version, and timeout) from the VI Client. You can use the service console command-line interface to enable CDP.

 

ESX3i_Cisco_CDP

Using this information and without going to the server room and locating the network cable in the rack I was able to configure the interface on the switch real time.

The switchport should be set as trunk and for security reasons also configure the allowed vlan’s.

interface GigabitEthernet0/15
description ** ESX-01 Trunk port LAN **
switchport trunk allowed vlan 1,200
switchport mode trunk
spanning-tree portfast
!



Hyper-V and Cisco VLAN config

16 01 2008

Configure the Cisco switch port with the allowed vlans. In my example I installed the Hyper-V box in the default 1 vlan and I have separated vlan 2200 for my lab environment.

Login into the Cisco Switch, go into privileged mode and open the configuration terminal. Enter or paste the configuration below.

interface GigabitEthernet0/1
description ** Uplink to Hyper-V windows box **
switchport trunk allowed vlan 1,2200
switchport mode trunk
spanning-tree portfast
!

In the Virtualization Management console I configured and installed new guest partition with Windows Server 2003. There seems to be an issue with the current vm additions and my setup so the nic controller is not working. I removed current nic controller and added legacy network adapter.

In the legacy network adapter, check enable virtual LAN identification and enter the VLAN ID. Click ok or Apply the configuration.

vlan-2200

This is really cool feature now integrated with Hyper-V. ESX supported VLAN’s for while and Microsoft is catching up now in the upcoming release of their hyper visor product.