Knowledge base
1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!
Check and configure DHCPv6 on your Cloud VPS
This guide explains how to check and configure DHCPv6 support on the operating system of your Infomaniak Cloud VPS.
Introduction
- During a planned operation requiring the migration of your Cloud VPS to another cluster, the assignment of the current IPv6 address will now rely on DHCPv6 in order to retain the address already assigned to the server.
- DHCPv6 only serves to automatically transmit this same IPv6 address to the operating system of the Cloud VPS.
- This change only concerns Cloud VPSs where you manage the operating system yourself.
- It does not concern Managed Cloud Servers.
- If your operating system does not support DHCPv6, you can statically configure the IPv6 address in the operating system of your Cloud VPS.
- The IPv6 address to use is indicated in the dashboard of your Cloud VPS, from the Infomaniak Manager.
Check that IPv6 is enabled
DHCPv6 cannot function if IPv6 is disabled on the system. Check the status of IPv6 with the following commands:
sysctl net.ipv6.conf.all.disable_ipv6
cat /proc/net/if_inet6
ip -6 addr showThe first command should return 0. The /proc/net/if_inet6 file should contain at least one IPv6 address.
Check for acceptance of router advertisements
Prerequisites
- Identify the name of the network interface in question, for example
eth0,ens3orenp1s0. - Replace
<interface>in the commands below with the name of this interface.
The triggering of DHCPv6 depends on the flags transmitted by the router advertisements, called Router Advertisements (RA), and not only on the local server configuration.
The router announces the following two indicators in particular:
- M — Managed: use DHCPv6 to obtain the IPv6 address in stateful mode
- O — Other: use DHCPv6 only to obtain additional parameters, such as DNS servers, the IPv6 address then being assigned by SLAAC
Check that the interface accepts RA (Router Advertisement) announcements:
sysctl net.ipv6.conf.<interface>.accept_raThe possible values are:
0: RA announcements are not accepted1: RA announcements are accepted2: RA announcements are accepted even when routing is enabled
If the ndisc6 package is installed under Debian, Ubuntu, Fedora, or RHEL, display the received announcements:
rdisc6 <interface>The following line indicates that the network requests the use of DHCPv6 to assign the IPv6 address:
Stateful address conf. : Yes
Configure DHCPv6 according to the network manager
The configuration to be applied depends on the network manager used by the operating system of your Cloud VPS.
NetworkManager
NetworkManager is used in particular by RHEL, Rocky Linux, AlmaLinux, CentOS Stream, Fedora, and frequently by Ubuntu Desktop.
Display the NetworkManager connections to identify the name of the one associated with the network interface:
nmcli connection showIn the following commands, replace <connection> with the name of this connection.
Display its IPv6 settings:
nmcli connection show "<connexion>" | grep ipv6The determining parameter is ipv6.method. It may contain the following values in particular:
auto: processes RA announcements and uses DHCPv6 when the indicators transmitted by the router request itdhcp: forces the use of DHCPv6 in stateful modemanual: uses a manual IPv6 configurationdisabled: disables IPv6 for this connection
The auto value is recommended so that NetworkManager processes RA advertisements and uses DHCPv6 when the network requests it.
To apply this configuration:
nmcli connection modify "<connexion>" ipv6.method auto
nmcli connection up "<connexion>"
systemd-networkd
systemd-networkd is notably used by Arch Linux and many server-oriented distributions.
In the file corresponding to the interface under /etc/systemd/network/*.network, check for the presence of the following parameters:
[Network]
DHCP=ipv6
IPv6AcceptRA=yesTo enable DHCP in IPv4 and IPv6:
[Network]
DHCP=yes
IPv6AcceptRA=yesThen, check the actual status of the interface and the DHCPv6 lease obtained:
networkctl status <interface>
Netplan
Netplan is notably used by Ubuntu since version 18.04. It is a layer that generates a configuration for systemd-networkd or NetworkManager.
In the corresponding file under /etc/netplan/*.yaml, enable DHCPv6 for the interface in question:
network:
version: 2
ethernets:
eth0:
dhcp6: true
accept-ra: trueReplace eth0 with the name of the interface in question, then display the effective configuration and apply it:
netplan get
netplan apply
wicked
wicked is notably used by openSUSE and SUSE Linux Enterprise Server.
Check the DHCLIENT6_MODE parameter in the file corresponding to the interface:
/etc/sysconfig/network/ifcfg-<interface>Then, check the status of the interface:
wicked show <interface>
Direct DHCPv6 client
The following commands allow you to perform a manual DHCPv6 test or use it directly, especially on Alpine Linux, Gentoo, and some Arch Linux installations.
With the ISC DHCP client:
dhclient -6 -v <interface>DHCPv6 leases are recorded in:
/var/lib/dhcp/dhclient6.leasesWith dhcpcd:
dhcpcd -6 <interface>
Configure the IPv6 address statically
If the operating system of your Cloud VPS does not support DHCPv6, or if you cannot use it, configure the IPv6 address indicated in the dashboard of your Cloud VPS directly, from the Infomaniak Manager.
The method depends on the network manager used by the operating system. In all cases, be sure to use the exact IPv6 address, prefix, and gateway provided for your Cloud VPS.
Link to this FAQ: https://faq.infomaniak.com/2914
Has this FAQ been helpful?