Skip to main content
Q-in-Q
Last update:

Q-in-Q

Q-in-Q is a technology that allows you to create multiple isolated segments within a single VLAN by adding an additional tag to the Ethernet packet header.

With Q-in-Q enabled on a Selectel network, you can pass your VLAN IDs on a port and tags will be delivered over the LAN between your servers.

Q-in-Q customization is needed:

  • for Direct Connect service operation when a trunk port is configured on the operator's side;

  • To configure a trunk port in VMware ESXi on a dedicated server with VMware;

  • to use different VLAN segments on a dedicated server on which virtual servers are deployed. In this case, the dedicated server is privately networked with the virtual server by using global router and tagged traffic with your VLAN IDs is terminated on the global router and routed to the virtual server.

Customize Q-in-Q

  1. Enable Q-in-Q on the switch port.

  2. Select a private subnet.

  3. Configure the network interfaces on the server.

Enable Q-in-Q on the switch port

Q-in-Q can only be enabled for a private network.

When Q-in-Q is enabled, there may be a brief private network down time for servers on the selected VLAN.

  1. Create a ticket with a request to include Q-in-Q. Specify:

    • VLAN numbers can be viewed in control panels under Servers and hardwareNetwork → tab VLAN → column VLAN;

    • The pools in which the VLANs are located can be viewed in the control panels under Servers and hardwareNetwork → tab VLAN → column Poole.

  2. In the ticket created, wait for a Selectel employee to respond that Q-in-Q is enabled.

Select a private subnet

Select an unoccupied subnet whose IP addresses will be used to configure network connectivity. For details, refer to the subsection Standard ranges of private IP addresses.

configure the network interfaces on the server

  1. Connect to the server via SSH or through KVM console.

  2. Open the utility configuration file netplan with the vi text editor:

    vi /etc/netplan/01-netcfg.yaml
  3. Add Q-in-Q settings for the network interface of the private network:

    ...
    vlans:
    <eth_name>.<id>:
    id: <id>
    link: <eth_name>
    mtu: 1400
    addresses:
    - <ip_address>/<mask>

    Specify:

    • <eth_name> — name of the network interface of the private network;
    • <id> — Q-in-Q tag, you can specify a number from 2 to 4094;
    • <ip_address>/<mask> — IP address from the new private subnet with mask.
    Example of a netplan utility configuration file
    network:
    version: 2
    renderer: networkd
    ethernets:
    eth0:
    addresses: [203.0.113.0/24]
    gateway4: 203.0.113.1
    nameservers:
    addresses: [198.51.100.1,198.51.101.1]
    eth1:
    addresses: [192.168.0.2/24]
    ...
    vlans:
    eth1.40:
    id: 40
    link: eth1
    mtu: 1400
    addresses:
    - [10.0.0.15/24]
  4. Click ESC.

  5. Exit the vi text editor with your changes saved:

    :wq
  6. Apply the configuration:

    netplan apply
  7. Optional: reboot the server.