ENETUNREACH networking ipv6 ai_generated true

connect: Network is unreachable (IPv6 address fe80::1, ENETUNREACH)

ID: networking/ipv6-connectivity-error

Also available as: JSON · Markdown
83%Fix Rate
85%Confidence
40Evidence
2023-06-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
any active

Root Cause

The system has IPv6 addresses configured but lacks proper IPv6 connectivity. Applications resolving AAAA records try IPv6 first and fail before falling back to IPv4. This is common in dual-stack environments where IPv6 is auto-configured but the upstream network does not provide IPv6 routing.

generic

Workarounds

  1. 88% success Configure Happy Eyeballs (RFC 8305) to prefer IPv4 when IPv6 is broken
    1. Most modern applications use Happy Eyeballs by default — verify it is not disabled
    2. In curl: --happy-eyeballs-timeout-ms 300
    3. In /etc/gai.conf, set precedence for IPv4: precedence ::ffff:0:0/96 100
    4. This allows applications to quickly fall back to IPv4 when IPv6 fails
    5. Test: curl -v https://example.com — should show the fallback in verbose output
  2. 85% success Fix the IPv6 connectivity by configuring proper routing
    1. Check IPv6 addresses: ip -6 addr show
    2. Check IPv6 routes: ip -6 route show
    3. If using SLAAC, verify Router Advertisements are being received: rdisc6 eth0
    4. If using DHCPv6, check dhclient logs: journalctl -u dhclient | grep -i ipv6
    5. Verify upstream IPv6 connectivity: ping6 2001:4860:4860::8888
    6. If behind NAT66, verify the NAT rules forward IPv6 properly
    7. Test end-to-end: curl -6 https://ipv6.google.com

Dead Ends

Common approaches that don't work:

  1. Disable IPv6 system-wide to avoid the error 60% fail

    Disabling IPv6 entirely breaks IPv6-only services, container networking that relies on IPv6, and some localhost communication. It is a heavy-handed workaround that causes other issues.

  2. Add a static IPv6 default route without verifying upstream connectivity 75% fail

    A static route pointing to a gateway that does not forward IPv6 traffic results in packets being sent but never reaching the destination. The error changes from 'no route' to a timeout, which is harder to diagnose.

Error Chain

Leads to:
Preceded by:
Frequently confused with: