This is an old revision of the document!


Configure an IP Failover on CoreOS

The configuration must be set as explained on official documentation.

Start by Editing/Creating /etc/systemd/network/20-multi_ip.network as described :

[Match]
Name=eno1

[Network]
DNS=62.210.16.6
DNS=62.210.16.7
Address=62.210.xx.xx/24
Gateway=62.210.xx.1
Address=212.83.xx.xx/32

You need to replace eno1 with your network interface name.

DNS servers IP addresses used are Online.NET's, you can keep these settings.

Then, first Address is the IP address of the physical server, followed by /24 (CIDR notation).

The gateway IP address has the same first 3 bytes as the server's IP followed by .1.

i.e.: 62.210.84.1

For each additional IP, add a new line Address with the failover IP, followed by /32 (CIDR notation).

Then restart your network services to activate these new settings:

sudo systemctl restart systemd-networkd.

You should see your two new IP addresses by typing:

ip addr show.

Example :

ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether c8:1f:66:c9:2e:f2 brd ff:ff:ff:ff:ff:ff
    inet 62.210.xx.xx/24 brd 62.210.xx.255 scope global eno1
       valid_lft forever preferred_lft forever
    inet 212.83.xx.xx/32 brd 212.83.xx.xx scope global eno1
       valid_lft forever preferred_lft forever
    inet6 fe80::ca1f:66ff:fec9:2ef2/64 scope link 
       valid_lft forever preferred_lft forever
3: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    link/ether c8:1f:66:c9:2e:f3 brd ff:ff:ff:ff:ff:ff
    inet 10.90.xx.xx/26 brd 10.90.215.127 scope global eno2
       valid_lft forever preferred_lft forever
    inet6 fe80::ca1f:66ff:fec9:2ef3/64 scope link 
       valid_lft forever preferred_lft forever