CENTOS 7, VMWARE and OVH Failover IP

Issues related to configuring your network
Post Reply
janrunhart
Posts: 2
Joined: 2017/07/05 14:45:38

CENTOS 7, VMWARE and OVH Failover IP

Post by janrunhart » 2017/07/05 15:10:53

Dear forum-users,

I've been struggling for some days now for an answer to my problem. I used to use CENTOS 6 on my VM and that worked like a charm. But now i bought (hired) a new dedicated server with OVH(Soyoustart) and have some real issues with networking in CENTOS 7.

I've followed all the documentation and faq's but it still isn't working. I hope someone can help me with my problem.

System
- Dedicated Server with OVH
- 1 Master Ip of dedicated server
- 8 Failover IP's
- VMware ESXI 6.5 on dedicated server
- CENTOS 7 on VM1

Guide of OVH:
http://docs.ovh.ca/en/guides-network-bridging.html#id11
CentOS 7

Different codes
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

For CentOS 7, the network adapter will vary depending on the installation. You will need to verify what is the adapter name and use it to configure your Virtual Machine. Use the command ipaddr to find your interface name.

File: /etc/sysconfig/network-scripts/ifcfg-(insert interface Name)

Code: Select all

DEVICE=(insert interface Name)
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.255
IPADDR=IP.FAIL.OVER
GATEWAY=GATEWAY_VM
ARP=yes
HWADDR=MY:VI:RT:UA:LM:AC
If the file route-(insert interface Name) does not exist, you’ll have to create it. For CentOS 7, NETWORK_GW_VM= Network of the GATEWAY_VM which is the main IP of your server where you replace the last octet by 0.

File: /etc/sysconfig/network-scripts/route-(insert interface Name)

Code: Select all

GATEWAY_VM - 255.255.255.255 (insert interface Name)
NETWORK_GW_VM - 255.255.255.0 (insert interface Name)
default GATEWAY_VM
File: /etc/resolv.conf

Code: Select all

nameserver 213.186.33.99
Let's say this is the configuration (the 100 is symbolic and not real):
- IP of Dedicated server = 158.100.253.5
- IP of VM = 158.100.30.48
- MAC of VM = 00:50:56:0C:00:00

Then this is the config of

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

Code: Select all

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.255
IPADDR=158.100.30.48
GATEWAY=158.100.253.254
ARP=yes
HWADDR=00:50:56:0C:00:00
/etc/sysconfig/network-scripts/route-eth0

Code: Select all

158.100.253.254 - 255.255.255.255 eth0
158.100.253.0 - 255.255.255.0 eth0
default  158.100.253.254
/etc/resolv.conf

Code: Select all

nameserver 213.186.33.99
Route -n

Code: Select all

0.0.0.0	158.100.253.254	0.0.0.0
158.100.30.48		0.0.0.0	255.255.255.248
158.100.253.0		0.0.0.0	255.255.255.255
158.100.253.254	0.0.0.0	255.255.255.255
Does anyone knows the solution or get me in the right direction to solve this problem?

Thanks in advance, Jan

aks
Posts: 3069
Joined: 2014/09/20 11:22:14

Re: CENTOS 7, VMWARE and OVH Failover IP

Post by aks » 2017/07/05 16:27:52

U'm not sure what you are asking for. I'll assume it's about IP fail-over. The big change in C7 (vs C6) is the way the team (bonding) driver works. Now it uses runners to define things like round-robin, active-backup etc. See https://access.redhat.com/documentation ... nners.html

aks
Posts: 3069
Joined: 2014/09/20 11:22:14

Re: CENTOS 7, VMWARE and OVH Failover IP

Post by aks » 2017/07/05 16:30:40

EDIT: Also I have no idea or experience with OVH.

janrunhart
Posts: 2
Joined: 2017/07/05 14:45:38

Re: CENTOS 7, VMWARE and OVH Failover IP

Post by janrunhart » 2017/07/05 19:12:32

Thanks for the reply. The problem is that the VM is unreachable and that i haven't got any connection with the world. It's a networking problem for sure. Ubuntu and centos 6 are both working fine. I think it's the routing in Centos 7.

aks
Posts: 3069
Joined: 2014/09/20 11:22:14

Re: CENTOS 7, VMWARE and OVH Failover IP

Post by aks » 2017/07/06 16:22:12

Okay I would take out:
158.100.253.254 - 255.255.255.255 eth0
from /etc/sysconfig/network-scripts/route-eth0
Why would you have a route to a /32?

The way to troubleshoot is can you get to the default route from that machine? If you can, the problem lies beyond that router. If not, the problem lies either with this machine or the LAN it's connected to.
Then proceed to the next hop - given it's some sort of provider network, you may have to involve them to go beyond the default route as you have no visibility (I guess)?

User avatar
TrevorH
Forum Moderator
Posts: 31322
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CENTOS 7, VMWARE and OVH Failover IP

Post by TrevorH » 2017/07/06 16:30:19

OVH have a weird network set up where in a lot of cases the default gateway does not reside in the same subnet as the interface itself. This means you have to add an explicit route to the gateway ip via the device itself and then add your real routes on top of that. I presume OVH do this to save themselves ip addresses but it's non-standard and rather "special".
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

aks
Posts: 3069
Joined: 2014/09/20 11:22:14

Re: CENTOS 7, VMWARE and OVH Failover IP

Post by aks » 2017/07/06 17:02:59

Okay, I missed the fact that the WHOLE thing is a /32 and as I said know nothing of OVH.

Posted instructions say:
NETWORK_GW_VM - 255.255.255.0 (insert interface Name)
But I don't see a /24 in the posted routing table:
0.0.0.0 158.100.253.254 0.0.0.0
158.100.30.48 0.0.0.0 255.255.255.248
158.100.253.0 0.0.0.0 255.255.255.255
158.100.253.254 0.0.0.0 255.255.255.255
(also I don't know where 158.100.30.48/29 comes from).

Post Reply

Return to “CentOS 7 - Networking Support”