Overview
This article provides information about the advanced VLAN configuration settings in the Hyper-V environment of Kerio Control.
The condition for using the VLAN in Kerio Control is the trunk definition for the virtual adapter in the VM. This is because it is an advanced feature in managing a virtual switch, and it can only be done through PowerShell commands.
Prerequisites
- One physical ethernet card in a server that is connected directly with an AP (access point).
- Virtual switch in Hyper-V that connects the physical ethernet card with the virtual interface in the Kerio Control appliance.
- On AP side: Create two Wi-Fi, one for workers (VLAN:51) and one for guests (VLAN:52). Do not use the guest portal or a policy on the AP; only use the Wi-Fi.
- On Kerio Control side:
- Create two VLANs (51;52): VLANs 53-54 = optional
- Use physical interface (manage AP), VLAN:51 (workers), and VLAN:52 (guests).
- Create scopes for each on DHCP.
- Define communication rules.
- Create two VLANs (51;52): VLANs 53-54 = optional
Solution
Open the PowerShell and run the following command to set up VLAN:
Get-VM KERIO-CONTROL | Get-VMNetworkAdapter -Name 50 | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList 51-54 -NativeVlanId 0
Note: The parameter -NativeVlanId 0
is important because Hyper-V uses VLAN:0 as native for untagged packed. Hence it must be set when the trunk is defined. Any other native VLAN selected when defining a trunk does not work even if an adapter with the same VLAN:ID is defined in Kerio.