Share via

Hyper-v Virtual Switch Trunk

Handian Sudianto 6,846 Reputation points
2025-09-09T09:48:12.14+00:00

I connecting my hyper-v host to the switch as trunk mode, then i create the hyper-v switch and point to this NIC.

Then i install some windows VM and this VM can get the ip address by enable the VLAN id in the VM.

User's image

Then i install fortigate VM inside the hyper-v and i want to know can we set the NIC for the VM as trunk port?

I try by not enable the VLAN ID in the VM setting, then inside the fortigate i create VLAN 50 for example and the interface is not getting ip address.

Windows for business | Windows Server | Networking | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Domic Vo 17,905 Reputation points Independent Advisor
    2025-09-09T11:51:23.5166667+00:00

    Dear Handian Sudianto,

    In Hyper-V, virtual NICs do not natively support trunk mode in the same way physical switches do. Instead, Hyper-V expects VLAN tagging to be handled at the VM level. For FortiGate VMs, this means the virtual NIC must be configured to pass untagged traffic, while VLAN tagging should be managed within the FortiGate OS itself.

    To achieve this, please ensure the VLAN ID is not set in the VM settings, allowing the FortiGate to handle tagging internally. Additionally, confirm that the virtual switch is connected to a physical NIC operating in trunk mode and that the upstream switch allows the relevant VLANs.

    If the interface inside FortiGate still fails to receive an IP address, we recommend verifying VLAN configuration on both the FortiGate and the physical switch, and ensuring DHCP is active for the VLAN in question.

    I hope this helps. Just kindly tick Accept Answer that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    Best regards,

    Domic Vo

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.