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'm setting up OpenBSD as a VM in HyperV 2012. It would be easier for me to just create one interface on the vm and have OpenBSD take care of setting up the vlans.

Is it possible to tell HyperV to send all traffic to a port whether it's tagged or not?

If I uncheck the "Enable virtual LAN identification" it looks like HyperV is only sending untagged traffic to the port.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Using the PowerShell Set-VMNetworkAdapterVlan cmdlet, you can turn on trunk mode on the virtual NIC. I don't think there is an equivalent GUI option for this.

Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList "100,101" -VMName "VmName" -VMNetworkAdapterName "TrunkNic" -NativeVlanId 1
  • -Trunk turns on trunk mode, which leaves the VLAN tags intact.
  • -AllowedVlanIdList specifies which VLAN's to allow the guest to use. This parameter is mandatory in trunk mode. If you have a largeish number of VLANs, you also can use ranges like -AllowedVlanIdList "1-4000"
  • -NativeVlanId is required, too. It specifies which VLAN outgoing untagged packets belong to. I think that it also has strips off the VLAN tag for incoming packets on that VLAN. Or something like that. I remember that there was a weird behavior here that I completely sidestepped by just setting this to an unused, blackholed VLAN and not using the untagged interface in the guest, because that was easier to configure and seemed less fragile to me.
share|improve this answer
    
Thanks a lot, I'll check it out tomorrow and let you know how it works! –  Guillaume Filion Jun 25 '13 at 21:56
    
It looks to me the VM's VLAN in range of AllowedVlanIdList can not talk to each other. The VMs on NativeVlanId can talk to each other. Does some settings miss? Does the Nic should connect to which virtual switch? –  user183623 Jul 30 '13 at 11:18

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.