---
title: How to configure IPv6 connectivity using systemd-networkd
description: This page explains how to configure IPv6 connectivity on a Scaleway Dedibox using systemd-networkd or dhcpcd.
tags: dedibox ipv6 systemd-networkd
dates:
  validation: 2026-02-10
  posted: 2021-08-03
---
import Requirements from '@macros/iam/requirements.mdx'


<Requirements />

- A Dedibox account logged into the [console](https://console.online.net)
- A [Dedibox dedicated server](https://www.scaleway.com/en/dedibox/)
- [Requested](/dedibox-ipv6/how-to/request-prefix/) a /48 IPv6 prefix

<Message type="note">
  If you are running Ubuntu and using Netplan, follow the **Ubuntu (Netplan)** section.
  If you use systemd-networkd directly, or run a different Linux distribution, follow the **Linux (systemd-networkd)** section.
  If you use dhcpcd or your Linux distribution uses ifupdown, follow the **Linux (dhcpcd) section.
</Message>

## How to configure IPv6 on Ubuntu

Ubuntu uses [netplan](https://netplan.io) since the release of Ubuntu 18.04 LTS as network configuration tool.
It replaces the classical network configuration with new configuration files, written in [YAML](https://yaml.org) format, and located in the `/etc/netplan` directory. For more information regarding netplan, refer to the official [documentation](https://netplan.readthedocs.io/en/stable/).

1. Open the default configuration file `/etc/netplan/01-netcfg.yaml` in a text editor, and edit it as follows:
    ```yaml
    network:
    version: 2
    renderer: networkd
    ethernets:
        enp1s0:
        dhcp4: false
        dhcp6: false
        addresses:
            - "AAA.BBB.CCC.DDD/24"          # Dedibox IPv4
            - "2001:bc8:xxxx:xxx::1/64"     # Assigned IPv6
        gateway4: "AAA.BBB.CCC.1"
        routes:
            - to: 0.0.0.0/0
            via: "AAA.BBB.CCC.1"
            on-link: true
        nameservers:
            addresses:
            - "51.159.47.28"              # Replace with the DNS server closest to your DC
            - "51.159.47.26"
    ```

    Remember to replace `enp1s0` with the proper name of your internet interface.

    <Message type="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](/dedibox-network/how-to/configure-network-netplan/#configuring-a-failover-ip-for-virtual-machines), remember to use the unique gateway for the failover IPv4.
    </Message>
2. Apply and verify the configuration:
    ```bash
    sudo netplan --debug apply

    ```
3. Verify addressing:
    ```bash
    ip -4 addr
    ip -6 addr
    ip -6 route
    ```

## How to configure IPv6 on Linux with systemd-networkd

`systemd-networkd` is the network manager of [systemd](https://systemd.io/).
Most modern Linux distributions ship with `systemd-networkd`.
This method is appropriate when you:

* run distributions that do not use Netplan
* prefer low-level network configuration
* configure containers or VMs manually

Your IPv6 prefix is routed statically; DHCPv6 is used only for lease negotiation and DUID identification — not for address assignment.


<Message type="tip">
  When specifying the IP address of your Dedibox, you need to enter it in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). The netmask for the main IPv4 of a Dedibox server is `/24`, the netmask for a failover IPv4 is `/32`. The netmask for the IPv6 is `/64`.
</Message>

1. Run the `ip link show` command to find the name of your public internet interface (Example: `eno1`). Make sure to store it, as it will be required in the next steps.
2. Create a networkd config file:
    ```bash
    touch /etc/systemd/network/eno1.network
    ```
5. Open the file in a text editor and paste the following content. Make sure to replace the values in the example with your own and save them before exiting the text editor.
    ```bash
    [Match]
    Name=eno1

    [Network]
    # Static IPv4 and IPv6 assignment
    Address=AAA.BBB.CCC.DDD/24
    Address=2001:bc8:xxxx:xxx::1/64

    Gateway=AAA.BBB.CCC.1
    DNS=51.159.47.28
    DNS=51.159.47.26

    # DHCPv6 only for PD negotiation
    DHCP=ipv6
    IPv6AcceptRA=yes

    [DHCP]
    ClientIdentifier=duid
    DUIDType=link-layer
    # The Scaleway DUID (without DUID-LL prefix "00:03")
    DUIDRawData=<Scaleway-IPv6-DUID>

    [IPv6AcceptRA]
    # Required to properly accept Prefix Delegation
    DHCPv6Client=always
    UseOnLinkPrefix=false
    UseAutonomousPrefix=false
    ```

    <Message type="note">
        To retrieve the DUID run the following command:

        ```
        journalctl -u systemd-networkd | grep -i duid
        ```
    </Message>
10. Run the following command to activate the new configuration.
    ```bash
    sudo systemctl enable --now systemd-networkd
    ```

## How to configure IPv6 on Linux with dhcpcd

This section expands the existing tutorial on [dhcpcd](/tutorials/dhcpcd-dedibox/).

On certain Linux distributions like Debian Trixie, you may find `dhcpcd` alongside `ifup` (`dhcpcd-base` must be installed).

1. Enable SLAAC on your dashboard, if your server supports it.

        <Message type="tip">
        If SLAAC is not provided for your Dedibox, you can skip to the `dhcpcd` configuration.
        </Message>

2. Ensure the interface and firewall allow IPv6 routing advertisements.

        For instance, if your interface is named `eno1`, as root, you can set it using:

        ```bash
        echo 1 > /proc/sys/net/ipv6/conf/eno1/accept_ra
        ```

        Next, configure `dhcpcd`:

3. Copy DUID into  `/var/lib/dhcpcd/duid`. This file is auto-generated the first time by `dhcpcd`.

        While there is a `duid <uuid>` option in the configuration, the Scaleway one is not in the correct format, resulting in the client using the generated one.

4. Update the configuration of `/etc/dhcpcd.conf` with the following:

        ```bash
        interface eno1
        # request to use dhcpv6
        dhcp6
        # request a non-temporary address
        ia_na
        # sets the "identifier" of the interface to 1
        iaid 1

        # request a prefix delegation on the interface 1 but do not allocate it (-)
        ia_pd 1 -
        ```
        If you are only using the /48, you should request a prefix delegation (`ia_pd`) and allocate it to other interfaces (VMs, VPN, etc.) or just keep it blank with `-`.

5. Restart the appropriate service:

        On Debian, you can restart `networking` which relies on `ifup`:

        ```bash
        sudo systemctl restart networking
        ```

        Or if you use a distribution that has standalone `dhcpcd`:

        ```bash
        sudo systemctl restart dhcpcd@eno1
        ```

## Additional notes

### IPv6 addressing

* Your /48 prefix must be subdivided into /64 networks
* The host config generally uses one /64 per interface

### CIDR quick reference

| Type                  | CIDR |
| --------------------- | ---- |
| Main IPv4             | /24  |
| Failover IPv4         | /32  |
| Single IPv6 subnet    | /64  |
| Delegated IPv6 prefix | /48  |

### DNS servers

Scaleway resolvers vary by datacenter.
Refer to [Scaleway network information](/account/support/scaleway-network-information/) for more information.