---
title: How to configure a flexible IPv6 on an Elastic Metal server
description: Learn how to configure a flexible IPv6 on a Scaleway Elastic Metal server.
tags: configuration flexible-ipv6 ipv6 elastic-metal
dates:
  validation: 2025-08-19
  posted: 2022-03-30
---
import Requirements from '@macros/iam/requirements.mdx'


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.

<Requirements />
- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- An [installed Elastic Metal server](/elastic-metal/quickstart/#how-to-create-an-elastic-metal-server)

<Message type="note">
  Ensure your flexible IPv6 is [attached](/elastic-metal/how-to/attach-detach-flexible-ip/) to your Elastic Metal server before configuring it.
</Message>

<Message type="tip">
  Information about the DNS resolver to use in each data center is available in the [network reference documentation](/account/reference-content/scaleway-network-information/#dns-cache-servers-and-ntp-servers).
</Message>

## How to configure IPv6 on Debian

1. Open the network configuration file `/etc/network/interfaces` in a text editor and edit it as follows:
    ```plaintext
    auto eno1
    iface eno1 inet6 static
        address IPV6_ADDRESS
        netmask 64
    ```
    Replace `eno1` with the correct internet interface name.

2. Restart the network:
    ```bash
    sudo systemctl restart networking.service
    ```

<Message type="tip">
  On Debian 9, the network interface is initialized with the command `allow-hotplug` by default. If the network restart fails with this configuration, initialize the network with `auto` to avoid the problem.
</Message>

## How to configure IPv6 on Ubuntu

Ubuntu uses [netplan](https://netplan.io) for network configuration since Ubuntu 18.04 LTS. Netplan configuration files are written in [YAML](https://yaml.org) and located in the `/etc/netplan` directory. Refer to the official [netplan documentation](https://netplan.readthedocs.io/en/stable/examples/) for more information.

1. Open the default configuration file `/etc/netplan/01-netcfg.yaml` in a text editor and edit it as follows:
    ```yaml
    # 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)](/account/reference-content/scaleway-network-information/#dns-cache-servers-and-ntp-servers) with the ones located in the same geographical location as your machine for best performances.

    <Message type="note">
      The configuration example above is valid for the main IP address of your Dedibox server. For IPv6 on a [virtual machine](/dedibox-network/how-to/configure-network-netplan/#configuring-a-failover-ip-for-virtual-machines), use the unique gateway for the failover IPv4.
    </Message>

2. Check and validate your configuration file:
    ```bash
    sudo netplan try
    ```

3. Apply the new configuration:
    ```bash
    sudo netplan apply
    ```

4. Test the connection with a ping to an external host:
    ```bash
    ping6 google.com
    ```

## 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:
    ```plaintext
    # 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"
    ```

2. Restart the networking service:
    ```bash
    sudo systemctl restart network.service
    ```

3. Test the IPv6 connection with a ping to an external host:
    ```bash
    ping6 google.com
    ```