Hi. I'm trying to set up ipv6 on my raspberry pi, I can ping the ::2 address but no other ipv6 address. I'm using the Linux-net-tools command template from "Example Configurations", because the Debian one resulted in eth0 not getting its normal DHCP address (it's behind a router that always gives it 10.1.1.3). Here's my ifconfig output:
blha303@raspberrypi ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:f5:bb:f7
inet addr:10.1.1.3 Bcast:10.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fef5:bbf7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5213 errors:0 dropped:0 overruns:0 frame:0
TX packets:2940 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:808049 (789.1 KiB) TX bytes:393144 (383.9 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1520 (1.4 KiB) TX bytes:1520 (1.4 KiB)
sit0 Link encap:IPv6-in-IPv4
inet6 addr: ::10.1.1.3/96 Scope:Compat
inet6 addr: ::127.0.0.1/96 Scope:Unknown
UP RUNNING NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
sit1 Link encap:IPv6-in-IPv4
inet6 addr: fe80::a01:103/64 Scope:Link
inet6 addr: 2001:470:35:1d0::2/64 Scope:Global
UP POINTOPOINT RUNNING NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:2184 (2.1 KiB)
And troubleshooting:
blha303@raspberrypi ~ $ ping6 2001:470:35:1d0::1
PING 2001:470:35:1d0::1(2001:470:35:1d0::1) 56 data bytes
^C
--- 2001:470:35:1d0::1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3002ms
blha303@raspberrypi ~ $ ping 216.218.221.42
PING 216.218.221.42 (216.218.221.42) 56(84) bytes of data.
64 bytes from 216.218.221.42: icmp_req=1 ttl=59 time=236 ms
^C
--- 216.218.221.42 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 236.238/236.238/236.238/0.000 ms
blha303@raspberrypi ~ $ ping6 2001:470:35:1d0::2
PING 2001:470:35:1d0::2(2001:470:35:1d0::2) 56 data bytes
64 bytes from 2001:470:35:1d0::2: icmp_seq=1 ttl=64 time=0.331 ms
64 bytes from 2001:470:35:1d0::2: icmp_seq=2 ttl=64 time=0.202 ms
^C
--- 2001:470:35:1d0::2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.202/0.266/0.331/0.066 ms
blha303@raspberrypi ~ $ ping6 www.arin.net
PING www.arin.net(www.arin.net) 56 data bytes
^C
--- www.arin.net ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6004ms
blha303@raspberrypi ~ $ ip -6 route sh
::/96 dev sit0 metric 256
2001:470:35:1d0::/64 dev sit1 proto kernel metric 256
fe80::/64 dev eth0 proto kernel metric 256
default dev sit1 metric 1
Any help is greatly appreciated :)
Have you enabled IPv6 forwarding? Check with
sysctlroot@rpitunnel:~# sysctl net.ipv6.conf.all.forwarding
net.ipv6.conf.all.forwarding = 1
If it says "= 0" then it's off (which is the default). Enable it like so:
root@rpitunnel:~# sysctl net.ipv6.conf.all.forwarding=1
net.ipv6.conf.all.forwarding = 1
Also, on my RPi, I have to set this setting every time. I edited the file /etc/sysctl.conf and uncommented the line with it in so it looks like this:
# Uncomment the next line to enable packet forwarding for IPv6
# Enabling this option disables Stateless Address Autoconfiguration
# based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1
At the bottom of my /etc/network/interfaces file I have the following line:
up sysctl -p
This enables forwarding every time the network devices are brought up. I follow it up with...
up service radvd start
...to ensure that everything works nicely.
Other problems I had with setting up my tunnel with radvd on my RPi:
- Other devices on the network couldn't access the tunnel until I manually set an IPv6 address for eth0 from the /48 allocation from HE
- radvd wouldn't automatically start due to the setting for net.ipv6.conf.all.forwarding not staying between reboots
If you have any more issues or this doesn't solve the problem, let me know. I've spent the best part of the past 2 days getting my RPi set up to do automagic tunnelling for LAN. It even has SmokePing and ntop providing some lovely graphs and statistics!