Fortinet black logo
7.2.0

VLAN tagging

VLAN tagging

Refer to the following documentation:

Configure virtual local area networks for Hyper-V

https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/deploy/configure-virtual-local-areal-networks-for-hyper-v

Hyper-V PowerShell Module

Hyper-V PowerShell Module is required to configure VLAN tagging. To view a list of Hyper-V related cmdlets on the system, type

PS C:\> Get-Command –Module Hyper-V

If the system does not return results, the Hyper-V PowerShell module must be installed. The module must be imported separately, by doing the following:

  1. Load the ServerManager Module. Type

    Import-Module ServerManager

  2. To respond to the security warning, type 'R' <ENTER> to proceed with loading the ServerManager module.

  3. Load the Hyper-V PowerShell Module located in the Remote Server Administration Tools feature. Type

    Add-WindowsFeature RSAT-Hyper-V-Tools –IncludeAllSubFeature

  4. After a few minutes you'll receive the system response that the installation was successful and that no restart (reboot) is needed.

Configure VLAN Tagging

  1. To create virtual adapters and tag VLANs, type:

    Add-VMNetworkAdapter -SwitchName HYPERV1 -VMName "NS-Application-Server" –Name "port2"

    Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList "317,318" -VMName "NS-Application-Server" -VMNetworkAdapterName "port2" -NativeVlanId 1

  2. Confirm that the changes have been applied. Type

    Get-VMNetworkAdapterVlan

For more details and additional commands regarding VLAN tagging, refer to the following Microsoft document:

Supported CentOS and Red Hat Enterprise Linux virtual machines on Hyper-V

https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/supported-centos-andred-hat-enterprise-linux-virtual-machines-on-hyper-v

VLAN tagging

Refer to the following documentation:

Configure virtual local area networks for Hyper-V

https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/deploy/configure-virtual-local-areal-networks-for-hyper-v

Hyper-V PowerShell Module

Hyper-V PowerShell Module is required to configure VLAN tagging. To view a list of Hyper-V related cmdlets on the system, type

PS C:\> Get-Command –Module Hyper-V

If the system does not return results, the Hyper-V PowerShell module must be installed. The module must be imported separately, by doing the following:

  1. Load the ServerManager Module. Type

    Import-Module ServerManager

  2. To respond to the security warning, type 'R' <ENTER> to proceed with loading the ServerManager module.

  3. Load the Hyper-V PowerShell Module located in the Remote Server Administration Tools feature. Type

    Add-WindowsFeature RSAT-Hyper-V-Tools –IncludeAllSubFeature

  4. After a few minutes you'll receive the system response that the installation was successful and that no restart (reboot) is needed.

Configure VLAN Tagging

  1. To create virtual adapters and tag VLANs, type:

    Add-VMNetworkAdapter -SwitchName HYPERV1 -VMName "NS-Application-Server" –Name "port2"

    Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList "317,318" -VMName "NS-Application-Server" -VMNetworkAdapterName "port2" -NativeVlanId 1

  2. Confirm that the changes have been applied. Type

    Get-VMNetworkAdapterVlan

For more details and additional commands regarding VLAN tagging, refer to the following Microsoft document:

Supported CentOS and Red Hat Enterprise Linux virtual machines on Hyper-V

https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/supported-centos-andred-hat-enterprise-linux-virtual-machines-on-hyper-v