Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two VLANs on my network. VLAN 100 for users in the office, and VLAN 10 for visitors/guests. Neither VLAN has access to the other, and each has its own internet connection. However, I want to set up a hyper-v server to control the public workstations on the guest network (VLAN 10).

On the physical server, I have two NICs which are teamed using BACS4.

I want to allow VLAN 100 full access to the server. I do not want VLAN 10 to see the physical server at all--just the hyper-v VM.

Currently, the switch ports are configured for link aggriation and are in access mode for VLAN 100.

I've tried all sorts of combinations and procedures, but have not had any luck getting everything working properly.

Here's what I've tried, which seems to be the closest that I've gotten:

  1. Add two VLAN NICs to the team (VLAN 100 and VLAN 10)
  2. Change the switch port mode to trunk and add VLAN 100 and VLAN 10)
  3. In hyper-v, create a new external virtual adapter using the VLAN 10 virtual NIC.

Under these conditions, the physical server is available to the VLAN 10 network.

These is some sort of glitch in hyper-v where I can sometimes get the "enable virtual LAN identification for management operating system" option available. If I enable that and set the VLAN ID to 10, the hyperv adapter throws an error message and fails to be created.

What is the correct approach for setting this up?

share|improve this question
1  
all you have is 2 nics? –  tony roth Jul 10 '12 at 18:42
    
Beyond issues of bandwidth, is that significant? –  Force Flow Jul 10 '12 at 18:45
    
Yes. It's always better to have (at least) one dedicated NIC for host management, f.e. so that you don't lose connectivity to the host if the VM networking gets misconfigured and/or crashes. –  Massimo Jul 18 '12 at 14:18

2 Answers 2

Hyper-V can and will happily handle VLAN trunking or NIC teaming (although not as easily as ESX/i), but things can get quite crazy when you want both of them at the same time (which is a definitely common configuration for real virtualization hosts).

First of all, Microsoft just doesn't want to get dragged into this; their official position is "this is a hardware thing, so call your hardware vendor": http://support.microsoft.com/kb/968703; that means you are basically on your own.

There are two ways to have both NIC teaming and VLAN trunking on Hyper-V hosts: either handle both of them at the NIC level, or handle teaming at the NIC level and VLANs at the Hyper-V level.

With the first approach (the one suggested by Force Flow), you use the NIC's management software to create the team and then to create a virtual adapter for each VLAN; then, in Hyper-V, you configure each of these adapters for either virtual machine traffic, OS traffic, or both. Hyper-V doesn't see any VLAN at all, because the NIC software is handling them.

With the second approach, you only use the NIC's management software to create the team; then, in Hyper-V, you configure the team for virtual machine traffic, and in each VM connection you specify the VLAN to use. This allows for more flexibility (and less virtual adapters hanging around in the OS), but requires the teaming software to transparently forward tagged Ethernet frames to Hyper-V, which quite often requires up-to-date drivers and management software, and some specific configuration in the team properties, too.

share|improve this answer
up vote 2 down vote accepted

The teaming software needed to create the two virtual adapters, with each one assigned to a VLAN.

When creating the hyper-v external virtual adapter, the "allow management operating system to share this network adapter" option needed to be checked for VLAN 100 and unchecked for VLAN 10.

The LAG on the switch needed to be in trunk mode with VLANs 100 and 10.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.