Debian 10.x/9.x

In order to change the network settings of Debian 10.x, we will need to edit the /etc/network/interfaces file. In this example we will use the following IPv6 subnet: 2a00:7c80:0000:0112::/64. In this example the network interface is named em1.

First open the interfaces file with a text editor of your choosing.

[root@worldstream ~]# nano /etc/network/interfaces

In an /64 IPv6 subnet there are an enormous amount of addresses, we will setup one address as an example. For the correct usage please refer to rfc5952. The IPv6 address we are going to configure is: 2a00:7c80:0000:0112::2. Add the following lines to the bottom of the file:

auto em1
iface em1 inet6 static
address 2a00:7c80:0000:0112::2/64
gateway 2a00:7c80:0000:0112::1

Save the file and close the file. Now we will use the following command to apply the changes to the network configuration.

[root@worldstream ~]# systemctl restart networking

To check if IPv6 is configured correctly you can do a ping6 request to Google’s DNS.

[root@worldstream ~]# ping6 2001:4860:4860::8888

If the IPv6 address is configured correctly, the output should be similar to the below example.

[root@worldstream ~]# ping6 2001:4860:4860::8888
PING 2001:4860:4860::8888(2001:4860:4860::8888) 56 data bytes
64 bytes from 2001:4860:4860::8888: icmp_seq=1 ttl=120 time=1.37 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=2 ttl=120 time=1.55 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=3 ttl=120 time=1.49 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=4 ttl=120 time=1.41 ms

If you are facing any difficulties with setting up an IPv6 address, feel free to send us an email here.

Learn more about our services: worldstream.com