Search


print PDF
Using a ESXi server in a Virtual Rack

Requirements


To use this guide, you must have a Virtual Rack offers.

You will need :
  • A Virtual Rack (vrack)
  • Have at least one dedicated server from EG, MG or HG (Ethernet 1Gb/s) range with the option for professional use.
  • Able to connect via SSH: SSH on a Dedicated Server (Linux Servers)
  • A RIPE IP Block (only if you want the machines to have access vlan network service)

Information
You do not have to order a new RIPE IP block. You can switch an existing block to your virtual rack. For more information, see the Checkout & Switch!


General


Virtual Rack brings together several virtual servers (whatever their number and physical location in our Datacentres) and connect to a virtual switch within a single private network. Your servers can communicate privately and securely between them (in a dedicated VLAN).

Order a Ripe Block


You can order one directly for your virtual rack.
Log in to your manager and select your "vrackXXXX" at home in "Dedicated Server> "Infrastructures".
Click on "RIPE Block" and then "Order a RIPE Block" and then confirm your order.

Switch an existing Block Ripe


Already have a RIPE IP block assigned to a server? In this case you can switch this block directly to your VLAN. No matter if the original server is part of it or not.

IMPORTANT!!

  • This procedure will reform blocks divided and all will be re-routed to the IP VLAN.
  • All virtual macs associated with the block will be deleted.
Make sure to either stop using the IPs in the block, and have your migration set in advance (see below).


Log in to your manager V3 and select the server with the block in question.
Go to the section "Services" then "IP FailOver? RIPE", select the block in question and then click
In the drop down "Change routing to" select the virtual destination VrackXXXX Bay. In the case of a split block or havomg virtual mac it will display a warning.

A confirmation email with the configuration settings to use will be sent shortly thereafter.

Configuring ESXI


Info !
In all the examples here we will configure our vrack with the virtual IP 172.16.0.1 and this on two machines: testvrack1 (172.16.0.1) and testvrack2 (172.16.0.2). You will need the following examples replace XXXX with the number assigned by OVH vrack.

IMPORTANT !!
You can set 172.31.0.0/8 with the exception of IPs listed below, you must not add IN ANY CASE following IP as the interface on your machine:
  • 172.16.0.0 => IP Network
  • 172.31.255.252 => IP reserved for OVH internal use
  • 172.31.255.253 => IP reserved for OVH internal use
  • 172.31.255.254 => IP Gateway of your virtual vrack


The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac
It is forbidden that more than one VM to have the same mac


Configuring ESXi for vlan


We will create a Virtual Machine Port Group to our new vlan:

Via the vSphere Interface, go to the Configuration tab, click on Networking, then click Add Networking... :



We will create a connection type Virtual Machine:



It connects the Port Group in vSwitch associated with the network card by selecting Use vSwitch0:



We modify Network Label to VLANXXX to make it easier to manage, and it changes the VLAN ID with that assigned by OVH:



Creating a VM on the vlan


We then create a new machine that we associate with the virtual bay.

At the last stage before finalization, we click Edit the virtual machine settings before completion and Continue :



It will change the value of Network Connection by selecting VLANXXX. We suggest you put an end to the custom mac, in fact it should never two virtual machines the same virtual vrack. We can follow a standard 00:50:56:0ma_esxi_n 1:00 ma_première_interface. For example, if I configure the first network interface of my first ESXi:

00:50:56:01:00:01



VM on a private network


Red Hat & CentOS & Fedora


IMPORTANT !!
You can set 172.16.0.0/8 with the exception of IPs listed below, you must not add IN ANY CASE following IP as the interface on your machine:
  • 172.16.0.0 => IP Network
  • 172.31.255.252 => IP reserved for OVH internal use
  • 172.31.255.253 => IP reserved for OVH internal use
  • 172.31.255.254 => IP Gateway of your virtual vrack


The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac
It is forbidden that more than one VM to have the same mac


Info !
A Virtual Machine (VM) with this type of setup can not access from outside or be accessed only from a virtual machine from the vrack. To add enable outside access, you must either set up a VM which will have an upstream gateway or add it with a public ip.


We edit the file : /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.0.0.0
IPADDR=172.16.0.1
GATEWAY=172.16.255.254
ARP=yes
HWADDR=MA:MAC:VI:RT:UEL:LE


We add /etc/resolv.conf

nameserver 213.186.33.99


Next, enable your network interface :

ifup eth0


To check your configuration:

