Configuring an IP block in a vRack
Objective
As well as private IP addressing, the vRack also allows you to route public IP traffic through your server's vRack port using a public IP address block.
This guide will show you how to configure a block of public IP addresses for use with the vRack.
vRack supports both IPv4 and IPv6 public routing with Additional IP address blocks. You can find the instructions on how to configure IPv6 blocks in this guide: "Configuring an IPv6 block in a vRack".
This article is focusing on Additional IP configuration over a vRack network. If you look for guidance on Additional IP configuration together with primary IP (on public network interface), read the following articles:
Requirements
- A public block of IP addresses in your account, with a minimum of four addresses
- Your chosen private IP address range
- A vRack compatible server
- A vRack service activated in your account
- Access to the OVHcloud Control Panel
This feature might be unavailable or limited on servers of the Eco product line.
Please visit our comparison page for more information.
Instructions
For example purposes we'll be using an IP block of 46.105.135.96/28 and eth1 for the secondary network interface, which is dedicated to the vRack.
Also for example purposes, the network configuration file we refer to is located in /etc/network/interfaces. The equivalent file on your server may be located somewhere else, depending on your operating system. The file content may also be different. If you encounter any difficulties, please refer to the official documentation for your distribution.
Add the IP block to the vRack
Once an IP block is added to the vRack, it is no longer attached to a physical server.
This setup allows you to configure IPs of the same block on multiple servers, provided that these servers are all in the same vRack as the IP block. The IP block must have at least 2 usable IPs or more for this to be possible.
In your OVHcloud Control Panel, go to the Bare Metal Cloud section and click on Network. Next, open the vRack menu.
Select your vRack from the list to display the list of eligible services. Click the IP block you wish to add to the vRack and click on the Add button.

Configure a usable IP address
For vRack purposes, the first, penultimate, and last addresses in any given IP block are always reserved for the network address, network gateway, and network broadcast respectively. This means that the first useable address is the second address in the block, as shown below:
To configure the first usable IP address, we need to edit the network configuration file, as shown below. In this example, we need to use a subnet mask of 255.255.255.240.
The subnet mask we've used in our example is appropriate for our IP block. Your subnet mask may differ depending on the size of your block. When you purchase your IP block, you'll receive an email that will tell you which subnet mask to use.
Create a new IP routing table
First, we need to download and install iproute2, which is a package that will enable us to manually configure IP routing on the server.
Establish an SSH connection to your server and run the following command from the command line. This will download and install iproute2.
Next, we need to create a new IP route for the vRack. We'll be adding a new traffic rule by amending the file, as shown below:
Amend the network configuration file
For example purposes, the network configuration file we refer to is located in /etc/network/interfaces. The equivalent file on your server may be located somewhere else, depending on your operating system.
Finally, we need to amend the network configuration file to account for the new traffic rule and route the vRack traffic through the network gateway address of 46.105.135.110.
Now reboot your server to apply the changes.
Go further
Configuring the vRack on your dedicated servers
Creating multiple vLANs in a vRack
Configuring the vRack between the Public Cloud and a Dedicated Server
Join our community of users.