This guide will show you how to configure a block of public IP addresses for use with the vRack.
Note: VLAN tagging is not supported when configuring a failover IP block on vRack so make sure any traffic you send over the vRack is untagged. Additionally, traffic over any given vRack cannot exceed 600 Mbps.
- 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 Manager
For example purposes, we’ll be using an IP block of 220.127.116.11/28 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:
18.104.22.168 Reserved: Network address 22.214.171.124 First usable IP 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 Last usable IP 126.96.36.199 Reserved: Network gateway 188.8.131.52 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 255.255.255.240.
Note: 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.
/etc/network/interfaces auto eth1 iface eth1 inet static address 184.108.40.206 netmask 255.255.255.240 broadcast 220.127.116.11
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 install iproute2
Next, we need to create a new IP route for the vRack. We will be adding a new traffic rule by amending the file, as shown below:
/etc/iproute2/rt_tables # # 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 18.104.22.168.
/etc/network/interfaces auto eth1 iface eth1 inet static address 22.214.171.124 netmask 255.255.255.240 broadcast 126.96.36.199 post-up ip route add 188.8.131.52/28 dev eth1 table vrack post-up ip route add default via 184.108.40.206 dev eth1 table vrack post-up ip rule add from 220.127.116.11/28 table vrack post-up ip rule add to 18.104.22.168/28 table vrack
Now reboot your server to apply the changes.