Configuring an IP block in a vRack

This guide will show you how to configure a block of public IP addresses for use with the vRack.

Last updated 24th August 2018


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.


  • 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 OVH Control Panel


For example purposes we'll be using an IP block of and eth1 for the secondary network interface, which is dedicated to the vRack.

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:   Reserved: Network address   First usable IP  Last usable IP  Reserved: Network gateway  Reserved: Network broadcast

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

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.


auto eth1
iface eth1 inet static

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.

# apt-get 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:


# reserved values
255 local
254 main
253 default
0   unspec
# local
#1  inr.ruhep
1 vrack

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


auto eth1
iface eth1 inet static
post-up ip route add dev eth1 table vrack
post-up ip route add default via dev eth1 table vrack
post-up ip rule add from table vrack
post-up ip rule add to table vrack

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 on

Did you find this guide useful?

Please feel free to give any suggestions in order to improve this documentation.

Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.

Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.

Thank you. Your feedback has been received.

These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community

In accordance with the 2006/112/CE Directive, modified on 01/01/2015, prices exclude VAT. VAT may vary according to the customer's country of residence.