Hetzner - DokuWiki

Cloud floating IP persistent/en
K (Debian/Ubuntu)
K (Debian/Ubuntu)
Zeile 16: Zeile 16:
 
<pre>auto eth0:1
 
<pre>auto eth0:1
 
iface eth0:1 inet6 static
 
iface eth0:1 inet6 static
     address <Eine IPv6 Adresse aus dem Subnetz, z.B. 2a01:4f9:0:2a1::2>
+
     address <one IPv6 address of the subnet, e.g. 2a01:4f9:0:2a1::2>
 
     netmask 64
 
     netmask 64
 
</pre>
 
</pre>

Version vom 26. Juni 2018, 13:35 Uhr

Cloud floating IP persistent

If you are using more than one  floating IP, then the number on the interface (eth0:1) will be increased (example eth0:2)

Debian/Ubuntu

edit of /etc/network/interfaces.d/99-floating.cfg IPv4:

auto eth0:1
iface eth0:1 inet static
    address <your floating IP>
    netmask 255.255.255.255

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

After the reboot of the cloud server, the floating IP should be available.

CentOS/Fedora

edit of /etc/sysconfig/network-scripts/ifcfg-eth0:1 IPv4:

BOOTPROTO=none
DEVICE=eth0:1
ONBOOT=yes
IPADDR=<Ihre Floating IP>
NETMASK=255.255.255.255

IPv6:

BOOTPROTO=none
DEVICE=eth0:1
ONBOOT=yes
IPV6ADDR=<Eine IPv6 Adresse aus dem Subnetz, z.B. 2a01:4f9:0:2a1::2>/64
IPV6INIT=yes


© 2020. Hetzner Online GmbH. Alle Rechte vorbehalten.