Search


print PDF
How to configure hosts for the distributions of virtualization to bridge?

Explanation


You can configure your Virtual Machine in bridge mode. Some changes must be made on the VM to make a working network configuration. In blue are the file names to edit (with vi, nano, pico ...) and the content. The configurations, the fields should be replaced, they will be in red.

Requirements


A dedicated server with VMware ESXi and Citrix Xen Server
Have assigned a mac to a virtual IP FailOver
Know about SSH

Determine 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 group of numbers assigned to your server with .254.
You can find the IP of your server in the OVH Manager.

ex :

IP of your server : 123.456.789.012
IP gateway is your server's IP ending in .254
Gateway is: 123.456.789.254

Debian Like (Debian, Ubuntu...)

WARNING: Under no circumstances use the primary IP of your server as the gateway! You must under no circumstances use: route add default gw dev eth0 or you could cut your IP from the virtual server.

  • For Debian 6*, the DNS server configuration is done directly in the file /etc/network/interfaces or you find it in this section:

  1. dns-* options are implemented by the resolvconf package, if installed (default)
dns-nameservers 213.186.33.99 # OVH DNS Server dns-search ovh.net # To quickly fix the hosts on the OVH network

/etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address IP Failover
netmask 255.255.255.255
broadcast IP Failover
post-up route add Dedicated Server IP but end in .254 dev eth0
post-up route add default gw Dedicated Server IP but end in .254
post-down route del Dedicated Server IP but end in .254 dev eth0
post-down route del default gw Dedicated Server IP but end in .254


/etc/resolv.conf
nameserver 213.186.33.99

Redhat Like (Redhat, Centos...)

WARNING: Under no circumstances use the primary IP of your server as the gateway! You must under no circumstances use: route add default gw dev eth0 or you could cut your IP from the virtual server.

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.255
IPADDR=IP Failover
GATEWAY=Dedicated Server IP but end in .254
ARP=yes
HWADDR=Your Virtual Mac Address

/etc/sysconfig/network-scripts/route-eth0
Dedicated Server IP but end in .254 dev eth0
default via Dedicated Server IP but end in .254 dev eth0

/etc/resolv.conf
nameserver 213.186.33.99

Other Distributions

WARNING: Under no circumstances use the primary IP of your server as the gateway! You must under no circumstances use: route add default gw dev eth0 or you could cut your IP from the virtual server.

This is the network configuration that should be completed on the Virtual Machine :

ip : IP.FAIL.OVER
netmask : 255.255.255.255

It will then be added to the Virtual Machine:

route add IP.DE.VOTREDEDIE.254 dev eth0
route add default gw IP.DE.VOTREDEDIE.254


You will then need to configure the dns of your machine so that it can make resolution domain. The IP information is 213.186.33.99

FreeBSD 8.0

WARNING: Under no circumstances use the primary IP of your server as the gateway! You must under no circumstances use: route add default gw dev eth0 or you could cut your IP from the virtual server.

/etc/rc.conf
ifconfig_em0="inet IP.FAIL.OVER netmask 255.255.255.255 broadcast IP.FAIL.OVER"
static_routes="net1 net2"
route_net1="-net IP.DE.VOTREDEDIE.254/32 IP.FAIL.OVER"
route_net2="default IP.DE.VOTREDEDIE.254"

/etc/resolv.conf
nameserver 213.186.33.99


Windows 2003

WARNING: Under no circumstances use the primary IP of your server as the gateway! You must under no circumstances use: route add default gw dev eth0 or you could cut your IP from the virtual server.

At first, you must connect to the panel "Network Connections" (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 mask subnet 255.255.0.0, the gateway to your physical machine as default gateway and ip 213.186.33.99 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 255.255.0.0 to 255.255.255.255, then you validate.
Close the registry editor

Finally, 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

Other distributions

WARNING: Under no circumstances use the primary IP of your server as the gateway! You must under no circumstances use: route add default gw dev eth0 or you could cut your IP from the virtual server.

Here is the network configuration :

IP: Your Failover IP
Netmask : 255.255.255.255

You will then add the following routes :

route add Dedicated Server IP but end in .254 dev eth0
route add default gw Dedicated Server IP but end in .254

You will then need to configure the dns of your machine so that it can make resolution domain. The IP information is 213.186.33.99