HomeBare MetalElastic MetalHow to
Configure a flexible IP (IPv6)
Jump toUpdate content

How to configure a flexible IPv6 on an Elastic Metal server

Reviewed on 17 July 2023Published on 30 March 2022

The configuration of a flexible IPv6 depends on the Linux distribution running on your machine. You can configure your flexible IPv6 on machines running Debian, Ubuntu, or CentOS.

Security & Identity (IAM):

You may need certain IAM permissions to carry out some actions described on this page. This means:

  • you are the Owner of the Scaleway Organization in which the actions will be carried out, or
  • you are an IAM user of the Organization, with a policy granting you the necessary permission sets
Note:

Make sure your flexible IPv6 is attached to your Elastic Metal server before configuring it.

You can find information about the DNS resolver to use in each datacenter at the network reference documentation.

How to configure IPv6 on Debian

  1. 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

    Remember to replace eno1 with the proper Internet interface name.

  2. Restart the network:

    sudo systemctl restart networking.service
Tip:

The network interface is initialized with the command allow-hotplug by default on Debian 9. It is possible that the network restart fails with this configuration. In this case, you can initialize the network with auto to avoid the problem.

How to configure IPv6 on Ubuntu

Ubuntu uses netplan as network configuration tool since the release of Ubuntu 18.04 LTS. It replaces the classical network configuration with new configuration files, written in YAML format, and located in the /etc/netplan directory. For more information regarding netplan, refer to the official netplan documentation.

  1. 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:
    - 62.210.16.6
    - 62.210.16.7
    search:
    - online.net
    version: 2

    Remember to replace eno1 with the proper name of your Internet interface.

    Note:

    The configuration example above is valid for the main IP address of your Dedibox server. If you want to use IPv6 on a virtual machine, remember to use the unique gateway for the failover IPv4.

  2. Check and validate your configuration file.

    sudo netplan try
  3. Activate the new configuration:

    sudo netplan apply

How to configure IPv6 on CentOS

  1. 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="62.210.16.6"
    IPADDR="DEDIBOX_MAIN_IP"
    GATEWAY="DEDIBOX_MAIN_IP_1" # The IPv4 gateway is your servers main IP address ending on .1 (e.g. Your servers IP is 62.210.16.123 means 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"
  2. Restart the networking service:
    systemctl restart network.service
See Also