How to configure a flexible IPv6 on an Elastic Metal server
The configuration of a flexible IPv6 depends on the Linux distribution running on your Elastic Metal server. This guide covers the steps for configuring your flexible IPv6 on machines running Debian, Ubuntu, or CentOS.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An installed Elastic Metal server
How to configure IPv6 on Debian
-
Open the network configuration file
/etc/network/interfaces
in a text editor and edit it as follows:auto eno1 iface eno1 inet6 static address IPV6_ADDRESS netmask 64
Replace
eno1
with the correct internet interface name. -
Restart the network:
sudo systemctl restart networking.service
How to configure IPv6 on Ubuntu
Ubuntu uses netplan for network configuration since Ubuntu 18.04 LTS. Netplan configuration files are written in YAML and located in the /etc/netplan
directory. Refer to the official netplan documentation for more information.
-
Open the default configuration file
/etc/netplan/01-netcfg.yaml
in a text editor and edit it as follows:# This is the network config written by 'subiquity' network: ethernets: eno1: critical: true dhcp-identifier: mac dhcp4: true addresses: [ "IPV6_ADDRESS/64" ] nameservers: addresses: - "2001:bc8:1008:1::16" - "2001:bc8:1008:1::16" search: - online.net version: 2
- Replace
eno1
with the correct name of your internet interface. - Replace the IP addresses of the resolving DNS servers (nameservers) with the ones located in the same geographical location as your machine for best perfomances.
- Replace
-
Check and validate your configuration file:
sudo netplan try
-
Apply the new configuration:
sudo netplan apply
-
Test the connection with a ping to an external host:
ping6 google.com
How to configure IPv6 on CentOS
-
Open the automatically generated configuration file for your internet interface in a text editor, for example
/etc/sysconfig/network-scripts/ifcfg-eth0
and edit it as follows:# Generated by parse-kickstart UUID=xxxxx DNS1="51.159.47.28" IPADDR="DEDIBOX_MAIN_IP" GATEWAY="DEDIBOX_MAIN_IP_1" # The IPv4 gateway is your server's main IP address ending in .1 (e.g., if your server's IP is 62.210.16.123, the gateway is 61.210.16.1) NETMASK="255.255.255.0" IPV6ADDR="IPV6_ADDRESS/64" IPV6_AUTOCONF="yes" BOOTPROTO="static" DEVICE="eth0" ONBOOT="yes" IPV6INIT="yes"
-
Restart the networking service:
sudo systemctl restart network.service
-
Test the IPv6 connection with a ping to an external host:
ping6 google.com