Adding IPv6 connectivity to your LINUX server

With the recent deployment of IPv6 in our data centre network, newly installed servers should be configured with an IPv6 address out of the box. For existing installations that you do not want to reinstall or colocation devices not installed with our operating system deployment solution, the necessary information needs to be added to your system manually. This guide should give you enough information to get IPv6 up and running on your server.

Obtaining the necessary information

At this time, the following additional information is valid for every IPv6 enabled server:

netmask / prefix length: 64
gateway address: fe80::1

For servers with a /64 network starting with "2a02:c205", please use the following IP addresses as resolving name servers:

Resolver/DNS server 1: 2a02:c205::1:53
Resolver/DNS server 1: 2a02:c205::2:53

For servers with a /64 network starting with "2a02:c207", please use the following IP addresses as resolving name servers:

Resolver/DNS server 1: 2a02:c207::1:53
Resolver/DNS server 1: 2a02:c207::2:53

Initial configuration (Linux-based operating systems)

Before adding this IPv6 address to your configuration files and thus making the changes persist after a server reboot, you might want to configure it manually. I will use the IPv6 address 2001:db8::1 in this example. Please replace it with the appropriate address assigned to the server in question. If your network card is not eth0, you will have to replace "eth0" with the appropriate value, too.

Add the address to the server's network interface in the format /:

ip addr add 2001:db8::1/64 dev eth0

You can validate that the address has been enabled by running

ip -6 addr show

which should show, among others, the following lines:

2: eth0: mtu 1500 qlen 1000
inet6 2001:db8::1/64 scope global valid_lft forever preferred_lft forever

In order to reach everyone else in the ever growing IPv6 world, add a default route to the server's configuration:

ip route add default via fe80::1 dev eth0

Again, you can verify the setting by running

ip -6 route show

which should show the following output:

default via fe80::1 dev eth0 metric 1024 mtu 1500 advmss 1440 hoplimit 4294967295

You can now check your IPv6 connectivity by using the ping6 command:

ping6 2a02:c205:0:5001::1

Making things persist (Linux-based operating systems)

Different operating systems have different ways of setting up the network configuration. If in doubt, please search the documentation for your operating system. Sample configurations for Debian/Ubuntu and CentOS/Fedora/RedHat will be provided here. Please be very careful when applying these changes. Errors may result in your server no longer responding to any network traffic at all!

 

CentOS / Fedora / RedHat

Make sure IPv6 networking is enabled at all by editing /etc/sysconfig/network. Add the following line to this file:

NETWORKING_IPV6=yes

Then add the IP configuration to the file /etc/sysconfig/network-scripts/ifcfg-eth0

IPV6INIT=yes
IPV6ADDR=2001:db8::1/64
IPV6_DEFAULTGW=fe80::1
IPV6_DEFAULTDEV=eth0

This should make sure the IPv6 address gets enabled again after your server reboots.

Still cannot reach your server via IPv6?

If you have made the changes as described above and if the ping6 command did return a response but you nevertheless cannot reach your server via IPv6 from your local computer, chances are that IPv6 might not yet be enabled in your local network. Your local ISP can help in this case.

  • 0 Users Found This Useful
Was this answer helpful?