root@centos ~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:CA:96:8B
inet adr:172.16.0.1 Bcast:172.31.255.255 Masque:255.240.0.0
adr inet6: fe80::20c:29ff:feca:968b/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:629 errors:0 dropped:0 overruns:0 frame:0
TX packets:71 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:42714 (41.7 KiB) TX bytes:9986 (9.7 KiB)
Interruption:59 Adresse de base:0x2000

lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)


To test your configuration, you can ping the gateway or another server in your virtual vrack where you have already performed the operations described above:


root@centos ~# ping -c5 172.31.255.254
PING 172.31.255.254 (172.31.255.254) 56(84) bytes of data.
64 bytes from 172.31.255.254: icmp_seq=1 ttl=255 time=2.18 ms
64 bytes from 172.31.255.254: icmp_seq=2 ttl=255 time=0.377 ms
64 bytes from 172.31.255.254: icmp_seq=3 ttl=255 time=0.398 ms
64 bytes from 172.31.255.254: icmp_seq=4 ttl=255 time=0.412 ms
64 bytes from 172.31.255.254: icmp_seq=5 ttl=255 time=0.407 ms


5 packets transmitted, 5 received, 0% packet loss, time 4026ms
rtt min/avg/max/mdev = 0.377/0.755/2.185/0.715 ms


root@centos ~# ping -c5 172.16.0.1
PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data.
64 bytes from 172.16.0.1: icmp_seq=1 ttl=63 time=2.66 ms
64 bytes from 172.16.0.1: icmp_seq=2 ttl=63 time=0.257 ms
64 bytes from 172.16.0.1: icmp_seq=3 ttl=63 time=0.264 ms
64 bytes from 172.16.0.1: icmp_seq=4 ttl=63 time=0.264 ms
64 bytes from 172.16.0.1: icmp_seq=5 ttl=63 time=0.261 ms


5 packets transmitted, 5 received, 0% packet loss, time 4027ms
rtt min/avg/max/mdev = 0.257/0.742/2.666/0.962 ms


Debian & Ubuntu


IMPORTANT !!
You can set 172.16.0.0/12 with the exception of IPs listed below, you must not add IN ANY CASE following IP as the interface on your machine:
  • 172.16.0.0 => IP Network
  • 172.31.255.252 => IP reserved for OVH internal use
  • 172.31.255.253 => IP reserved for OVH internal use
  • 172.31.255.254 => IP Gateway of your virtual vrack


The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac
It is forbidden that more than one VM to have the same mac


Info !
A Virtual Machine (VM) with this type of setup can not access from outside or be accessed only from a virtual machine from the vrack. To add enable outside access, you must either set up a VM which will have an upstream gateway or add it with a public ip.


We edit the file : /etc/network/interfaces


auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
address 172.16.0.1
netmask 255.240.0.0
gateway 172.31.255.254
dns-nameservers 213.186.33.99



Relaunch your network interface:


/etc/init.d/networking restart


To check your configuration:


debian:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:4b:50:0d
inet adr:172.16.0.1 Bcast:172.31.255.255 Masque:255.240.0.0
adr inet6: fe80::20c:29ff:fe4b:500d/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:121 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:10464 (10.2 KiB) TX bytes:7762 (7.5 KiB)

lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


To test your configuration, you can ping the gateway or another server in your virtual rack where you have already performed the operations described above:


debian:~# ping -c5 172.16.0.2
PING 172.16.0.2 (172.16.0.2) 56(84) bytes of data.
64 bytes from 172.16.0.2: icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from 172.16.0.2: icmp_seq=2 ttl=64 time=0.008 ms
64 bytes from 172.16.0.2: icmp_seq=3 ttl=64 time=0.024 ms
64 bytes from 172.16.0.2: icmp_seq=4 ttl=64 time=0.024 ms
64 bytes from 172.16.0.2: icmp_seq=5 ttl=64 time=0.017 ms


5 packets transmitted, 5 received, 0% packet loss, time 3997ms
rtt min/avg/max/mdev = 0.008/0.017/0.024/0.008 ms

debian:~# ping -c5 172.31.255.254
PING 172.31.255.254 (172.31.255.254) 56(84) bytes of data.
64 bytes from 172.31.255.254: icmp_seq=1 ttl=255 time=4.00 ms
64 bytes from 172.31.255.254: icmp_seq=2 ttl=255 time=1.10 ms
64 bytes from 172.31.255.254: icmp_seq=3 ttl=255 time=0.732 ms
64 bytes from 172.31.255.254: icmp_seq=4 ttl=255 time=0.515 ms
64 bytes from 172.31.255.254: icmp_seq=5 ttl=255 time=0.462 ms


5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 0.462/1.363/4.004/1.340 ms



Gentoo



