Configuring the vRack between the Public Cloud and a Dedicated Server

Objective

The OVHcloud vRack allows you to configure private network addressing between two or more OVHcloud Dedicated Servers. But it also allows you to add Public Cloud instances to your private network so that you can create an infrastructure of both physical and virtual resources.

This guide will show you how to configure private networking between a Public Cloud instance and a Dedicated Server.

Requirements


OVHcloud Control Panel Access


Warning

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

Please visit our comparison page for more information.

Instructions

Add a Public Cloud project to the vRack

Info

This does not apply to newly created projects, which are automatically delivered with a vRack. Once the project has been created, you can view the vRack by opening the Network menu in the left-hand sidebar and selecting vRack Private Network.

You can also remove the project from its allocated vRack and attach it to another vRack if you wish, particularly if you already had an existing vRack with your dedicated server(s).

From the list of eligible services, select the project you want to add to the vRack and click the Add button.

add project to vrack

Integrating an instance into the vRack

Info

This guide focuses on a simple vRack configuration between a Public Cloud instance and a dedicated server. If you have set up your instance(s) with a deployment mode such as local zones or multi AZ, note that local zones do not support the vRack for now. Additionally, the vRack is a global L2 network and does not support "zone" or "region" level resilience.

Two situations may arise:

  • The instance does not exist yet.
  • The instance already exists and you must attach a private network to it.

In case of a new instance

If you need assistance, follow this guide first: Creating your first Public Cloud instance. When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into.

In case of an existing instance

Once your project is linked to a vRack, you can create a private network and attach it to existing instances.

Go to the Public Cloud tab, then click Private Network under Network in the left sidebar.

Click on Add Private Network.

create private network

The following page allows you to customise multiple settings.

Select the region in which you want the private network to be located. Make sure it is in the same region as the existing instance.

select region

For both services to communicate with each other, they have to be tagged with the same VLAN ID.

This can be configured in the next step.

configure network

This section offers several configuration options. For the purpose of this guide, we will focus on the necessary ones. Click on the tabs below to view the details:

Private Network Name
Layer 2 network options
Using a different VLAN ID
DHCP address distribution options

Enter a name for your private network.

Once done, click on Configure your private network. This will take a few minutes.

In the dashboard of the instance concerned, locate the "Networks" section and click on the ... button next to "Private networks". Select Attach a network.

attach network

In the popup window, select the private network(s) to attach to your instance and click on Attach.

attach network

Configure your network interfaces

Info

If you chose the option to configure the private network on your instance using DHCP, you only need to configure the network interfaces on the dedicated server.

Configuration when using the default VLAN ID 0

Before you begin, connect to your server via SSH and list your network interfaces with the following command:

ip a

For dedicated servers, locate the line that begins with link ether and verify that this interface matches the Private interface listed in the Network interfaces tab of your server’s dashboard.

Use this interface name to replace NETWORK_INTERFACE in the configurations below (example: eth1).

For example purposes, we will use the IP address range of 192.168.0.0/16 (Subnet mask: 255.255.0.0).

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

Using a text editor of your choice, open the network configuration file located in /etc/network/interfaces.d for editing. Here the file is called 50-cloud-init.

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

Add the following lines to the existing configuration, replace NETWORK_INTERFACE, IP_ADDRESS and NETMASK with your own values:

auto NETWORK_INTERFACE
iface NETWORK_INTERFACE inet static
   address IP_ADDRESS
   netmask NETMASK

Example

debian config

Save your changes to the config file and exit the editor.

Restart the networking service to apply the configuration:

sudo systemctl restart networking
Configuration when using a different VLAN ID

In this example, we'll use 10 as the VLAN ID (tag), and 192.168.0.0/16 as the private IP address range.

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

The configuration below is based on Debian 11 (Bullseye).

  • Before you begin, establish an SSH connection to your server and run the following commands to install the VLAN package:
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'
  • Retrieve the interface names and identify the private interface:
ip a

In this example, the private network interface is identified as eno2.

  • Next, create a VLAN subinterface for the network interface (non-persistent configuration) and assign (tag) it the VLAN ID. In this example, the VLAN ID is 10.

Replace the values with your own.

sudo ip link add link eno2 name eno2.10 type vlan id 10
  • Next, assign a private IP address to the newly created VLAN subinterface:
sudo ip addr add 192.168.0.14/16 dev eno2.10
  • Next, activate the private interface and the VLAN subinterface:
sudo ip link set dev eno2 up
sudo ip link set dev eno2.10 up
  • To make the configuration persistent, add the following entries to the configuration file:
sudo nano /etc/network/interfaces.d/50-cloud-init
auto eno2.10
iface eno2.10 inet static
   address 192.168.0.14
   netmask 255.255.0.0
   broadcast 192.168.255.255
   vlan-raw-device eno2
  • Overview:
config
  • Restart the network to apply the changes:
sudo systemctl restart networking

Go further

Creating multiple vLANs in a vRack

Join our community of users.

Was this page helpful?