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 [2019/03/05 10:28]
dedibox [/48 IPv6 prefix]
en:dedicated-server:network:ipv6:prefix [2020/01/16 11:25] (current)
dedibox [Configure the Network on Ubuntu 18.04 with Netplan]
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 +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>​
  
Line 49: Line 52:
  
 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 and 9 ===== ===== Configure the Network on Ubuntu 16 & Debian 8 and 9 =====
Line 54: Line 58:
 <​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>​