IMPORTANT !!
You can set 172.16.0.0/12 with the exception of IPs listed below, you must not add IN ANY CASE following IP as the interface on your machine:
  • 172.16.0.0 => IP Network
  • 172.31.255.252 => IP reserved for OVH internal use
  • 172.31.255.253 => IP reserved for OVH internal use
  • 172.31.255.254 => IP Gateway of your virtual vrack


The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac
It is forbidden that more than one VM to have the same mac


Info !
A Virtual Machine (VM) with this type of setup can not access from outside or be accessed only from a virtual machine from the vrack. To add enable outside access, you must either set up a VM which will have an upstream gateway or add it with a public ip.



We edit the file: /etc/conf.d/net

config_eth0=( "172.16.0.1 netmask 255.240.0.0" )
routes_eth0=( "default gw 172.31.255.254" )


We add: /etc/resolv.conf

nameserver 213.186.33.99


Restart your network interfaces :


/etc/init.d/net.eth0 restart


To check your configuration :


gentoo ~ # ifconfig
eth0 Lien encap:Ethernet HWaddr 00:50:56:0a:00:20
inet adr:172.16.0.1 Bcast:172.31.255.255 Masque:255.240.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:268 errors:0 dropped:0 overruns:0 frame:0
TX packets:188 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:21556 (21.0 KiB) TX bytes:20527 (20.0 KiB)
Interruption:18 Adresse de base:0x2000

lo Lien encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:1609 (1.5 KiB) TX bytes:1609 (1.5 KiB)


To test your configuration, you can ping the gateway or another server in your virtual rack where you have already performed the operations described above:


gentoo ~ # ping -c5 172.16.0.3
PING 172.16.0.3 (172.16.0.3) 56(84) bytes of data.
64 bytes from 172.16.0.3: icmp_seq=1 ttl=63 time=6.49 ms
64 bytes from 172.16.0.3: icmp_seq=2 ttl=63 time=0.286 ms
64 bytes from 172.16.0.3: icmp_seq=3 ttl=63 time=0.305 ms
64 bytes from 172.16.0.3: icmp_seq=4 ttl=63 time=0.276 ms
64 bytes from 172.16.0.3: icmp_seq=5 ttl=63 time=0.287 ms

5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.276/1.529/6.493/2.482 ms
gentoo ~ # ping -c5 172.31.255.254
PING 172.31.255.254 (172.31.255.254) 56(84) bytes of data.
64 bytes from 172.31.255.254: icmp_seq=1 ttl=255 time=3.54 ms
64 bytes from 172.31.255.254: icmp_seq=2 ttl=255 time=0.703 ms
64 bytes from 172.31.255.254: icmp_seq=3 ttl=255 time=0.473 ms
64 bytes from 172.31.255.254: icmp_seq=4 ttl=255 time=0.565 ms
64 bytes from 172.31.255.254: icmp_seq=5 ttl=255 time=0.520 ms

5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.473/1.161/3.547/1.195 ms



VM on a public network


Red Hat & CentOS & Fedora


IMPORTANT !!
The activation email contains important information! It contains the IP that you do not have to configure, ie IP network and IP broadcast, the IP of the gateway, and netmask of your block! Please carefully read the information provided. The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac.
It is forbidden that more than one VM has the same mac


We edit the file: /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
BROADCAST=ip.of.broad.cast
IPADDR=ip.public.of.therack
NETMASK=ip.net.ma.sk
NETWORK=ip.of.netw.ork
GATEWAY=ip.of.gate.way
ONBOOT=yes


We add /etc/resolv.conf

nameserver 213.186.33.99


Next, install your network interface:

ifup eth0



To check your configuration:

root@centos ~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:CA:96:8B
inet adr:178.33.8.65 Bcast:178.33.8.79 Masque:255.255.255.240
adr inet6: fe80::20c:29ff:feca:968b/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1373 errors:0 dropped:0 overruns:0 frame:0
TX packets:1261 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:126744 (123.7 KiB) TX bytes:137054 (133.8 KiB)
Interruption:59 Adresse de base:0x2000

lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)


To test your configuration, you can ping the gateway or another server in your virtual rack where you have already performed the operations described above:


root@centos ~# ping -c5 178.33.8.78
PING 178.33.8.78 (178.33.8.78) 56(84) bytes of data.
64 bytes from 178.33.8.78: icmp_seq=1 ttl=255 time=0.713 ms
64 bytes from 178.33.8.78: icmp_seq=2 ttl=255 time=0.413 ms
64 bytes from 178.33.8.78: icmp_seq=3 ttl=255 time=0.340 ms
64 bytes from 178.33.8.78: icmp_seq=4 ttl=255 time=0.369 ms
64 bytes from 178.33.8.78: icmp_seq=5 ttl=255 time=0.625 ms


