When you request IPv6 range for your server at online.net, support will give you DUID. Record it and keep it safe: it's your key to get IPv6 connectivity.
To get connectivity actually working, you need to request IPv6 prefix delegation via DHCPv6. Xenial Xerus has almost all parts in place, but one tweak is still necessary. Xenial's version of ifupdown
has no capability to run dhclient
with -P
option that is necessary to request prefix delegation from the router.
ifupdown
packageLuckily, yakkety's version of ifupdown
has this capability, and can be installed cleanly on xenial. Get the package from here (or any mirror):
http://security.ubuntu.com/ubuntu/pool/main/i/ifupdown/
At the time of this writing, 2016-09-01, the latest version is:
ifupdown_0.8.13ubuntu1_amd64.deb
Install it, after installation you should see this:
# ifup --version
ifup version 0.8.13ubuntu1
You can reboot to check that everyting still works honky dory.
Now, the configuration part. You need to modify two files: /etc/network/interfaces and /etc/dhcp/dhclient.conf. Let us assume that the name of the Ethernet interface is em1
.
/etc/dhcp/dhclient.conf
In the file /etc/dhcp/dhclient.conf, add the following statement:
send dhcp6.client-id <DUID-that-support-has-given-you>;
or if you have more that one interface (e.g. you run some virtual networks),
interface em1 {
send dhcp6.client-id <DUID-that-support-has-given-you>;
};
/etc/network/interfaces
Now, your /etc/network/interfaces file initially looks like this:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto em1
iface em1 inet dhcp
You need to add another, IPv6 specific, entry for em1
:
iface em1 inet6 dhcp
autoconf 0
request_prefix 1
(autoconf 0
is optional).
Now restart the networking
unit:
systemctl restart networking
Now if you look at the process list, you will see two instances of dhclient
running:
# ps ax|grep dhclient
2404 ? Ss 0:00 /sbin/dhclient -1 -v -pf /run/dhclient.em1.pid -lf /var/lib/dhcp/dhclient.em1.leases -I -df /var/lib/dhcp/dhclient6.em1.leases em1
2489 ? Ss 0:00 /sbin/dhclient -1 -6 -pf /run/dhclient6.em1.pid -lf /var/lib/dhcp/dhclient6.em1.leases -I -P -N -df /var/lib/dhcp/dhclient.em1.leases em1
3131 pts/0 S+ 0:00 grep --color=auto dhclient
The important part here is that the -6
instance is launced with -P
and -N
options. Shortly, you should get a public address on the em1
interface, and be able to ping6 ipv6.google.com
. Reboot once again to verify that everyting gets configured properly on boot.
That is all.
Eugene Crosser <crosser at average dot org>