1. Introduction
1.1. Requirements
2. Determining the gateway
3. Applying the configuration
3.1. Debian & derivatives (Ubuntu, CrunchBang, SteamOS…)
3.2. Redhat & derivatives (CentOS, Scientific Linux, ClearOS…)
3.3. FreeBSD 8.0
3.4. Windows 2003
3.5. Windows 2012 / Hyper-V
3.6. Other distributions

1. Introduction

Bridged networking can be used to configure your Virtual Machines. Some tweaking is necessary to make the network configuration work on our network.
Lines highlighted in yellow in the configuration examples keywords in capital letters that you must change for your own values. For example; IP_FAIL_OVERwhich you must change for your failover IP.

DEFAULT_SERVER_IP:	The primary IP of your dedicated server.
IP_FAIL_OVER:		The Failover IP you want to configure
GATEWAY_VM:		Your server IP with the last octet replaced by 254

1.1. Requirements

  • A dedicated server with an hypervisor installed (Ex: VMware ESXi, Citrix Xen Server, Proxmox, etc.)
  • Have assigned a mac to a virtual IP FailOver
  • Knowledge about SSH

2. Determining the gateway
To configure Virtual Machines, you need to know the gateway of your host machine (nsxxx.ovh.net; ksxxx.ovh.net …). To do this, you must replace the last octet of the IP address assigned to your server with .254.

For example:
  • IP of your server: 123.456.789.012
  • Gateway’s IP is your server’s main IP ending in .254
  • So the gateway’s IP is: 123.456.789.254

3. Applying the configuration

The gateway you need to use in your virtual machine should not be The IP of your dedicated server or IP failover but you must use the gateway provides for your dedicated server. You must in no case use:
# route add default gw dev eth0
Otherwise you may cut your IP for the virtual server. To determine the correct gateway to use:
        IP failover is: YYY.YYY.YYY.YYY
        Main IP of your dedicated server: XXX.XXX.XXX.XXX
        So the IP of the gateway for your virtual machine (GATEWAY_VM) : **XXX.XXX.XXX**.254
This gateway will be referred as GATEWAY_VM later in the guide.

3.1. Debian & derivatives (Ubuntu, CrunchBang, SteamOS…)
File: /etc/network/interfaces

 1	auto lo eth0
 2	iface lo inet
 3	iface eth0 inet static
 4	address IP.FAIL.OVER
 5	netmask
 6	broadcast IP.FAIL.OVER
 7	post-up route add GATEWAY_VM dev eth0
 8	post-up route add default gw GATEWAY_VM
 9	pre-down route del GATEWAY_VM dev eth0
10	pre-down route del default gw GATEWAY_VM

File: /etc/resolv.conf


NOTE! For Debian 6, dns server configuration is done directly in the file /etc/network/interfaces where you have to find this secton:

# dns-* options are implemented by the resolvconf package, if installed (default)
dns-nameservers # OVH DNS Server
dns-search ovh.net # For faster hosts resolution on the OVH network

3.2. Redhat & derivatives (CentOS, Scientific Linux, ClearOS…) File: /etc/sysconfig/network-scripts/ifcfg-eth0

 1	DEVICE=eth0
 3	ONBOOT=yes
 5	IPV6INIT=no
 6	PEERDNS=yes
 7	TYPE=Ethernet
11	ARP=yes

File: /etc/sysconfig/network-scripts/route-eth0

1	GATEWAY_VM dev eth0	
2	default via GATEWAY_VM dev eth0

File: /etc/resolv.conf

1	nameserver # OVH DNS Server

3.3. FreeBSD 8.0
File: /etc/rc.conf

1	ifconfig_em0="inet IP.FAIL.OVER netmask broadcast IP.FAIL.OVER"
2	static_routes="net1 net2"
3	route_net1="-net GATEWAY_VM/32 IP.FAIL.OVER"
4	route_net2="default GATEWAY_VM"

FIle: /etc/resolv.conf

1	nameserver

3.4. Windows 2003

First, open the “Network Connections” panel (Start -> Control Panel -> Network Connections -> Local Area Connections)
Then, select Properties:
Then, select Internet Protocol (TCP/IP):
Finally, you will need your ip Failover in the field “IP Address”, the subnet mask, the gateway to your physical machine as default gateway and ip as the preferred DNS server.

For the second step, via the Start menu, click Run, then type regedit. Once in the application, you should find your ip-failover (Edit -> Search). Once the IP found, double-click the parameter SubnetMask? “and change to, then you validate.Close the registry editorFinally, to validate the changes, you must restart the network interface (Start -> Control Panel -> Network Connections -> Connection LAN -> right click, then Disable)Wait a few seconds and re-enable the network connection.3.5. Windows 2012 / Hyper-V

First you need to create Virtual Switch.
  1. On the command line of the host server run IPconfig /ALL
  2. Note the name of the network adapter that contains the IP address of the server’s assigned IP.
  3. In Hyper-V manager create the a new virtual switch.
  • Connection Type is External
  • Select the adapter with the server’s IP
  • Check Allow management OS to share this network adapter


NOTE! This step only is required once for a hyper-v server. For all VMs, a virtual switch is required to connect the VM’s virtual network adapters to the server’s physical adapter.

Then select the VM that you wish to add the Failover IP. Use the Hyper-V Manager to change the settings of the VM (it needs to be shutdown).

  1. Expand the Network Adapter and click on Advanced Features.
  2. Change the MAC address to Static and enter the Virtual MAC address for Failover IP.
  3. Press OK to apply changes.


Start the VM and log in as an administrator.

  1. Control Panel > Network and Share Center
  2. Click on the Connections: Ethernet link
  3. Click on Properties Button to show Ethernet Properties
  4. Select Internet Protocol Version 4 (TCP/IPv4)
  5. Click on Properties Button to show IP V4 Properties

3On the IPv4 Properties window:

  1. Select the Use the following IP address
  2. Enter the Failover IP into the IP Address
  3. Enter into the Subnet Mask
  4. Enter your server’s gateway IP address into the Default Gateway (your server’s IP ending with 254)
  5. Enter into the Preferred DNS Server.
  6. Press OK and ignore the warning message about the gateway IP and Assigned IP not being in the same subnet.


Finally, reboot server and the VM should be connected to the internet using the failover IP.

3.6. Other distributions

Here is the network configuration required in the Virtual Machine:
  • ip: IP_FAIL_OVER
  • netmask:
It is also required to add a default gateway to the Virtual Machine:
route add GATEWAY_VM dev eth0
route add default gw GATEWAY_VM
You will then need to configure the DNS of your machine so that it can make domain resolution. The IP of the OVH DNS server is