5 packets transmitted, 5 received, 0% packet loss, time 4026ms
rtt min/avg/max/mdev = 0.340/0.492/0.713/0.149 ms


root@centos ~# ping -c5 178.33.8.66
PING 178.33.8.66 (178.33.8.66) 56(84) bytes of data.
64 bytes from 178.33.8.66: icmp_seq=1 ttl=63 time=2.66 ms
64 bytes from 178.33.8.66: icmp_seq=2 ttl=63 time=0.257 ms
64 bytes from 178.33.8.66: icmp_seq=3 ttl=63 time=0.264 ms
64 bytes from 178.33.8.66: icmp_seq=4 ttl=63 time=0.264 ms
64 bytes from 178.33.8.66: icmp_seq=5 ttl=63 time=0.261 ms


5 packets transmitted, 5 received, 0% packet loss, time 4027ms
rtt min/avg/max/mdev = 0.257/0.742/2.666/0.962 ms


Debian & Ubuntu

IMPORTANT !!
The activation email contains important information! It contains the IP that you do not have to configure, ie IP network and IP broadcast, the IP of the gateway, and netmask of your block! Please carefully read the information provided. The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac.
It is forbidden that more than one VM has the same mac


We edit the file: /etc/network/interfaces


auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address ip.publique.de.labaievirtuelle
netmask ip.net.ma.sk
gateway ip.de.gate.way
dns-nameservers 213.186.33.99



Restart your network interfaces:


/etc/init.d/networking restart


To check your configuration:


debian:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:4b:50:0d
inet adr:178.33.8.67 Bcast:178.33.8.79 Masque:255.255.255.240
adr inet6: fe80::20c:29ff:fe4b:500d/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:220 errors:0 dropped:0 overruns:0 frame:0
TX packets:156 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:21592 (21.0 KiB) TX bytes:19476 (19.0 KiB)

lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


To test your configuration, you can ping the gateway or another server in your virtual rack where you have already performed the operations described above:


debian:~# ping -c5 178.33.8.65
PING 178.33.8.65 (178.33.8.65) 56(84) bytes of data.
64 bytes from 178.33.8.65: icmp_seq=1 ttl=63 time=0.254 ms
64 bytes from 178.33.8.65: icmp_seq=2 ttl=63 time=0.223 ms
64 bytes from 178.33.8.65: icmp_seq=3 ttl=63 time=0.227 ms
64 bytes from 178.33.8.65: icmp_seq=4 ttl=63 time=0.225 ms
64 bytes from 178.33.8.65: icmp_seq=5 ttl=63 time=0.245 ms


5 packets transmitted, 5 received, 0% packet loss, time 3996ms
rtt min/avg/max/mdev = 0.223/0.234/0.254/0.023 ms
debian:~# ping -c5 178.33.8.78
PING 178.33.8.78 (178.33.8.78) 56(84) bytes of data.
64 bytes from 178.33.8.78: icmp_seq=1 ttl=255 time=0.492 ms
64 bytes from 178.33.8.78: icmp_seq=2 ttl=255 time=0.687 ms
64 bytes from 178.33.8.78: icmp_seq=3 ttl=255 time=0.701 ms
64 bytes from 178.33.8.78: icmp_seq=4 ttl=255 time=0.503 ms
64 bytes from 178.33.8.78: icmp_seq=5 ttl=255 time=0.557 ms


5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.492/0.588/0.701/0.089 ms



Gentoo


IMPORTANT !!
The activation email contains important information! It contains the IP that you do not have to configure, ie IP network and IP broadcast, the IP of the gateway, and netmask of your block! Please carefully read the information provided. The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac.
It is forbidden that more than one VM has the same mac


We edit the file: /etc/conf.d/net


config_eth0=( "ip.publique.de.labaievirtuelle netmask ip.net.ma.sk" )
routes_eth0=( "default gw ip.de.gate.way" )


Restart your network interface:


/etc/init.d/networking restart


To check your configuration:


gentoo ~ # ifconfig
eth0 Lien encap:Ethernet HWaddr 00:50:56:0a:00:20
inet adr:178.33.8.69 Bcast:178.33.8.79 Masque:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:190 errors:0 dropped:0 overruns:0 frame:0
TX packets:133 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:41543 (40.5 KiB) TX bytes:15130 (14.7 KiB)
Interruption:18 Adresse de base:0x2000

lo Lien encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:194 (194.0 B) TX bytes:194 (194.0 B)


To test your configuration, you can ping the gateway, another virtual server in your rack that you have already performed the operations described above, or the dns server:


