Enable IPv6 in Raspberry Pi with Raspbian

Raspbian comes with IPv6 support but is not enabled by default, so to enable it we need to follow these steps:

Load the IPv6 module:

sudo modprobe ipv6

Add the module to the system boot, this way we don't have to introduce the previous command in every start of our raspberry:

sudo echo "ipv6" >> /etc/modules

We will enable the eth0 port with DHCP; this configuration has a place in the /etc/network/interfaces file:

sudo echo "iface eth0 inet6 dhcp" >> /etc/network/interfaces

Now we only need to reboot for make sure IPv6 is working.

Fixing an issue with NFS and IPv6

Enabling IPv6 on your Raspberry Pi you are fixing the error in message bellow; you don't have to do anything else:

rpcbind: cannot create socket for udp6

rpcbind: cannot create socket for tcp6

Without IPv6

If you don't have enabled IPv6 and you see the previous error you need comment the lines in reference to IPv6 in this file /etc/netconfig:

udp6       tpi_clts      v     inet6    udp     -       -
tcp6       tpi_cots_ord  v     inet6    tcp     -       -

The line commented:

#udp6       tpi_clts      v     inet6    udp     -       -
#tcp6       tpi_cots_ord  v     inet6    tcp     -       -