Solved Failover IP problem with OVH

Hello,
I have a problem with FreeBSD 9.2.
The server is in a ovh datacenter and I can't use this virtual machine.

When I try to test "ping ip address" is the message: "no route to host"

My /etc/rc.conf:
Code:
ifconfig_em0="net 46.105.150.91 netmask 255.255.255.255 broadcast 46.105.150.91"
static_routes="net1 net2"
route_net1="-net 37.187.174.254/32 46.105.150.91"
route_net2="default 37.187.174.254"

/etc/resolv.conf:
Code:
nameserver 213.186.33.99
nameserver 8.8.4.4
nameserver 8.8.8.8

What I do wrong?

Thanks for your help :)
 
Last edited by a moderator:
Wait,
This is from my netstat -nr:
Code:
Destination                Gateway            Flags    Refs     Use    Netif   Expire
default                    37.187.174.254     UGS      0        50       em0
37.187.174.254/32          46.105.150.91      US       0         0       em0
46.105.150.91              link#2             UHS      0         0       lo0     =>
46.105.150.91/32           link#2             U        0         0       em0
127.0.0.1                  link#3             UH       0        48       lo0
This is from the help site from ovh:

Important:

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 used as GATEWAY_VM later in the guide.

Contents of the file : /etc/rc.conf
Code:
ifconfig_em0="inet IP.FAIL.OVER netmask 255.255.255.255 broadcast IP.FAIL.OVER"
static_routes="net1 net2"
route_net1="-net GATEWAY_VM/32 IP.FAIL.OVER"
route_net2="default GATEWAY_VM"
 
Gah. Being the guy who catches spelling errors in published texts way too often, I feel like my eye should have caught on to that two weeks ago. Sorry about that. Excellent catch Edsel. It goes to show you it's the simple oversights that get you sometimes.
 
In my case I did some changes like this for FreeBSD 12
ifconfig_em0="inet FAILOVER_IP netmask 255.255.255.255 broadcast FAILOVER_IP"
static_routes="net1 net2"
route_net1="-net GATEWAY_IP/32 -interface em0"
route_net2="default GATEWAY_IP"
 
Back
Top