debian:~# ping -c5 178.33.8.65
PING 178.33.8.65 (178.33.8.65) 56(84) bytes of data.
64 bytes from 178.33.8.65: icmp_seq=1 ttl=63 time=0.254 ms
64 bytes from 178.33.8.65: icmp_seq=2 ttl=63 time=0.223 ms
64 bytes from 178.33.8.65: icmp_seq=3 ttl=63 time=0.227 ms
64 bytes from 178.33.8.65: icmp_seq=4 ttl=63 time=0.225 ms
64 bytes from 178.33.8.65: icmp_seq=5 ttl=63 time=0.245 ms


5 packets transmitted, 5 received, 0% packet loss, time 3996ms
rtt min/avg/max/mdev = 0.223/0.234/0.254/0.023 ms
debian:~# ping -c5 178.33.8.78
PING 178.33.8.78 (178.33.8.78) 56(84) bytes of data.
64 bytes from 178.33.8.78: icmp_seq=1 ttl=255 time=0.492 ms
64 bytes from 178.33.8.78: icmp_seq=2 ttl=255 time=0.687 ms
64 bytes from 178.33.8.78: icmp_seq=3 ttl=255 time=0.701 ms
64 bytes from 178.33.8.78: icmp_seq=4 ttl=255 time=0.503 ms
64 bytes from 178.33.8.78: icmp_seq=5 ttl=255 time=0.557 ms


5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.492/0.588/0.701/0.089 ms

gentoo ~ # ping -c5 213.186.33.99
PING 213.186.33.99 (213.186.33.99) 56(84) bytes of data.
64 bytes from 213.186.33.99: icmp_seq=1 ttl=59 time=4.44 ms
64 bytes from 213.186.33.99: icmp_seq=2 ttl=59 time=4.27 ms
64 bytes from 213.186.33.99: icmp_seq=3 ttl=59 time=4.53 ms
64 bytes from 213.186.33.99: icmp_seq=4 ttl=59 time=4.20 ms
64 bytes from 213.186.33.99: icmp_seq=5 ttl=59 time=4.30 ms


5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 4.207/4.352/4.535/0.132 ms


VM network public and private


Add a network interface


VMware ESXi enables a large number of network interface for VM management by ip failovers. Therefore, to alleviate the configuration and routing rules, we will add additional network interface to our VM.

Either add it when creating the machine, or editing a VM existing in selecting, click on Edit virtual machine settings, then click Add...

We choose Ethernet Adapter :



It retains an interface type e1000, and forget not to choose VLANXXXX:



You click on Finish:



Then you just post a custom virtual mac:




Red Hat & CentOS & Fedora




IMPORTANT !!
You can set 172.16.0.0/12 with the exception of IPs listed below, you must not add IN ANY CASE following IP as the interface on your machine:
  • 172.16.0.0 => IP Network
  • 172.31.255.252 => IP reserved for OVH internal use
  • 172.31.255.253 => IP reserved for OVH internal use
  • 172.31.255.254 => IP Gateway of your virtual vrack
The activation email contains important information! It contains the IP that you do not have to configure, ie IP network and IP broadcast, the IP of the gateway, and netmask of your block! Please carefully read the information provided. The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac.

It is forbidden that more than one VM has the same mac


Info !
For the remainder of this guide, you must add an additional network interface.


We edit the file that will have eth0 private ip:

/etc/sysconfig/network-scripts/ifcfg-eth0


DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.240.0.0
IPADDR=172.16.0.1
GATEWAY=172.31.255.254
ARP=yes
HWADDR=MA:MAC:VI:RT:UA:L


We edit the file that will eth1 public ip:
/etc/sysconfig/network-scripts/ifcfg-eth1


DEVICE=eth0
BOOTPROTO=static
BROADCAST=ip.de.broad.cast
IPADDR=ip.publique.de.labaievirtuelle
NETMASK=ip.net.ma.sk
NETWORK=ip.de.netw.ork
GATEWAY=ip.de.gate.way
ONBOOT=yes


It adds a rule of routing rules for what goes out through eth0 to eth0, and what comes out in through eth1 to eth1:

/etc/sysconfig/network-scripts/rule-eth0


from 172.16.0.0/12 table 100


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


default via 172.31.255.254 dev eth0 table 100


It will replace below 178.33.8.64/28 by the block provided by OVH, and 178.33.8.78 the gateway of your block:

/etc/sysconfig/network-scripts/rule-eth1


from 178.33.8.64/28 table 101


/etc/sysconfig/network-scripts/route-eth1


default via 178.33.8.78 dev eth1 table 101


We edit /etc/resolv.conf


