Turn on and configure IPv6 in Raspberry Pi
The standard Raspbian configuration does not support IPv6. Since IPv6 should be standard and will become more important in the future, it makes sense to turn IPv6 on.
Under Raspbian Jessie, IPv6 is turned on by default. The following tasks are for Raspbian Wheezy.
- Turn on IPv6.
- Check if Raspberry Pi has generated a link-local IPv6 address.
- Check if Raspberry Pi has generated a global IPv6 address.
Solution: Temporarily turn on IPv6 on Raspberry Pi (Raspbian Wheezy)
IPv6 is activated temporarily on Raspberry Pi with the following command:
sudo modprobe ipv6
This will turn on IPv6 and then test it in peace. If there are problems, just restart Raspberry Pi. The temporary setting is lost.
Solution: Turn on IPv6 on Raspberry Pi permanently (Raspbian Wheezy)
So that Raspbian automatically loads the IPv6 module on Raspberry Pi after a restart, you have to insert an additional line into the file “/ etc / modules”.
sudo nano /etc/modules
At the end, add the following line:
Then save and close: Ctrl + O, Return, Ctrl + X.
If you want to make sure that it actually works, you should do a reboot.
Solution: Test IPv6 capability
To check whether IPv6 has been successfully activated, look at the current IP setting.
If here at “eth0” or “enx …” a line with “inet6-address” starts the IPv6 address with “fe80” and has a scope “connection”, then IPv6 is switched on and you can do it in the local network use.
If “eth0” or “enx …” additionally contains a line with “inet6-Adresse” and the scope “Global”, then IPv6-connection into the internet should be possible as well. This can be checked by pinging to a host name that is guaranteed to accept IPv6 connections.
With “Ctrl + C” you can cancel the pings.
If the pings go through successively, then Raspberry Pi is fully IPv6-enabled. If not, then Raspberry Pi is not IPv6-enabled on its way to the Internet, a segment or distribution component.
If there are problems
sudo dmesg | grep -i ipv6
This command outputs all system messages related to IPv6. Eventually the last messages give an indication of the error.
Extension: Activate Privacy Extensions
If you have switched on IPv6 in Raspberry Pi, then all IPv6 addresses are formed from the MAC address (hardware address). Unfortunately, it is always the same, which is why the client or host concerned can be identified by this address. For privacy reasons, that’s a problem.
That’s why with Privacy Extensions for IPv6, there’s an extension that protects privacy. However, this is not always automatically active when IPv6 is switched on or activated.
Extension: set up IPv6 tunnel
As part of an IPv6 introduction, you can also equip Raspberry Pi with a global IPv6 address, if your own provider does not yet. This requires setting up an IPv6 tunnel to a gateway with IPv6 connectivity.