cloudscaleKnowledge Base
Floating IPs and Networks
Floating IPs can be moved between servers, e.g. for HA, non-disruptive maintenance, or re-using the same IP after replacing a server.
General information
In addition to a server's or load balancer's own IP address, you can assign one or more Floating IPs or (in the case of a server) Floating Networks.
Floating IPs and Networks can be moved between your target systems, either within a cloud region or across regions ("global" Floating IPs and Networks). This means that you can redirect network traffic without the need of DNS changes.
When a server or load balancer is deleted, its assigned Floating IPs and Networks will remain in your project, available for assigning to a new target.
Note: Floating IPs and Networks are also used if you would like to use your own IP ranges at cloudscale.
To use a Floating IP with a server, local configuration on the server is needed.
Non-persistent configuration
For configuring Floating IPs in a running system, create a dummy interface and add the addresses to that interface.
ip link add dummy1 type dummy
ip addr add 192.0.2.123/32 dev dummy1
ip addr add 2001:db8::cafe/128 dev dummy1
Important note: These changes are not permanent and will be lost after a reboot. Depending on your distribution, follow the instructions below to make the configuration persistent.
We recommend creating a dummy interface. This allows you to use the Floating IP locally even if one or all of the other network interfaces are in the DOWN state. Of course, you are free to choose a different approach.
Distributions using netplan (i.e. Debian ≥12, Ubuntu ≥18.04)
For newer Debian-derived distributions that make use of netplan, you can create the dummy0 interface using the following configuration files and run systemctl reload systemd-networkd to apply the configuration.
/etc/systemd/network/25-dummy.netdev:
[NetDev]
Name=dummy0
Kind=dummy
/etc/systemd/network/50-static.network:
[Match]
Name=dummy0
[Network]
Address=192.0.2.123/32
Address=2001:db8::cafe/128
Older Debian-derived distributions (Debian, Ubuntu)
For older Debian-derived distributions (Debian, Ubuntu), create/update the following configuration file and run ifup dummy0 to apply the configuration.
/etc/network/interfaces.d/dummy0-floating-ip.cfg:
# Automatically bring the interface up on boot.
auto dummy0
iface dummy0 inet static
# The Floating IPv4 address to configure on this interface.
address 192.0.2.123/32
pre-up ip link add dummy0 type dummy || true
iface dummy0 inet6 static
# The Floating IPv6 address to configure on this interface.
address 2001:db8::cafe/128
Distributions using NetworkManager
For distributions using NetworkManager (RHEL 8, CentOS 8, CentOS Stream and Fedora) run the following commands:
nmcli con add type dummy ifname dummy0
nmcli con mod dummy-dummy0 ipv4.method manual ipv4.addresses 192.0.2.123/32
nmcli con mod dummy-dummy0 ipv6.method manual ipv6.addresses 2001:db8::cafe/128
nmcli con up dummy-dummy0
sysconfig-based distributions
For sysconfig-based distributions (RHEL 7 and CentOS 7) create/update the following configuration files and run modprobe dummy; ifup dummy0 to apply the configuration.
/etc/modules-load.d/dummy.conf:
# Load the dummy module on boot.
dummy
/etc/sysconfig/network-scripts/ifcfg-dummy0:
[Match]
Name=dummy0
[Network]
Address=192.0.2.123/32
Address=2001:db8::cafe/128