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
Last revision Both sides next revision
en:dedicated-server:network:ipv6:prefix [2018/06/06 15:29]
dedibox u
en:dedicated-server:network:ipv6:prefix [2020/04/22 15:22]
dedibox [Start your DHCPv6 client at boot]
Line 11: Line 11:
 If you have not yet ordered your block yet, you can [[en:​dedicated-server:​network:​ipv6:​start|do it now from the management console]]. 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>​If your server ​is compatible with IPv6 SLAAC, ​it will be required to activate it to use the IPv6 prefix. ​[[en:​dedicated-server:​network:​ipv6:​slaac|IPv6 SLAAC]]</​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 disabled, a server will not be able to learn its IPv6 default route.</​note>​ 
-<note important>​Because of known bug in Dibbler, we don't recommend ​this client anymore.</​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 20: 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 ''<​nowiki>​SystemD</​nowiki>''​ 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 (''​eno0''​) 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 +After=network-online.target 
-Before=network.target+Wants=network-online.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>​
  
Line 50: Line 53:
 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 et 9 =====+ 
 +===== 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>​
  
-Start by editing ''/​etc/​network/​interfaces''​ as follow:+Start by editing ''/​etc/​network/​interfaces''​ as follows:
 <​code>​ <​code>​
 auto eno1 auto eno1
 iface eno1 inet6 static iface eno1 inet6 static
     address IPV6ADDRESS     address IPV6ADDRESS
-    netmask ​PREFIXLEN+    netmask ​PREFIXLENGTH
 </​code>​ </​code>​
  
Line 148: Line 152:
 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 157: Line 161:
  
 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>​