Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:dedicated-server:network:ipv6:prefix [2016/07/20 11:32]
dedibox [In Rescue mode]
en:dedicated-server:network:ipv6:prefix [2019/12/19 15:45] (current)
dedibox [Start your DHCPv6 client at boot]
Line 1: Line 1:
 ======= /48 IPv6 prefix ======= ======= /48 IPv6 prefix =======
 +
 +<note tip> ​
 +**Requirements:​**
 +  * You have an account at [[https://​console.online.net|console.online.net]]\\
 +  * You have a [[https://​www.online.net/​fr/​serveur-dedie|Dedibox]] dedicated server
 +</​note>​
 +
  
 Each customer can request a /48 IPv6 prefix for free. Each customer can request a /48 IPv6 prefix for free.
-If you have not yet ordered your block yet, you can [[en:​dedicated-server:​network:​ipv6:​start|do it now]].+If you have not yet ordered your block yet, you can [[en:​dedicated-server:​network:​ipv6:​start|do it now from the management console]].
  
-<note important>​Because of known bug in Dibblerwe don't recommend ​this client anymore.</​note>​+<note important>​On servers supporting [[en:​dedicated-server:​network:​ipv6:​slaac|IPv6 SLAAC]], [[en:​dedicated-server:​network:​ipv6:​slaac#​activation|SLAAC has to be enabled]] ​in order to ensure that DHCPv6 works correctly. If disableda server will not be able to learn its IPv6 default route.</​note>​ 
 +<note important>​We ​don't recommend ​to use the dibbler ​client anymore, as there is a known bug with it.</​note>​
  
 ====== How to configure the DHCPv6 client ====== ====== How to configure the DHCPv6 client ======
Line 12: Line 20:
 You'll need to edit the following file ''/​etc/​dhcp/​dhclient6.conf''​ : You'll need to edit the following file ''/​etc/​dhcp/​dhclient6.conf''​ :
 <​code>​ <​code>​
-interface "eth0" {+interface "eno1" {
    send dhcp6.client-id DUID;    send dhcp6.client-id DUID;
 } }
 </​code>​ </​code>​
  
-You will have to adapt the interface name (''​eth0''​) and the ''​DUID'',​ [[https://​console.online.net/​fr/​network/​|available in your console]].+You will have to adapt the interface name (''​eno1''​) and the ''​DUID'',​ [[https://​console.online.net/​fr/​network/​|available in your console]].
 ===== Start your DHCPv6 client at boot ===== ===== Start your DHCPv6 client at boot =====
  
-Once the client is configured, you'll need to create a new ''​SystemD''​ service.+Once the client is configured, you'll need to create a new ''​<​nowiki>​SystemD</​nowiki>​''​ service.
  
-Create the following file, adapting the interface name (''​eth0''​) and the DUID ''/​etc/​systemd/​system/​dhclient.service'':​+Create the following file, adapting the interface name (''​eno1''​) and the DUID ''/​etc/​systemd/​system/​dhclient.service'':​
  
 <​code>​ <​code>​
 [Unit] [Unit]
 Description=dhclient for sending DUID IPv6 Description=dhclient for sending DUID IPv6
-Wants=network.target +Before=network-pre.target 
-Before=network.target+Wants=network-pre.target
  
 [Service] [Service]
 +Restart=always
 +RestartSec=10
 Type=forking Type=forking
-ExecStart=/usr/​sbin/​dhclient -cf /​etc/​dhcp/​dhclient6.conf -6 -P -v eth0+ExecStart=/​sbin/​dhclient -cf /​etc/​dhcp/​dhclient6.conf -6 -P -v eno1 
 +ExecStop=/​sbin/​dhclient -x -pf /​var/​run/​dhclient6.pid
  
 [Install] [Install]
-WantedBy=multi-user.target+WantedBy=network.target
 </​code>​ </​code>​
 +
 +<​note>''​dhclient'''​s path may vary depending on your OS. To know the exact path, use the following command: ''​which dhclient''</​note>​
  
 Then, enable it for every reboot: ''​systemctl enable dhclient.service''​. Then, enable it for every reboot: ''​systemctl enable dhclient.service''​.
  
-===== Configure the Network on Ubuntu 16 & Debian 8 =====+===== Configure the Network on Ubuntu 16 & Debian 8 and 9 =====
  
 <​note>​The following commands have to be used as root or with ''​sudo''</​note>​ <​note>​The following commands have to be used as root or with ''​sudo''</​note>​
Line 46: Line 59:
 Start by editing ''/​etc/​network/​interfaces''​ as follow: Start by editing ''/​etc/​network/​interfaces''​ as follow:
 <​code>​ <​code>​
 +auto eno1
 iface eno1 inet6 static iface eno1 inet6 static
     address IPV6ADDRESS     address IPV6ADDRESS
Line 54: Line 68:
 With Debian & old versions of Ubuntu, it's usually ''​eth0''​. With Debian & old versions of Ubuntu, it's usually ''​eth0''​.
  
 +<note tip>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.</​note>​
 ==== Alternate configuration without SystemD==== ==== Alternate configuration without SystemD====
  
-If you don't use ''​SystemD''​ to start your services, you can configure your ''/​etc/​network/​interfaces''​ as follow:+If you don't use ''​<​nowiki>​SystemD</​nowiki>​''​ to start your services, you can configure your ''/​etc/​network/​interfaces''​ as follow:
 <​code>​ <​code>​
 iface eno1 inet6 static iface eno1 inet6 static
Line 71: Line 86:
 <​note>​The following commands have to be used as root or with ''​sudo''</​note>​ <​note>​The following commands have to be used as root or with ''​sudo''</​note>​
  
-After configuring your ''​dhclient''​ and ''​SystemD'',​ you'll need to edit ''/​etc/​sysconfig/​network-scripts/​ifcfg-eth0'':​+After configuring your ''​dhclient''​ and ''​<​nowiki>​SystemD</​nowiki>​'',​ you'll need to edit ''/​etc/​sysconfig/​network-scripts/​ifcfg-eth0'':​
 <​code>​ <​code>​
 # Generated by parse-kickstart # Generated by parse-kickstart
Line 136: Line 151:
 To test the IPv6  on your server in rescue mode, reboot the server in rescue mode with the "​Ubuntu 14 - Trusty"​ mode. The ''​dhclient''​ is already available on it. To test the IPv6  on your server in rescue mode, reboot the server in rescue mode with the "​Ubuntu 14 - Trusty"​ mode. The ''​dhclient''​ is already available on it.
  
-Create the file which will contain your DUID with the help of the [[#configurer_le_client_dhcpv6|above documentation]].+Create the file which will contain your DUID with the help of the [[#how_to_configure_the_dhcpv6_client|documentation ​above]].
 You can find your DUID in [[https://​console.online.net/​fr/​network/​|your console]]. You can find your DUID in [[https://​console.online.net/​fr/​network/​|your console]].
  
Line 145: Line 160:
  
 After, add the IPv6 address to your network interface: After, add the IPv6 address to your network interface:
-<​code>/​sbin/​ifconfig <​interface>​ inet6 add IPV6ADDRESS/​PREFIXLENGH</​code>​+<​code>/​sbin/​ifconfig <​interface>​ inet6 add IPV6ADDRESS/​PREFIXLENGTH</​code>​
  
 Then you can try to ping6: Then you can try to ping6:
 <​code>​ping6 ipv6.google.com</​code>​ <​code>​ping6 ipv6.google.com</​code>​