nameserver 213.186.33.99


Then mount the network interfaces:


ifup eth0
ifup eth1


To check your configuration:


root@centos ~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:CA:96:8B
inet adr:172.16.0.3 Bcast:172.31.255.255 Masque:255.240.0.0
adr inet6: fe80::20c:29ff:feca:968b/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1275 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:88898 (86.8 KiB) TX bytes:19185 (18.7 KiB)
Interruption:59 Adresse de base:0x2000

eth1 Link encap:Ethernet HWaddr 00:0C:29:CA:96:95
inet adr:178.33.8.65 Bcast:178.33.8.79 Masque:255.255.255.240
adr inet6: fe80::20c:29ff:feca:9695/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2775 errors:0 dropped:0 overruns:0 frame:0
TX packets:3409 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:230192 (224.7 KiB) TX bytes:284012 (277.3 KiB)
Interruption:67 Adresse de base:0x2080

lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)

root@centos ~# ip rule list
0: from all lookup 255
32761: from 172.16.0.0/12 lookup 100
32763: from 178.33.8.64/28 lookup 101
32766: from all lookup main
32767: from all lookup default

root@centos ~# ip route show table 100
default via 172.31.255.254 dev eth0

root@centos ~# ip route show table 101
default via 178.33.8.78 dev eth1


To test your configuration, you can ping the gateway, the ip of a dns server or another virtual server on your rack that you have already performed the operations described above:


root@centos ~# ping -c5 172.31.255.254
PING 172.31.255.254 (172.31.255.254) 56(84) bytes of data.
64 bytes from 172.31.255.254: icmp_seq=1 ttl=255 time=2.18 ms
64 bytes from 172.31.255.254: icmp_seq=2 ttl=255 time=0.377 ms
64 bytes from 172.31.255.254: icmp_seq=3 ttl=255 time=0.398 ms
64 bytes from 172.31.255.254: icmp_seq=4 ttl=255 time=0.412 ms
64 bytes from 172.31.255.254: icmp_seq=5 ttl=255 time=0.407 ms

5 packets transmitted, 5 received, 0% packet loss, time 4026ms
rtt min/avg/max/mdev = 0.377/0.755/2.185/0.715 ms

root@centos ~# ping -c5 213.186.33.99
PING 213.186.33.99 (213.186.33.99) 56(84) bytes of data.
64 bytes from 213.186.33.99: icmp_seq=1 ttl=59 time=4.27 ms
64 bytes from 213.186.33.99: icmp_seq=2 ttl=59 time=4.17 ms
64 bytes from 213.186.33.99: icmp_seq=3 ttl=59 time=4.23 ms
64 bytes from 213.186.33.99: icmp_seq=4 ttl=59 time=4.32 ms
64 bytes from 213.186.33.99: icmp_seq=5 ttl=59 time=4.16 ms


5 packets transmitted, 5 received, 0% packet loss, time 4044ms
rtt min/avg/max/mdev = 4.166/4.235/4.323/0.059 ms


root@centos ~# ping -c5 172.16.0.1
PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data.
64 bytes from 172.16.0.1: icmp_seq=1 ttl=63 time=2.66 ms
64 bytes from 172.16.0.1: icmp_seq=2 ttl=63 time=0.257 ms
64 bytes from 172.16.0.1: icmp_seq=3 ttl=63 time=0.264 ms
64 bytes from 172.16.0.1: icmp_seq=4 ttl=63 time=0.264 ms
64 bytes from 172.16.0.1: icmp_seq=5 ttl=63 time=0.261 ms

5 packets transmitted, 5 received, 0% packet loss, time 4027ms
rtt min/avg/max/mdev = 0.257/0.742/2.666/0.962 ms


Debian & Ubuntu




IMPORTANT !!
You can set 172.16.0.0/12 with the exception of IPs listed below, you must not add IN ANY CASE following IP as the interface on your machine:
  • 172.16.0.0 => IP Network
  • 172.31.255.252 => IP reserved for OVH internal use
  • 172.31.255.253 => IP reserved for OVH internal use
  • 172.31.255.254 => IP Gateway of your virtual vrack
The activation email contains important information! It contains the IP that you do not have to configure, ie IP network and IP broadcast, the IP of the gateway, and netmask of your block! Please carefully read the information provided. The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac.

It is forbidden that more than one VM has the same mac


Info !
For the remainder of this guide, you must add an additional network interface.


We edit the file /etc/network/interfaces :


auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
address 172.16.0.1
netmask 255.240.0.0
gateway 172.31.255.254
dns-nameservers 213.186.33.99
up /sbin/ip route add default via 172.31.255.254 dev eth0 table 100
up /sbin/ip rule add from 172.16.0.0/12 table 100
post-down /sbin/ip route del default via 172.31.255.254 dev eth0 table 100
post-down /sbin/ip rule del from 172.16.0.0/12 table 100


allow-hotplug eth1
iface eth1 inet static
address ip.publique.de.labaievirtuelle
netmask ip.net.ma.sk
gateway ip.de.gate.way
dns-nameservers 213.186.33.99
up /sbin/ip route add default via ip.de.gate.way dev eth1 table 101
up /sbin/ip rule add from ma.pl.ag.d/ip table 101
post-down /sbin/ip route del default via ip.de.gate.way dev eth1 table 101
post-down /sbin/ip rule del from ma.pl.ag.d/ip table 101


Restart your network interfaces:


/etc/init.d/networking restart


To check your configuration:


debian:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:4b:50:0d
inet adr:172.16.0.1 Bcast:172.31.255.255 Masque:255.240.0.0
adr inet6: fe80::20c:29ff:fe4b:500d/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:119 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:7140 (6.9 KiB) TX bytes:468 (468.0 B)

eth1 Link encap:Ethernet HWaddr 00:0c:29:4b:50:17
inet adr:178.33.8.67 Bcast:178.33.8.79 Masque:255.255.255.240
adr inet6: fe80::20c:29ff:fe4b:5017/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:344 errors:0 dropped:0 overruns:0 frame:0
TX packets:244 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:33655 (32.8 KiB) TX bytes:33848 (33.0 KiB)
Interruption:16 Adresse de base:0x2000

lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

debian:~# ip rule list
0: from all lookup local
32764: from 178.33.8.64/28 lookup 101
32765: from 172.16.0.0/12 lookup 100
32766: from all lookup main
32767: from all lookup default
debian:~# ip route show table 100
default via 172.31.255.254 dev eth0
debian:~# ip route show table 101
default via 178.33.8.78 dev eth1


To test your configuration, you can ping the gateway or another server of your virtual rack where you have already performed the operations described above:


debian:~# ping -c5 178.33.8.78
PING 178.33.8.78 (178.33.8.78) 56(84) bytes of data.
64 bytes from 178.33.8.78: icmp_seq=1 ttl=255 time=9.29 ms
64 bytes from 178.33.8.78: icmp_seq=2 ttl=255 time=0.764 ms
64 bytes from 178.33.8.78: icmp_seq=3 ttl=255 time=0.873 ms
64 bytes from 178.33.8.78: icmp_seq=4 ttl=255 time=0.899 ms
64 bytes from 178.33.8.78: icmp_seq=5 ttl=255 time=14.5 ms


5 packets transmitted, 5 received, 0% packet loss, time 4011ms
rtt min/avg/max/mdev = 0.764/5.273/14.536/5.670 ms
debian:~# ping -c5 178.33.8.65
PING 178.33.8.65 (178.33.8.65) 56(84) bytes of data.
64 bytes from 178.33.8.65: icmp_seq=1 ttl=63 time=4.34 ms
64 bytes from 178.33.8.65: icmp_seq=2 ttl=63 time=0.216 ms
64 bytes from 178.33.8.65: icmp_seq=3 ttl=63 time=0.249 ms
64 bytes from 178.33.8.65: icmp_seq=4 ttl=63 time=0.178 ms
64 bytes from 178.33.8.65: icmp_seq=5 ttl=63 time=0.269 ms


5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.178/1.050/4.340/1.645 ms



Gentoo




IMPORTANT !!
You can set 172.16.0.0/12 with the exception of IPs listed below, you must not add IN ANY CASE following IP as the interface on your machine:
  • 172.16.0.0 => IP Network
  • 172.31.255.252 => IP reserved for OVH internal use
  • 172.31.255.253 => IP reserved for OVH internal use
  • 172.31.255.254 => IP Gateway of your virtual vrack
The activation email contains important information! It contains the IP that you do not have to configure, ie IP network and IP broadcast, the IP of the gateway, and netmask of your block! Please carefully read the information provided. The introduction of Virtual Machine (VM) within a virtual rack, you save the free virtual mac.

It is forbidden that more than one VM has the same mac


Info !
For the remainder of this guide, you must add an additional network interface.


We create the files necessary for starting the new network interface:


ln -s /etc/init.d/net.lo /etc/init.d/net.eth1
rc-update add net.eth1 default



We edit the file /etc/conf.d/net


config_eth0=( "172.16.0.1 netmask 255.240.0.0" )

config_eth1=( "ip.publique.de.labaievirtuelle netmask ip.net.ma.sk" )
routes_eth1=( "default gw ip.de.gate.way" )


