IPv6 on Raspberry Pi

Submitted by George Moses on Wed, 2013-12-11 09:17

Strangely enough, IPv6 is not enabled by default on the Raspbian distro on a Raspberry Pi. Fortunately, it is quickly enabled by the following commands:

$ sudo modprobe ipv6

Raspberry Pi IPv6 at boot time

To make the setting persistant across reboots, you can use:

$ sudo /bin/bash
$ echo ivp6 >> /etc/modules

After this, just reboot your Pi to test the IPv6 connectivity.

Raspberry Pi IPv6 privacy extensions

Enabling privacy extensions for IPv6 on the Pi is done by:

$ sudo /bin/bash
$ echo "net.ipv6.conf.eth0.use_tempaddr = 2" >> /etc/sysctl.conf
$ echo "net.ipv6.conf.eth0.temp_prefered_lft = 7200" >> /etc/sysctl.conf

After rebooting, your Pi will use a temporary (random) address each time it is rebooted. With the above setting it should refresh the temporary IPv6 address every 7200 seconds (2 hours).

I have tested the above settings and found them working with the 2013-02-09-wheezy-raspbian distro. The most recent Raspbian distro can be found at: http://www.raspberrypi.org/downloads.