@PieroB - Thank you for reaching Microsoft QnA platform
It seems like you're experiencing issues with VLAN tagging in your Hyper-V configuration. Here are a few things to check based on your description:
- VLAN Configuration: Ensure that the VLAN ID you are using (VLAN 4) is properly configured on both the Hyper-V host and the physical switch. The switch ports must be configured to allow traffic for VLAN 4 and should not be blocking it.
- Trunk Port Configuration: Verify that the trunk port on the Hyper-V host is set up correctly. The trunk should allow the VLANs you are trying to use. You can check this with the following PowerShell command:
This will show you the current VLAN configuration for the VM.Get-VMNetworkAdapterVlan -VMName "testvlan"- Network Adapter Settings: Make sure that the network adapter settings in the VM are correctly set to use the trunk mode. You might also want to check if the native VLAN ID is set correctly and that it matches the configuration on the physical switch.
- Firewall and Security Settings: Check if there are any firewall rules or security settings that might be blocking traffic from the VM to external networks when using tagged VLANs.
- Physical Switch Configuration: Since the hardware vendor has ruled out issues with the switches, ensure that the switch ports connected to the Hyper-V host are configured to handle tagged VLAN traffic correctly. This includes checking that they are set to trunk mode and allowing the necessary VLANs.
- Testing with Different VLANs: If possible, try configuring the VM to use a different VLAN ID to see if the issue persists. This can help determine if the problem is specific to VLAN 4.
If after checking these points the issue still exists, consider reviewing the logs for any errors related to networking or VLAN tagging that might provide further insights into the problem.
References: