When dealing with IPv6 connectivity issues, the "Destination unreachable: Address unreachable" error typically indicates a routing or neighbor discovery problem. In this case, we can observe several key symptoms:
$ ping6 2001:4860:4860:8888
PING 2001:4860:4860:8888(2001:4860:4860:8888) 56 data bytes
From 2a01:4f8:202:43d5::2 icmp_seq=1 Destination unreachable: Address unreachable
$ ip neigh show
fe80::1 dev eth0 FAILED
The current IPv6 setup shows some interesting configurations:
$ ip -6 a
1: lo: mtu 65536
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qlen 1000
inet6 2a01:4f8:202:43d5::2/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::468a:5bff:fe2c:3d6a/64 scope link
valid_lft forever preferred_lft forever
$ ip -6 route
2a01:4f8:202:43d5::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::1 dev eth0 metric 2 pref medium
The primary issue here stems from two main problems:
- The default IPv6 gateway is configured using a link-local address (fe80::1) which isn't reachable
- The neighbor cache shows the gateway as FAILED, indicating NDP (Neighbor Discovery Protocol) issues
Solution 1: Verify Gateway Connectivity
First, check if the gateway actually exists on the link:
$ ping6 -c 4 -I eth0 fe80::1
$ ip -6 neigh show dev eth0
Solution 2: Update the Default Route
If possible, use a global address for the default route instead of link-local:
$ ip -6 route del default
$ ip -6 route add default via 2a01:4f8:202:43d5::1 dev eth0
Solution 3: Force NDP Resolution
Sometimes forcing neighbor discovery can help:
$ ping6 -c 1 -I eth0 fe80::1
$ sudo ndisc6 -1 fe80::1 eth0
For more persistent issues, consider these advanced checks:
# Check IPv6 forwarding
$ sysctl net.ipv6.conf.all.forwarding
# Verify RA (Router Advertisement) settings
$ rdisc6 eth0
# Check firewall rules
$ ip6tables -L -v -n
# Test with different MTU sizes
$ ping6 -s 1472 -M do 2001:4860:4860::8888
Here's what a working configuration might look like:
# Interface configuration
auto eth0
iface eth0 inet6 static
address 2a01:4f8:202:43d5::2
netmask 64
gateway 2a01:4f8:202:43d5::1
up /sbin/ip -6 addr add fe80::468a:5bff:fe2c:3d6a/64 dev eth0
# Route configuration
ip -6 route add 2a01:4f8:202:43d5::/64 dev eth0
ip -6 route add default via 2a01:4f8:202:43d5::1
$ ping6 2001:4860:4860:8888
PING 2001:4860:4860:8888(2001:4860:4860:8888) 56 data bytes
From 2a01:4f8:202:43d5::2 icmp_seq=1 Destination unreachable: Address unreachable
$ ip neigh show
fe80::1 dev eth0 FAILED
Let's examine the existing IPv6 setup:
$ ip -6 a
1: lo: mtu 65536
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qlen 1000
inet6 2a01:4f8:202:43d5::2/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::468a:5bff:fe2c:3d6a/64 scope link
valid_lft forever preferred_lft forever
$ ip -6 route
2a01:4f8:202:43d5::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::1 dev eth0 metric 2 pref medium
The key issues here are:
1. Failed neighbor discovery for fe80::1 (gateway)
2. Default route configured via link-local address (fe80::1)
3. No connectivity to global IPv6 addresses
1. Verify Physical Connectivity
$ ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 1000baseT/Full
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
Link detected: yes
2. Check IPv6 Forwarding Status
$ sysctl net.ipv6.conf.all.forwarding
net.ipv6.conf.all.forwarding = 0
3. Update Default Gateway Configuration
Instead of using link-local address, configure global address as gateway:
$ ip -6 route del default via fe80::1 dev eth0
$ ip -6 route add default via 2a01:4f8:202:43d5::1 dev eth0
4. Verify Neighbor Discovery
$ ping6 -I eth0 2a01:4f8:202:43d5::1
PING 2a01:4f8:202:43d5::1(2a01:4f8:202:43d5::1) from 2a01:4f8:202:43d5::2 eth0: 56 data bytes
64 bytes from 2a01:4f8:202:43d5::1: icmp_seq=1 ttl=64 time=0.342 ms
5. Test External Connectivity
$ ping6 2001:4860:4860::8888
PING 2001:4860:4860::8888(2001:4860:4860::8888) 56 data bytes
64 bytes from 2001:4860:4860::8888: icmp_seq=1 ttl=119 time=12.4 ms
For persistent configuration, add these lines to /etc/network/interfaces:
iface eth0 inet6 static
address 2a01:4f8:202:43d5::2
netmask 64
gateway 2a01:4f8:202:43d5::1
up /sbin/sysctl -w net.ipv6.conf.all.forwarding=1
$ traceroute6 google.com
$ ip -6 route get 2001:4860:4860::8888
$ tcpdump -i eth0 ip6 -vv