Can one make Hyper-V’s virtual networking ignore VLAN tagging

hyper-vhyper-v-server-2008-r2vlan

Is there any way to make Hyper-V's (Hyper-V Server 2008 R2 SP1) networking subsystem ignore VLAN tagging and just accept all packets that the physical NIC accepts? …hopefully by actually ignoring tagging completely and not via some wildcard setting?

Consider this simplified scenario. You have your Hyper-V host connected to a switch via a single cable; the host has a single VM (guest) running on it. Everything has network connectivity; both the host and guest can get to the Internet, and to each other, via TCP/IP (you can ping, RDP, etc.). Next, someone turns on VLAN tagging in the switch such that all packets traveling through it are tagged with VLAN 2. Your host and guest have now lost all network connectivity.

How can you tell Hyper-V to ignore the fact that incoming packets are now tagged with VLAN 2? They physical NIC is ignoring the tagging just fine, so can Hyper-V do it also?

Backstory

So here's the situation. I've got a switch divided into 2 distinct collision domains, but it was done by setting up a VLAN because I had no other choice. The Hyper-V host is physically plugged into one port on one of those collision domains; the host and all VMs are expected to work within that same collision domain. Nothing except the switch has any sort of VLAN configuration; all connected machines behave simply as if there were 2 independent "dumb" switches being used. I would like it to remain this way.

However, in Hyper-V Manager, when I go into the "Virtual Network Manager" dialog to add a new External (physical) interface, if I don't choose the proper VLAN ID (for the host/"parent partition"), the NIC loses all network connectivity. That's because while the physical NIC doesn't care, the new Microsoft Virtual Switch does—and dutifully drops the packets. …and each VM also has to have the same VLAN ID configured or the VM can't get a network connection.

(FYI, this particular "gotcha" caused untold torment because there's no reporting of such activity anywhere in Hyper-V, and its out-of-the-box behavior is exactly opposite of what physical NICs do.)

Edit: Attempted to clarify my "backstory" and added a simplified example scenario.

Best Answer

Is the upstream physical switch port set to a trunk? It shouldn't be sending tagged traffic unless it is, or if it's explicitly configured to do so. If you could convince the admin of the physical switch to set the native vlan on the port to 2, your upstream traffic would make it there correctly, but you're still probably going to receive tagged traffic downstream.

My opinion: You're wasting time. If you're receiving tagged traffic, then you should just configured the right tag on all required ports physical or virtual on the HyperV host and call it a day. With 10 VM's this would take me all of about 15 seconds on a VMware machine, I can't imagine HyperV taking much more effort. Good luck finding a solution to it they way you WANT it, but I doubt it's going to happen.