In the following example I installed my Windows Server 2008 Hyper-V server and connected the network uplink connection to the default 1 vlan switchport. I have a separated vlan 2200 for my lab environment. I wanted to test the new feature of enabling the VLAN ID on the new Microsoft’s hypervisor.
How to configure the Cisco switch port to allow trunking for my Hyper-V server?
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 !
In the Virtualization Management console I configured and installed a new Windows Server 2003 virtual machine. While testing I had an issue with the vm additions and network connectivity was 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.
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 hypervisor product.
Mathieu Tremblay
It is highly recommended to NEVER put a trunk port in spanning-tree portfast to prevent broadcast storms and Cisco switches will not put a trunk port in portfast mode anyway so this line is useless in this case.
WreknMathieu
@Mathieu Tremblay
For a Hyper-V port, yes, you should indeed put the port in portfast mode. Cisco switches WILL put them in portfast mode as long as the command is issued with the "trunk" modifier at the end. This is recommended.
#spanning-tree portfast trunk