Jump toUpdate content
How to configure an IPv6 subnet on a Dedibox running Linux
- You have an account and are logged into the Dedibox console
- You have created a Dedibox dedicated server
- You have requested a /48 IPv6 prefix
- You have configured the DHCPv6 client
- Make sure you have configured the DHCPv6 client on your system before setting up the network configuration.
- Make sure IPv6 SLAAC is enabled on servers supporting this feature.
How to configure IPv6 on Debian
-
Open the network configuration file
/etc/network/interfaces
in a text editor and edit it as follows:auto eno1iface eno1 inet6 staticaddress IPV6ADDRESSnetmask PREFIXLENGTHRemember to replace
eno1
with the proper Internet interface name. -
Restart the network:
sudo systemctl restart networking.service
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 Debian without systemd
If you do not want to use systemd to start your services, use the following configuration.
-
Open the network configuration file
/etc/network/interfaces
in a text editor and edit it as follows:iface eno1 inet6 staticpre-up modprobe ipv6address IPV6ADDRESSnetmask PREFIXLENpost-up dhclient -cf /etc/dhcp/dhclient6.conf -6 -P -d -v $IFACEAdapt the interface name (
eno1
) to your needs, as well as the IPv6 address and the netmask. -
Restart the network:
sudo systemctl restart networking.service
How to configure IPv6 on Ubuntu
Ubuntu uses netplan 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 format, and located in the /etc/netplan
directory. For more information regarding netplan, refer to the official documentation.
-
Open the default configuration file
/etc/netplan/01-netcfg.yaml
in a text editor, and edit it as follows:# This file describes the network interfaces available on your system# For more information, see netplan(5).network:version: 2renderer: networkdethernets:enp1s0:dhcp4: nodhcp6: noaddresses:- "aaa.bbb.ccc.ddd/24" # The main IP address of your Dedibox server- "<IPv6_FROM_YOUR_BLOCK>/<SUBNETMASK>" # An IP address from your IPv6 block and it's subnet maskgateway4: aaa.bbb.ccc.1 # The gateway is the IP address of your Dedibox, ending on .1nameservers:addresses: [62.210.16.6, 62.210.16.7]routes:- to: 0.0.0.0via: aaa.bbb.ccc.1on-link: trueRemember to replace
enp1s0
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.
-
Check and validate your configuration file.
sudo netplan –debug -
Activate the new configuration:
sudo netplan apply
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-kickstartUUID=xxxxxDNS1=62.210.16.6BOOTPROTO=noneDEVICE=eth0ONBOOT=yesTYPE=EthernetIPADDR=62.210.xx.xxPREFIX=24GATEWAY=62.210.xx.1DEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6ADDR="IPV6ADDRESS/PREFIXLEN"IPV6_AUTOCONF=yesNAME="System eth0" - Restart the networking service:
systemctl restart networking.service
If your network connections are managed by the Network Manager, use the nmtui
tool to configure IPv6 from a text user interface.