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 using a 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
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.
-
Create a ticket with a request to enable Q-in-Q. Specify:
-
VLAN numbers can be viewed in the control panel: from the top menu, click Products → Dedicated Servers → Network → VLAN tab → VLAN column;
-
pools where VLANs are located can be viewed in the control panel: in the top menu, click Products → Dedicated Servers → Network → VLAN tab → Pool column.
-
-
In the ticket created, wait for a Selectel employee to respond that Q-in-Q is enabled.
2. Select a private subnet
Select an unoccupied subnet whose IP addresses will be used to configure network connectivity. See Standard Private IP Address Ranges for details.
3. Configure the network interfaces on the server
Ubuntu
Debian
CentOS
Windows
-
Open the
netplan
utility configuration filewith the vi
text editor:vi /etc/netplan/01-netcfg.yaml
-
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>
— the 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] -
Press ESC.
-
Exit the
vi
text editor with your changes saved::wq
-
Apply the configuration:
netplan apply
-
Optional: reboot the server.
-
Open the network interfaces configuration file with the
vi
text editor:vi /etc/network/interfaces
-
Add Q-in-Q settings for the network interface of the private network:
auto <eth_name>.<id>
iface <eth_name>.<id> inet static
address <ip_address>/<mask>
vlan-raw-device <eth_name>.<id>
mtu 1400Specify:
<eth_name>
— the 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 configuration file for network interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 203.0.113.218
netmask 255.255.255.0
gateway 203.0.113.1
dns-nameserver 198.51.100.1,198.51.101.1
auto eth1
iface eth1 inet static
address 192.168.0.2/24
auto eth1.40
iface eth1.40 inet static
address 10.0.0.15/24
vlan-raw-device eth1.40
mtu 1400 -
Press ESC.
-
Exit the
vi
text editor with your changes saved::wq
-
Restart the network:
service networking restart
-
Optional: reboot the server.
-
Output information about the network interfaces:
ip address
-
Create or open a configuration file for the private network interface of the network with Q-in-Q with the
vi
text editor:vi /etc/sysconfig/network-scripts/ifcfg-<eth_name>
Specify
<eth_name>
is the name of the network interface of the private network with Q-in-Q. -
Add the network interface settings:
NAME="<q_in_q_eth_name>"
ONBOOT=yes
TYPE=Ethernet
VLAN=yes
DEVICE=<basic_eth_name>.<id>
BOOTPROTO=static
IPADDR=<ip_address>
NETMASK=<mask>
NM_CONTROLLED=noSpecify:
<q_in_q_eth_name>
— name of the new network interface;<basic_eth_name>
— The physical interface of the private network to which the VLAN is bound;<id>
— Q-in-Q tag, you can specify a number from 2 to 4094;<ip_address>
— IP address from the new private subnet;<mask>
— subnet mask.
Example configuration file for a network interface
NAME="vlan40"
ONBOOT=yes
TYPE=Ethernet
VLAN=yes
DEVICE=eth1.40
BOOTPROTO=static
IPADDR=10.10.10.10
NETMASK=255.255.255.0
NM_CONTROLLED=no -
Press ESC.
-
Exit the
vi
text editor with your changes saved::wq
-
Restart the network:
systemctl restart network
-
Optional: reboot the server.
-
Start Server Manager Local.
-
Go to the Local Server section.
-
Click NIC Teaming.
-
In the Teams block, click Task → New Team.
-
In the Team name field, enter the name of the group.
-
Check the network adapters that you want to add to the group.
-
Press OK.
-
In the Adapter and Interfaces block, click Tasks → Add Interface.
-
In the Interface name field, enter the name of the new network interface.
-
In the Specific VLAN field, enter the Q-in-Q tag, you can specify a number from 2 to 4094.
-
Press OK.
-
Open the Network and Sharing Center.
-
Open the network interface of the new private network.
-
Click Properties.
-
Select IPv4.
-
Click Properties.
-
In the IP-address field, enter the private IP address of the server, for example
192.168.0.2
. -
In the Subnet mask field, enter the subnet mask.
-
Press OK.