VLAN not getting to VM
-
Slowly pulling my hair out here. Have a I done something boneheaded?
Hardware:
laptop with 1 port NIC
PFsense installed on a mini pc.- Created VLAN 9 and interface on the router port that connects to laptop.
- enabled DHCP server for the new VLAN
- created VM, made an external vNIC, didn’t set the VLAN ID in the hyper-v GUI.
On the host’s Powershell (admin), I made the network adapter a trunk port, and made the native VLAN “9” with the following command:
Set-VMNetworkAdapterVlan -VMName plexvm -VMNetworkAdapterName "network adapter" -Trunk -AllowedVlanIdList 0-200 -NativeVlanId 9
^ “plexvm” being the name of the VM, “network adapter” being the name of the adapter, allowed 0-200 for some reason, made the native VLAN ID 9.
To check my work I input:
Get-VMNetworkAdapterVlan -VMName "plexvm"I get back:
VMName VMNetworkAdapterName Mode VlanList
plexvm Network Adapter Trunk 9,0-20
This all seems correct to me, yet my VM doesn’t get internet, doesn’t seem to be on this VLAN9.
What should I check? Is Mac spoofing necessary? If so how would I do that? I don’t have a managed switch, is hat necessary? What else might it be???
Rlly appreciate it.
-
I assume you're running the VM on the latop? And the laptop is running Windows? And the laptop itself can connect using the untagged interface?
I expect all the Network config to be in Hyper-V. Rather than the host adapter in Windows.
Steve
-
@stephenw10 yes that’s all correct.
Host is Windows 10 pro running hyper-v, VM guest is Windows 11.
So the power shell stuff should be done in the guest VM?
-
I expect it to be in the Hyper-V setup. Though the NIC itself would probably need to be in promiscuous mode to pass tagged and untagged traffic. The Guest VM shouldn't see the VLAN tagging at all. Though you could probably set that up in a few different ways.
I don't run Hyper-V so I can't help you with it directly.