Update content

How to configure IPv6 connectivitiy using networkd

Reviewed on 03 August 2021Published on 03 August 2021

networkd is the network manager of systemd and can be used as an alternative to the configuration of IPv6 using a standalone DHCP client.


When specifying the IP address of your Dedibox, you need to enter it in CIDR notation. The netmask for the main IP of a Dedibox server is /24, the netmask for a failover IP is /32.

  1. To configure networkd, start by creating a backup of the current network configuration:

    sudo mv /etc/network/interfaces /etc/network/interfaces.backup
  2. Enable networkd by using the systemctl command. Do not start the service yet, as the server is currently still running on the old configuration and may become unreachable if networkd is started at this step.

    systemctl enable systemd-networkd
  3. Create a new file called dummy0.netdev in the /etc/systemd/network directory and open it in a text editor, i.e. nano.

    sudo nano /etc/systemd/network/dummy0.netdev
  4. Copy the following content into the file, save it, and exit the text editor:

  5. Create a new file dummy0.network and open it in nano:

    sudo nano /etc/systemd/network/dummy0.network
  6. Copy the following content into the file, save it and exit the text editor:

  7. Find the name of your public internet interface using the ip link show command and take a note of it. In this example, the name of the interface is enp1s0f0. Take a note of it, as it will be required in the next steps.

  8. Create a new file called <interface_name>.network and open it in a text editor

    sudo nano /etc/systemd/network/enp1s0f0.network
  9. Copy the following content in the file, edit it towards your configuration before saving the file and exiting the text editor.

    [Match]#The name must correspond to your interface nameName=enp1s0
    [Network]DHCP=ipv6IPv6AcceptRA=True# IPv4 of the DediboxAddress=<ip_of_your_dedibox>/<netmask># IPv6 of the DediboxAddress=<your_ipv6_address>/<netmask>
    [Route]# The gateway is either your dedibox ip ending on .1 (i.e. x.y.z.1) for the physical host or for any VM running on a DediboxGateway=<gateway_ip>GatewayOnlink=yes
    [DHCP]ClientIdentifier=duid-onlyDUIDType=link-layer# Onine by Scaleway DUID without 00:03 at the begginnigDUIDRawData=<Online by Scaleway DUID>ForceDHCPv6PDOtherInformation=yes
  10. Reboot the machine to activate the new configuration.

    sudo reboot
See Also