VLAN trunking

VLAN trunking allows a single physical interface (trunk) to carry traffic for multiple VLANs simultaneously. In Virtuozzo Hybrid Infrastructure, VLAN trunking is provided by either the Linux kernel subsystem or Open vSwitch (OVS). Understanding how they differ is essential for network design.

Linux VLANs

Linux VLANs are created directly on physical or bonded network interfaces (for example, eth0 or bond0). Each VLAN is represented as a subinterface, which allows separate configuration per VLAN. For Linux VLANs, the kernel handles VLAN tag insertion and removal.

The parent interface functions as a trunk, carrying all VLAN-tagged traffic for its subinterfaces.

Example configuration:

  • eth0 is the parent Ethernet interface
  • eth0.100 and eth0.200 are Linux VLANs

Linux VLANs are configured in the infrastructure and can be used for the storage, internal management, and VXLAN traffic.

OVS VLANs

OVS VLANs are created on bridge interfaces (for example, br-eth0 or br-bond0), which function as software switches. OVS handles VLAN tagging and forwarding internally, maintaining a switching table. OVS bridges operate as trunk interfaces, allowing multiple VLANs to pass through a single uplink.

Example configuration:

  • eth0 is the Ethernet interface
  • br-eth0 is the bridge interface
  • br-eth0.1 and br-eth0.2 are OVS VLANs

OVS VLANs are configured in the compute cluster and used for VM public traffic.

Mixed VLAN deployments

Linux VLANs and OVS VLANs can coexist, but mixing them requires careful planning to avoid conflicts.

Example scenario:

  1. Linux VLANs are created on the eth0 Ethernet interface: eth0.100, eth0.200.
  2. Later, the compute cluster is created using the same physical interface. This creates an OVS bridge br-eth0, turning it into an OVS trunk interface.
  3. VLANs created within the compute cluster become OVS VLANs: br-eth0.1 and br-eth0.2.

Do not assign the same VLAN ID to both Linux and OVS VLANs on the same parent interface (for example, eth0.100 and br-eth0.100), as this will cause traffic issues and VM connectivity problems.