postup()
{
local iface=${1}
if [ ${iface} == eth0 ]
then
/sbin/ip route add default via 172.31.255.254 dev eth0 table 100
/sbin/ip rule add from 172.16.0.0/12 table 100
fi
if [ ${iface} == eth1 ]
then
/sbin/ip route add default via ip.de.gate.way dev eth1 table 101
/sbin/ip rule add from ma.pl.ag.d/ip table 101
fi
}

postdown()
{
local iface=${1}
if [ ${iface} == eth0 ]
then
/sbin/ip route del default via 172.31.255.254 dev eth0 table 100
/sbin/ip rule del from 172.16.0.0/12 table 100
fi
if [ ${iface} == eth1 ]
then
/sbin/ip route del default via ip.de.gate.way dev eth1 table 101
/sbin/ip rule del from ma.pl.ag.d/ip table 101
fi
}


We edit /etc/resolv.conf

nameserver 213.186.33.99


Relaunch your network interface:


/etc/init.d/net.eth0 restart
/etc/init.d/net.eth1 restart


To check your configuration:


gentoo ~ # ifconfig
eth0 Lien encap:Ethernet HWaddr 00:50:56:0a:00:20
inet adr:172.16.0.1 Bcast:172.31.255.255 Masque:255.240.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:260 errors:0 dropped:0 overruns:0 frame:0
TX packets:117 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:21712 (21.2 KiB) TX bytes:17031 (16.6 KiB)
Interruption:18 Adresse de base:0x2000

eth1 Lien encap:Ethernet HWaddr 00:0c:29:e4:c4:22
inet adr:178.33.8.69 Bcast:178.33.8.79 Masque:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:231 errors:0 dropped:0 overruns:0 frame:0
TX packets:156 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:46910 (45.8 KiB) TX bytes:13987 (13.6 KiB)
Interruption:16 Adresse de base:0x2080

lo Lien encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:1023 (1023.0 B) TX bytes:1023 (1023.0 B)

gentoo ~ # ip rule list
0: from all lookup local
32764: from 178.33.8.64/28 lookup 101
32765: from 172.16.0.0/12 lookup 100
32766: from all lookup main
32767: from all lookup default
gentoo ~ # ip route show table 100
default via 172.31.255.254 dev eth0
gentoo ~ # ip route show table 101
default via 178.33.8.78 dev eth1


To test your configuration, you can ping the gateway, another server in your virtual rack where you have already performed the above setup, or the DNS server:


debian:~# ping -c5 178.33.8.78
PING 178.33.8.78 (178.33.8.78) 56(84) bytes of data.
64 bytes from 178.33.8.78: icmp_seq=1 ttl=255 time=9.29 ms
64 bytes from 178.33.8.78: icmp_seq=2 ttl=255 time=0.764 ms
64 bytes from 178.33.8.78: icmp_seq=3 ttl=255 time=0.873 ms
64 bytes from 178.33.8.78: icmp_seq=4 ttl=255 time=0.899 ms
64 bytes from 178.33.8.78: icmp_seq=5 ttl=255 time=14.5 ms


5 packets transmitted, 5 received, 0% packet loss, time 4011ms
rtt min/avg/max/mdev = 0.764/5.273/14.536/5.670 ms
debian:~# ping -c5 178.33.8.65
PING 178.33.8.65 (178.33.8.65) 56(84) bytes of data.
64 bytes from 178.33.8.65: icmp_seq=1 ttl=63 time=4.34 ms
64 bytes from 178.33.8.65: icmp_seq=2 ttl=63 time=0.216 ms
64 bytes from 178.33.8.65: icmp_seq=3 ttl=63 time=0.249 ms
64 bytes from 178.33.8.65: icmp_seq=4 ttl=63 time=0.178 ms
64 bytes from 178.33.8.65: icmp_seq=5 ttl=63 time=0.269 ms


5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.178/1.050/4.340/1.645 ms

gentoo ~ # ping -c5 213.186.33.99
PING 213.186.33.99 (213.186.33.99) 56(84) bytes of data.
64 bytes from 213.186.33.99: icmp_seq=1 ttl=59 time=4.31 ms
64 bytes from 213.186.33.99: icmp_seq=2 ttl=59 time=4.25 ms
64 bytes from 213.186.33.99: icmp_seq=3 ttl=59 time=4.28 ms
64 bytes from 213.186.33.99: icmp_seq=4 ttl=59 time=4.47 ms
64 bytes from 213.186.33.99: icmp_seq=5 ttl=59 time=4.26 ms


5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 4.254/4.316/4.471/0.107 ms