For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/creating-multiple-vlans-vrack.md.
  • English

Creating multiple VLANs in a vRack

View as Markdown

Learn how to create multiple VLANs within the vRack.

The standard vRack configuration enables you to create only one VLAN. This means that you can only use each IP address once. However, with the vRack version 2.0 configuration, you can create up to 4,000 VLANs within a single vRack, allowing you to use each IP address up to 4,000 times.

 

Requirements

Warning

NOTE: This feature might be unavailable or limited on servers of the Eco product line.

Please visit our comparison page for more information.

 

Instructions

Linux

Info

As an example, we'll use eno2 as the network interface, 10 and 11 as the VLAN tags, and 192.168.0.0/16 and 10.0.0.0/16 as the private IP address ranges.

All commands must be adapted to the distribution used. Please refer to the official documentation for your distribution if you have any doubts.

Debian 11
Ubuntu / Debian 12+
AlmaLinux and Rocky Linux (8 & 9)
Fedora 42+ / AlmaLinux and Rocky Linux (10)

Debian 11

First, establish an SSH connection to your server and run the following commands from the command line to install the VLAN package on your server:

sudo apt update
sudo apt install vlan

Next, load the 8021q kernel module:

sudo modprobe 8021q

To verify that the module is loaded:

user@server:~$ lsmod | grep 8021q
8021q                  40960  0
garp                   16384  1 8021q
mrp                    20480  1 8021q

Run the following command to ensure the modules are permanently loaded at boot:

sudo su -c 'echo "8021q" >> /etc/modules'

Next, retrieve your interface names and identify the private interface:

ip a

Next, create a VLAN tag. The tag serves as an identifier, allowing you to differentiate between multiple VLANs:

sudo ip link add link <parent-interface> name <vlan-identifier> type vlan id <ID>

In this example:

sudo ip link add link eno2 name eno2.10 type vlan id 10

Use the same command for each VLAN tag you wish to add.

Next, declare the private IP address range within the vRack and tag it with the identifier using the following command:

sudo ip addr add 192.168.0.10/16 dev eno2.10

Amend the configuration of your network interface to incorporate the VLAN tag. Open your network interface configuration file and add the following entries:

sudo nano /etc/network/interfaces.d/50-cloud-init

auto eno2.10
iface eno2.10 inet static
address 192.168.0.10
netmask 255.255.0.0
broadcast 192.168.255.255
vlan-raw-device eno2

For multiple configured VLANs, your network configuration should look like this:

Bare metal cloud dedicated servers - step 2

 

Windows

Log on to your server via a remote desktop connection and open the Server Manager app. Then select Local Server. Now click the Disabled link next to NIC Teaming.

Network VLANs - step 3

Next, right-click on the network interface and select Add to New Team.

Network VLANs - step 4

In the pop-up window, create a new team by typing a team name into the Team name field. When you have finished, click OK.

Network VLANs - step 5

Next, we need to define the VLAN tag. In the Adapters and Interfaces pane of the NIC Teaming screen, right-click on the interface you have just added to the new team, then click Properties. Now click Specific VLAN: and define the tag:

Network VLANs - step 6

Now, we need to configure the IP address of the VLAN. Click the Start button on your keyboard, then click Control Panel.

Network VLANs - step 7

 

Next, click Network and Internet.

Network VLANs - step 8

 

Then Network and Sharing Center.

Network VLANs - step 9

 

Then click Change adapter settings.

Network VLANs - step 10

 

Next, right-click the VLAN interface and click Properties.

Network VLANs - step 11

 

Note that in our example Ethernet 2 is the interface used for the vRack. However, the vRack NIC may be a different interface in your configuration. The correct one to select will be the interface that does not have the server's main IP address or has a self-assigned IP.

Then double-click Internet Protocol Version 4 (TCP/IPv4).

Network VLANs - step 12

 

Next, click Use the following IP address. For IP address, type in an IP from your internal range. For Subnet mask, type in 255.255.0.0.

Finally, click the OK button to save the changes, then reboot your server.

Network VLANs - step 13

 

Go further

Browse all the Dedicated Servers guides.

Browse the rest of the OVHcloud US documentation for guides on our other products and services.

Learn more about Dedicated Servers on the OVHcloud US website.