Each customer can request a /48 IPv6 prefix for free. If you have not yet ordered your block yet, you can do it now from the CloudLinkd Lab.

We will use dhclient.

You'll need to edit the following file /etc/dhcp/dhclient6.conf :

interface "eth0" {
   send dhcp6.client-id DUID;
}

You will have to adapt the interface name (eth0) and the DUID, available in your CloudLinkd Lab account.

 

Start your DHCPv6 client at boot

Once the client is configured, you'll need to create a new SystemD service.

Create the following file, adapting the interface name (eth0) and the DUID /etc/systemd/system/dhclient.service:

[Unit]
Description=dhclient for sending DUID IPv6
Wants=network.target
Before=network.target

[Service]
Type=forking
ExecStart=/usr/sbin/dhclient -cf /etc/dhcp/dhclient6.conf -6 -P -v eth0

[Install]
WantedBy=multi-user.target

dhclient's path may vary depending on your OS. To know the exact path, use the following command: which dhclient

Then, enable it for every reboot: systemctl enable dhclient.service.

 

Configure the Network on Ubuntu 16 & Debian 8 and 9

The following commands have to be used as root or with sudo

Start by editing /etc/network/interfaces as follow:

auto eno1
iface eno1 inet6 static
    address IPV6ADDRESS
    netmask PREFIXLEN

You'll need to replace eno1 with the proper interface name.
With Debian & old versions of Ubuntu, it's usually eth0.

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.
 

Alternate configuration without SystemD

If you don't use SystemD to start your services, you can configure your /etc/network/interfaces as follow:

iface eno1 inet6 static
    pre-up modprobe ipv6
    pre-up dhclient -cf /etc/dhcp/dhclient6.conf -6 -P -d -v $IFACE
    address IPV6ADDRESS
    netmask PREFIXLEN

Still adapting your interface name (eno1) to your needs, as well as the IPv6 address and the Netmask.

 

Configure the Network on CentOS 7

The following commands have to be used as root or with sudo

After configuring your dhclient and SystemD, you'll need to edit /etc/sysconfig/network-scripts/ifcfg-eth0:

# Generated by parse-kickstart
UUID=xxxxx
DNS1=62.210.16.6
BOOTPROTO=none
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
IPADDR=62.210.xx.xx
PREFIX=24
GATEWAY=62.210.xx.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6ADDR="IPV6ADDRESS/PREFIXLEN" 
IPV6_AUTOCONF=yes
NAME="System eth0" 

Once done with the configuration, you can reboot your server to check that the service & the configuration are correctly applied at the boot!

You will need to allow in your firewall 546/UDP Incoming & 547/UDP Outgoing.

Test your configuration

Launch the dhclient with the following command:

dhclient -cf /etc/dhcp/dhclient6.conf -6 -P -v eth0

To check your IPv6 connectivity, you can use the PING command:

ping6 ipv6.google.com

Debug

If the configuration is not working for you, check your interface name with the following command:

ifconfig -a

Also, your server need to be configured to accept RA (Router Advertisement).
By default, your server won't accept to forward packets from an interface to another if it's automatically configured (through DHCPv6).

If you need to forward IPv6 packets and use an automated configuration, you'll need to set your sysctl net.ipv6.conf.all.accept_ra to 2 in /etc/sysctl.conf.
This is useful usually for Hypervisor Host such as Proxmox.

The examples are given for eth0/eno1, if your main interface have a different name, you'll need to modify it in all of your configurations files.

 

Traffic limitation of your client

In certain cases, some DHCPv6 clients may unfortunately sends several requests per second (especially dchp6c).

This triggers blocking of your servers network port by our automatic protection, as it will be seen as a source of an UDP flood.

To avoid this problem, we invite you to limit the traffic sent from your dhclient6 directly in your firewall configuration.

Following an example for IPTABLES :

ip6tables -A OUTPUT -p udp --dport 547 -m limit --limit 10/min --limit-burst 5 -j ACCEPT
ip6tables -A OUTPUT -p udp --dport 547 -j DROP
Was this answer helpful? 22 Users Found This Useful (22 Votes)