This is an old revision of the document!


/48 IPv6 prefix

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

Installation of the client

You have to install a DHCPv6 client on your server. We recommend the use of Dibbler.

We recommend to use the version 1.0 of Dibbler

On Debian 6/7

The following commands have to be executed as root or using sudo

Start with the download of the client:

wget "http://klub.com.pl/dhcpv6/dibbler/dibbler-1.0.1.tar.gz"

Get the required things to compile the client:

apt-get install build-essential

Extract the archive and compile the client:

tar -xvf dibbler-1.0.1.tar.gz && cd dibbler-1.0.1 && ./configure && make install clean

Make the folders required by the daemon:

mkdir -p /var/lib/dibbler /etc/dibbler

Download and install the file required for the automatic start of the daemon:

wget -O "/etc/init.d/dibbler-client" "http://pastebin.com/raw.php?i=tACkVS32" && chmod 755 /etc/init.d/dibbler-client"

Configure the automatic launch on boot:

update-rc.d dibbler-client defaults

On Debian 8

The following commands have to be executed as root or using sudo

Start with the download of the client:

wget "http://klub.com.pl/dhcpv6/dibbler/dibbler-1.0.1.tar.gz"

Get the required things to compile the client:

apt-get install build-essential

Extract the archive and compile the client:

tar -xvf dibbler-1.0.1.tar.gz && cd dibbler-1.0.1 && ./configure && make install clean

Make the folders required by the daemon:

mkdir -p /var/lib/dibbler /etc/dibbler

To launch dibbler automatically during the boot, create the file /etc/systemd/system/dibbler.service:

[Unit]
Description=Dibbler
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/sbin/dibbler-client start
ExecStop=/usr/local/sbin/dibbler-client stop
PrivateTmp=true
NonBlocking=yes

[Install]
WantedBy=multi-user.target

Reload the systemd configuration:

systemctl daemon-reload

Enable the service:

systemctl enable dibbler.service

Start the service:

systemctl start dibbler.service

On Ubuntu

sudo apt-get install dibbler-client

To stop the client, you have to type:

sudo service dibbler-client stop

On CentOS 6

The following commands have to be run as root or using sudo

Start by downloading the client:

wget "http://klub.com.pl/dhcpv6/dibbler/dibbler-1.0.1.tar.gz"

Install the required tools for the compilation:

yum groupinstall "Development Tools"

Now you have to extract the archive and compile the source code:

tar -xvf dibbler-1.0.1.tar.gz && cd dibbler-1.0.1 && ./configure && make install clean

Create the required folders for the daemon:

mkdir -p /var/lib/dibbler /etc/dibbler

Download and install the file required for the automatic start of the daemon:

wget -O "/etc/init.d/dibbler-client" "http://pastebin.com/raw.php?i=tACkVS32" && chmod 755 "/etc/init.d/dibbler-client"

Finally, prepare the automatic launch on boot:

chkconfig dibbler-client on

Configuration of the client

Create the file that contains your DUID (the equivalent to a virtual MAC) and enter the DUID, which can be found in your account.

nano /var/lib/dibbler/client-duid
Keep your DUID secret, as it is the identfication to recover your block

Create the configuration file:

nano /etc/dibbler/client.conf

The content of the file should be as following:

auth-protocol reconfigure-key
auth-replay monotonic
auth-methods digest-hmac-md5
duid-type duid-ll
inactive-mode
log-level 8
iface eth0 {
    pd
}
Don't forget to configure your firewall and allow UDP connections on port 546
Don't forget to configure an IP address on the interface, as described in "Configuration the client"

Start the dibbler client (to see the debug info for the first time):

dibbler-client run

You should get an output like:

PD: Adding prefix 2a01:e0b:20ab::/48 to all interfaces

Alternative configuration using dhclient

The configuration requires a recent dhclient (at least version 4.1). Here is an example of a dhclient6.conf :

nano /etc/dhcp/dhclient6.conf
interface "eth0" {
   send dhcp6.client-id votre_duid;
}

Launch the dhclient with the following command:

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

Network configuration

Once the dibbler client works properly, you can configure your IPv6 interfaces:

In Debian

nano /etc/network/interfaces

You have to add something like:

iface eth0 inet6 static
    address IPV6ADDRESS
    netmask SIZEOFTHEBLOCK

In CentOS

nano /etc/sysconfig/network-scripts/ifcfg-eth0

You have to add a line like :

IPV6ADDR="IPV6QDDRESS/SIZEOFTHEBLOCK"

Just after IPV6INIT=“yes”


Obviously, the address and block size should be replaced with your own.

If you do not want to restart your server, you can add your IPv6 manually:

/sbin/ifconfig eth0 inet6 add IPV6ADDRESS/SIZEOFTHEBLOCK

If you are using dhclient, you have to add these lines after netmask:

    pre-up dhclient -cf /etc/dhcp/dhclient6.conf -pf /run/dhclient6.eth0.pid -6 -P eth0
    pre-down dhclient -x -pf /run/dhclient6.eth0.pid
    

Test the configuration

To verify that everything is working properly, a simple ping will be enough:

ping6 ipv6.google.com

Debug

If the configuration does not work for you, you can check the name of your interfaces with the following command:

ifconfig -a

The examples given are for eth0. If you main interface is called differently, you will have to change all occurences of this name to the name of your interface.

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

In rescue mode

Pour tester l'IPv6 de votre serveur en mode secours, lancer d'abord la machine en Ubuntu 14, le client dibbler est déjà installer dessus. To test IPv6 on your server in rescue mode, start with booting your server on Ubuntu 14, the dibbler client is already installed on it.

Create the file that contains the DUID (the equivalent to a virtual MAC) and enter the DUID which you can find in your console.

nano /var/lib/dibbler/client-duid

Now you have to modify the file:

nano /etc/dibbler/client.conf

You should edit it, so it looks like this:

auth-protocol reconfigure-key
auth-replay monotonic
auth-methods digest-hmac-md5
duid-type duid-ll
inactive-mode
log-level 8
iface eth0 {
    pd
}

Dibbler is now configured, you will have to add an IP address to your interface using the following command:

/sbin/ifconfig eth0 inet6 add IPV6ADDRESSE/BLOCKSIZE

In a last step you have to start your dibbler client:

dibbler-client run

Test de l'IPv6:

ping6 ipv6.google.com