Configure Persistent Floating IPs

If you use more than one Floating IP, the number on the interface (eth0:1) will increase (example eth0:2).

On Debian based distributions (Ubuntu versions before 20.04, Debian):

  1. Access the server via SSH.
  2. Create the configuration file and open an editor:

    touch /etc/network/interfaces.d/60-my-floating-ip.cfg
    nano /etc/network/interfaces.d/60-my-floating-ip.cfg
  3. Paste the following configuration into the editor and replace 11.22.33.44 with your Floating IP:

    IPv4:

    auto eth0:1
    iface eth0:1 inet static
     address 11.22.33.44
     netmask 32

    IPv6:

    auto eth0:1
    iface eth0:1 inet6 static
     address one IPv6 address of the subnet, e.g. 2a01:4f9:0:2a1::2
     netmask 64
  4. Now you should restart your network. Caution: This will reset your network connection:

    sudo service networking restart

Ubuntu 20.04:

  1. Access the server via SSH.
  2. Create the configuration file and open an editor:

    touch /etc/netplan/60-floating-ip.yaml
    nano /etc/netplan/60-floating-ip.yaml
  3. Paste the following configuration into the editor and replace 11.22.33.44 with your Floating IP:

    IPv4:

    network:
       version: 2
       renderer: networkd
       ethernets:
         eth0:
           addresses:
           - 11.22.33.44/32

    IPv6:

    network:
       version: 2
       renderer: networkd
       ethernets:
         eth0:
           addresses:
           - your.float.ing.ip/64
  4. Now you should restart your network. Caution: This will reset your network connection:

    sudo netplan apply

On RHEL based distributions (Fedora, CentOS):

  1. Access the server via SSH.
  2. Create the configuration file and open an editor:

    touch /etc/sysconfig/network-scripts/ifcfg-eth0:1
    vi /etc/sysconfig/network-scripts/ifcfg-eth0:1
  3. Paste the following configuration into the editor and replace 11.22.33.44 with your Floating IP:

    IPv4:

    BOOTPROTO=static
    DEVICE=eth0:1
    IPADDR=11.22.33.44
    PREFIX=32
    TYPE=Ethernet
    USERCTL=no
    ONBOOT=yes

    IPv6:

    BOOTPROTO=none
    DEVICE=eth0:1
    ONBOOT=yes
    IPV6ADDR=one IPv6 address of the subnet, e.g. 2a01:4f9:0:2a1::2/64
    IPV6INIT=yes
  4. Now you should restart your network. Caution: This will reset your network connection:

    systemctl restart network
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Connect to your Cloud Instance

With our easy-to-use tools, you can access the noVNC console at ArkHost directly from the client...

DDoS Protection

Secure your cloud servers from attacks In a DDoS (Distributed Denial of Service) attack, an...

How to Reset the root Password of my Cloud Instance

Sometimes bad things can happen, and occasionally you just can't remember your server's root...

Install Windows Server 2019 on ArkHost

Requirements; deploy a server with a minimum below configuration: 2 vCPU, 4GB RAM, 40 GB DISK...

Rebuild a Cloud Instance

At ArkHost you have the option to recreate your virtual server at any time. This process usually...