locked
Hyper-V with VLAN Trunking and Native/Untagged VLAN RRS feed

  • Question

  • I've been trying to configure a basic trunk on Hyper-V for a while. I have this setup:

     

    Switch port in trunk mode:

    Native VLAN: 1

    Tagged VLANs: 10, 250

     

    On Hyper-V, I have configured the port in Trunk Mode with the VLANS 10 and 250 listed.

    When I put a VM on either of these networks they work great, but when I deselect "Enable virtual LAN Identification" for that VM hoping to use the native VLAN of the port, it does not work.

    Of course if I configure that VLAN as tagged and non-native on the switch and enable the tagging on the VM, it works great. But there has been no other way to do this that I can see.

    I want to be able to support VMs without tagging just to make simplifying the networking overall and support some legacy migrations. It would just make things easier. Is this not possible? Can Hyper-V not tell the difference between tagged and untagged?

    Monday, February 6, 2012 10:34 PM

All replies

  • Hi,

    The expected behavior is that there is a single virtual switch, the parent and two children can only talk on their respective VLANs.


    To understand the VLAN in hyper-v, look at this link:

    Understanding Hyper-V VLANs


    Best Regards

    Tuesday, February 14, 2012 9:02 AM
  • Yes, I understand that. However on most switches the primary VLAN ID for a trunked port is untagged. Can the virtual switch in Hyper-V emulate that?

    Drew G

    Tuesday, February 14, 2012 3:01 PM
  • That is an advanced scenario that Hyper-V manager does not offer UI for.

    For your scenario, VLan disabled is the same as VLAN 0 for Hyper-V. VLAN 0 must be added to the trunk on Windows Server 2008R2.

    If you feel like playing with WMI, you can use the Msvm_VLANEndPointSettingData to configure the native VLAN, vlans on the trunk and the access VLAN. Then you can use Msvm_VLANEndpoint to determine the operation mode.

    See http://msdn.microsoft.com/en-us/library/cc136953(v=vs.85).aspx for more information on WMI.

    However, the moment you change this. You should not use the Hyper-V manager to configure VMs since the VLANs could be changed without notice. The same applies for Live migrations when having a cluster configuration.

    • Proposed as answer by Joel Coehoorn Tuesday, June 23, 2015 8:20 PM
    Thursday, September 27, 2012 2:49 AM