Basic IPv6 network configuration for Linux

Today I'll write on how to configure Linux with IPv6. Today we'll go directly to the practice since in an older post I wrote about IPv6 addresses.


Verify if the system has IPv6 enabled

The IPv6 module is integrated since kernel 2.4.x even though it's not always enable.

With this command we can verify if it is or not enable:


If it returns the message "Enable" this means that it's enable (obvious). If not we activate it with the next commands.


For Ubuntu or similars:


And if we want the IPv6 module to be loaded at boot time we add the word ipv6 to the end of this file:



For Fedora or similars

We edit this file:


And we add this line to the file:


Now that we added it we restart the network service.

Also if we want to allow the forwarding of IPv6 packages in our computer we apply these commands and settings.


Enable IPv6 package forwarding

In Ubuntu and similars

We activate the forwarding with this command:


And for enabling forwarding since boot time, we edit this file:


Adding this line:


Then we copy this file to /etc.
And finally we edit this file:


Adding this line:



How to activate it in Fedora and similars

We edit the file:


Adding this line:


Now let's go to configure our interfaces.


Configure IPv6 network on Ubuntu and similars

We'll use as example the IPv6 local-site address FECO::A987:211:22FF:FE33:4455 with a netmask of 64 bits.

We edit the file:


With these lines (using as example the interface eth0):


In this configuration we didn't set a gateway but we can do it writing this setting: gateway6 address.


Configure IPv6 network on Fedora and similars

We edit the file:


Were we substitute eth0 with the interface that we are planning to use.

We edit it with these lines:


We can also add a gateway like this: IPV6_DEFAULTGW=address
Now we have and IPv6 network configuration in our computer.


How to test the connectivity

To test connectivity between computers using IPv6 we use the command ping6:


And ready, now we have a basic IPv6 network configuration. Hope it has helped to the ones that doesn't know and for the ones that already know and needed a refreshment of info.

Comentarios

Entradas populares de este blog

Como calcular permisos de umask

Configuración de un DNS IPv6 local en Linux con Bind

Permisos Unix: Los bits SUID, SGID y sticky