Tuesday, 3 July 2012

VLAN tagging problems in Windows Server 2012 Hyper-V

Now when the Release Candidate of Windows Server 2012 is available I started to evaluate its features, most of all Hyper-V because the company I work for has a Hyper-V based lab environment I can use to play with the new stuff.

We have two HP DL380 G5 servers in a cluster and I decided to evict one node from the Windows Server 2008 R2 cluster and install Windows Server 2012. You can read about it here.

Very soon I have encountered a problem with VLAN tagging. I set up NIC Teaming feature using two network cards. Network cards I used are HP NC7170 Dual Gigabit Server Adapter, but I had to uninstall these drivers and install Windows included drivers. Then my network cards appeared as Intel PRO/1000 MT Dual Port in Device Manager.

Physical network switches where these cards are connected to have ports configured as trunk ports so I can pass the VLAN tags from the operating system above. This worked fine using Windows Server 2008 R2 and HP Network Configuration Utility, but not with NIC Teaming and VLAN tagging in Windows Server 2012.

I could easily set up NIC Teaming, but when I tried to tag the traffic, either on the host OS or from the virtual machine, nothing would pass through to the switches. After a couple of days of troubleshooting I discovered that I must tell the NIC driver to pass through the tagged VLAN traffic. However, this was not exposed anywhere in the GUI but only in the registry.

If you have a similar problem, you must edit or create the VlanFiltering DWORD value in registry on the following location and set it to 0:

HKEY_LOCAL_MACHINE\ControlSet001\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\00xx

xx could be any number so you must open each key and look for your network adapter. If you are using NIC Teaming you probably need to do this for both adapters or all adapters that set up your team, in case you have more than two.


After you have changed the values, you can just go to Device Manager and disable and enable the network cards. This should be enough for the new setting to become active. It worked for me.

I hope this is only RC "feature" and it will be fixed in the final release.

10 comments:

  1. Great :)

    Regards from Serbia, Nenad.

    ReplyDelete
  2. Nope, still ran into this with RTM. Interestingly enough it was only on one of the two nics in the team. So be sure to go all the way through the list. Thanks for the info

    ReplyDelete
  3. You are the man!!it worked flawlessly...was searching around for way of doing this...stumble upon your blog and it does actually work without the need to install HP Network Utility....used with HP Proliant DL160G6 with Server 2012 Hyper-V core. FYI...if the NIC dont have the Vlan Filtering key...you can just create it!

    ReplyDelete
  4. Worked for me too. Great tip, saved me hours of troubleshooting.

    ReplyDelete
  5. Great! Thank you from hamburg!

    ReplyDelete
  6. It is still there in the official release, in my case a separate Intel PRO/1000 MT Dual Port. Thank you, it saved me hours!!

    ReplyDelete
  7. Great, Hyper-V 2012 has the same flaw ;(

    ReplyDelete
  8. Dinko,
    How in the world did you know how to fix this? All this is new to me as I'm a VMware admin and VLAN tagging is simple there. Being new to Hyper-V I thought I was doing something wrong. Turns out you have to hack the registry?

    Great fix. I've been working on this for HOURS! Works great, now.

    Thanks for sharing!

    ReplyDelete
  9. you saved me hours probably days.

    thanks

    ReplyDelete
  10. Hi,

    I have a home PC with WS2012 R2 edition for testing and got the same problem - one of cards is onboard Realtek, the other one is Intel(R) PRO/1000 MT Desktop Adapter .
    With onboard Realtek everything was working like charm, but when i switch to Intel VLANs doesn't work.
    The DWORD key in registry was set to 1, changing to 0 solved the problem.

    p.s. i looked in device manager for PCI_VEN numbers and Search in registry for them, that was much faster than looking in all of the subclass folders.

    ReplyDelete