3.3. Using VLANs

A cOS Core virtual machine can have virtual adapters which perform VLAN filtering. Configuring this on an adapter is done with the following steps:

  1. Use PowerShell to execute a command with the following form:
    Set-VMNetworkAdapterVlan
    		-VMName <vm-name>
    		-VMNetworkAdapterName "<adapter>"
    		-Trunk
    		-AllowedVlanIdList "1-4094"
    		-NativeVlanId 0
    Note that this can only be done using PowerShell.
  1. Enable MAC address spoofing on the virtual network adapter.

    This can be done when configuring the virtual machine using Hyper-V Manager (see Section 3.1, Using Hyper-V Manager) or when using Powershell (see Section 3.2, Using PowerShell).