Solved Can not ping from a VMware VM with FreeBSD 11.0-RELEASE @ OVH (hosting company)

Kalero

Active Member

Reaction score: 9
Messages: 106

Hi people,

I'm trying to set up a server with FreeBSD 11.0-RELEASE on a VMware VM @ OVH (hosting company) but, when I try to ping, I get a "host name lookup failure".

It's very strange because I copied /etc/rc.conf and /etc/resolv.conf from the previous working installation with FreeBSD 10.3-RELEASE (I've installed FreeBSD 11.0 over it), so I'm using the same OVH's failover IP and I've matched MAC addresses.

When I installed FreeBSD 10.3-RELEASE, I followed the OVH's guide for FreeBSD (http://guide.ovh.com/BridgeClient) to set up the network, so I have the same in FreeBSD 11.0:

Content of /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"

Content of /etc/resolv.conf
Code:
nameserver 213.186.33.99

How is possible the same configuration worked on FreeBSD 10.3 and not in FreeBSD 11.0? Has been there any change affecting network routing between FreeBSD 10.3 and 11.0 versions?

Many thanks.
 

Snurg

Daemon

Reaction score: 595
Messages: 1,349

cpm@
Hmm, I do not think that this is about a wireless OVH connection ;)

Kalero
Just replace the string IP.FAIL.OVER with the failover IP :)
 
OP
Kalero

Kalero

Active Member

Reaction score: 9
Messages: 106

Thanks cpm@ but, as Snurg said, it's a VM with an ethernet VNIC, hosted at OVH. The VNIC is well detected.

Snurg, thanks for your reply but of course I replace all the strings with the appropriate IP :) And these IP's are the same that were in the same VM with FreeBSD 10.3-RELEASE.
 

cpm@

Moderator
Staff member
Moderator
Developer

Reaction score: 951
Messages: 2,140

In the following article is used a similar configuration, so it's worth to give it a try.

Or you can directly ask for help in the OVH Forums.
 

cpm@

Moderator
Staff member
Moderator
Developer

Reaction score: 951
Messages: 2,140

cpm@
Hmm, I do not think that this is about a wireless OVH connection ;)

It could be related in someway... I thought :)

The OP could run something to check if the configuration of his VM is correct.

From another machine that's not the host, ping your VM:

ping ip_failover

From the VM, run the following:

tcpdump host <ip_from_where_you_ping>
 
OP
Kalero

Kalero

Active Member

Reaction score: 9
Messages: 106

From my local machine, I can not ping the VM's failover IP, but also I can not ping other VM's on that host that are working fine! o_O
 

vectr0n

New Member

Reaction score: 7
Messages: 5

From my local machine, I can not ping the VM's failover IP, but also I can not ping other VM's on that host that are working fine! o_O

I was able to resolve this, the route command has changed in FreeBSD 11 for gateways outside subnet.
The manual commands are:

Code:
/sbin/route add -net <gateway ip>/32 -iface <interface>
/sbin/route add default <gateway ip>

/etc/rc.conf
Code:
static_routes="routename"
route_routename="-net <gateway ip>/32 -iface <interface>"
defaultrouter="<gateway ip>

Hope this helps if you haven't been able to resolve it.
 

cpm@

Moderator
Staff member
Moderator
Developer

Reaction score: 951
Messages: 2,140

You can use the defaultroute_delay option in rc.conf(5) to make the system wait a while before bringing up the default routes.
Code:
defaultroute_delay="30"        # Time to wait for a default route on a DHCP interface.
 

vectr0n

New Member

Reaction score: 7
Messages: 5

You can use the defaultroute_delay option in rc.conf(5) to make the system wait a while before bringing up the default routes.

That wouldn't really help in this situation, as it's the change in the route syntax, previous to 11.0 it was
Code:
/sbin/route add -net <gateway ip>/32 <wan/failover ip>
now in 11.0 you need to use
Code:
/sbin/route add -net <gateway ip>/32 -iface <interface>

As you can see delaying the defaultroute would have no effect, that's not the problem.

This mostly applies to providers like OVH and Online.net, and a few others who use this failover technology.
 

cpm@

Moderator
Staff member
Moderator
Developer

Reaction score: 951
Messages: 2,140

This mostly applies to providers like OVH and Online.net, and a few others who use this failover technology.

It's good to know, that worked well for you :)
 
OP
Kalero

Kalero

Active Member

Reaction score: 9
Messages: 106

I was able to resolve this, the route command has changed in FreeBSD 11 for gateways outside subnet.
The manual commands are:

Code:
/sbin/route add -net <gateway ip>/32 -iface <interface>
/sbin/route add default <gateway ip>

/etc/rc.conf
Code:
static_routes="routename"
route_routename="-net <gateway ip>/32 -iface <interface>"
defaultrouter="<gateway ip>

Hope this helps if you haven't been able to resolve it.


Thanks vectr0n. I'm sorry but that did not resolve it :/ I've made the changes, double and triple checked rc.conf for some error in names, IP's... but it still don't work.
 

cpm@

Moderator
Staff member
Moderator
Developer

Reaction score: 951
Messages: 2,140

Kalero,

Please, show us your /etc/rc.conf (last modifications applied).
 

cpm@

Moderator
Staff member
Moderator
Developer

Reaction score: 951
Messages: 2,140

Did you try using the defaultroute_delay option in /etc/rc.conf?
 
OP
Kalero

Kalero

Active Member

Reaction score: 9
Messages: 106

Those look fine for the OVH network, those settings work in all the OVH data centers for me, all running on ESXi 6.0. Did you put the VM on the correct virtual network in ESXi that is attached to the first nic in the server?

Thank you all for the replies.

Hi vectr0n,

yes, the VM is connected to the correct virtual network (VM Network) in ESXi (5.5), attached to the host's first NIC. I suspect there is something wrong in that rc.conf, in the way of specifying routes, because I've checked and rechecked all the values (IP's, MAC, DNS...) and all is set up correctly, besides they are the same values I set up in FreeBSD 10.3. Why the same configuration worked fine in FreeBSD 10.3 and not in FreeBSD 11.0?

Many thanks =)
 

vectr0n

New Member

Reaction score: 7
Messages: 5

Thank you all for the replies.

Hi vectr0n,

yes, the VM is connected to the correct virtual network (VM Network) in ESXi (5.5), attached to the host's first NIC. I suspect there is something wrong in that rc.conf, in the way of specifying routes, because I've checked and rechecked all the values (IP's, MAC, DNS...) and all is set up correctly, besides they are the same values I set up in FreeBSD 10.3. Why the same configuration worked fine in FreeBSD 10.3 and not in FreeBSD 11.0?

Many thanks =)

FreeBSD made a change to the route syntax for gateways outside subnet (like OVH), see below exact examples (I have masked some info for privacy reasons) of VM's running on ESXi on the OVH network.

FreeBSD 10.3:
Code:
# IPv4 Configuration
ifconfig_vmx0="inet 149.56.xxx.xxx netmask 255.255.255.255 broadcast 149.56.xxx.xxx" (if you aren't using the vmnet3 network driver, your interface will most likely be em0)
static_routes="ovhv4"
route_ovhv4="-net 167.114.xxx.xxx/32 149.56.xxx.xxx"
defaultrouter="167.114.xxx.xxx"

FreeBSD 11.0:
Code:
# IPv4 Configuration
ifconfig_vmx0="inet 91.134.xxx.xxx netmask 255.255.255.255 broadcast 91.134.xxx.xxx" (if you aren't using the vmnet3 network driver, your interface will most likely be em0)
static_routes="ovhv4"
route_ovhv4="-net 188.165.xxx.xxx -iface vmx0" (if you aren't using the vmnet3 network driver, your interface will most likely be em0)
defaultrouter="188.165.xxx.xxx"

As you can see the route_ovhv4 is different in both examples, this is again due to the change in FreeBSD that has caused the 10.3 config to not work on 11.0. If you are using 10.3 and earlier you need to use the FreeBSD 10.3 example above, if you are using FreeBSD 11.0 and later you need to use the FreeBSD 11.0 example above. Both those examples above have been working flawlessly for me and everyone else I know using the OVH network. You might of made a typo, make sure to check for that.
 
OP
Kalero

Kalero

Active Member

Reaction score: 9
Messages: 106

Hello people,

finally it's working :) It's a strange case. Yesterday, I downloaded again FreeBSD 11.0-RELEASE, reinstalled it, pasted the same configuration (same IP's, same MAC, same VM network...) and all worked fine!

The first installation, with the issues I shared in this post, was done using the first FreeBSD 11.0-RELEASE ISO images that were uploaded to the official FTP server; the second installation (yesterday) was done using the actual FreeBSD 11.0-RELEASE ISO images. I've read that the firstly uploaded FreeBSD 11.0-RELEASE ISO images caused some issues, so FreeBSD team needed to rebuild the system and upload the new ISO images. Is it possible my issue was caused due to these problems with the firstly released ISO images?

Many thanks.
 

vectr0n

New Member

Reaction score: 7
Messages: 5

Hello people,

finally it's working :) It's a strange case. Yesterday, I downloaded again FreeBSD 11.0-RELEASE, reinstalled it, pasted the same configuration (same IP's, same MAC, same VM network...) and all worked fine!

The first installation, with the issues I shared in this post, was done using the first FreeBSD 11.0-RELEASE ISO images that were uploaded to the official FTP server; the second installation (yesterday) was done using the actual FreeBSD 11.0-RELEASE ISO images. I've read that the firstly uploaded FreeBSD 11.0-RELEASE ISO images caused some issues, so FreeBSD team needed to rebuild the system and upload the new ISO images. Is it possible my issue was caused due to these problems with the firstly released ISO images?

Many thanks.

Glad to hear you were able to get it working :).

I have been using 11.0 since RC1 and had also installed the first release ISO that was bad, and didn't run into any issues personally on any of my servers, and there is a bunch of them. I find sometimes starting out fresh after running into issue can sometimes help as well, could of just been that, but again glad you were able to get it working :).
 

chrcol

Well-Known Member

Reaction score: 53
Messages: 482

Just a note from me.

I ordered a server from SyS (ovh budget), it is using vmware exsi 5.5. The server is hosted at ovh and support is also handled by ovh.

Anyway

I setup a VM and installed FreeBSD 11, this is my first time using 11, and I feel I didnt need to do anything specific to 11, I googled how to setup the gateway as SyS dont document it on the signup email's.

As it turns out no static routing is needed at all, all I had to do was this.

Add the ip (when asked in installer).
Set the netmask to 255.255.255.0
Set the gateway to the ip but with the fourth octet replaced by .254

Thats it, should have working internet access, without DHCP and without static routes.

I used 8.8.8.8 for dns initially (as was doing online install) and post installation switched to 127.0.0.1 as using local unbound dns cache.

For ipv6 they use a system similar to hetzner, with a fe80 as the gateway.

To find the gateway I needed to use I did this. documented here -> http://help.ovh.co.uk/Ipv4Ipv6

1 - add the ipv6 to interface which in my case is vmx0 using prefixlen 64
2 - run 'rtsol -dD vmx0' to find the gateway. Note they say to run 'rtsol -d rl0' with just the small 'd' but for me that didnt spit out any info.
3 - add to rc.conf - sadly they ommit some of the info on the page, I knew what to do as I have a hetzner server using same system

Mine is as follows with censored ip.

Code:
ipv6_default_interface="vmx0"
ipv6_defaultrouter="fe80::406:1%vmx0"
ifconfig_vmx0_ipv6="inet6 XXXX:XXXX:X:XXXX::1:1/64"

After reboot ipv6 was online.

Alias ips in both ipv4 and ipv6 are easy to add with no gateway needing to be specified.
 
Top