# [RESOLVED] IPv6: network is unreachable

## mno

Hello everyone,

I've been working to add IPv6 support to a server. I have an IPv6 allocation from my uplink, although they use /48 instead of the default /64. I was originally able to have full access to the network (ping6, traceroute6, etc) when I was doing the setup, but today, nothing works, and I cannot determine what is the cause.

First thing's first: ifconfig:

```
eth0      Link encap:Ethernet  HWaddr 00:e0:81:43:93:76

          inet addr:204.15.192.34  Bcast:204.15.192.39  Mask:255.255.255.248

          inet6 addr: fe80::2e0:81ff:fe43:9376/64 Scope:Link

          inet6 addr: 2607:f698:1021::2/48 Scope:Global

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:2077808 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2402890 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:804966743 (767.6 MiB)  TX bytes:2388208815 (2.2 GiB)

          Interrupt:24

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:16436  Metric:1

          RX packets:1347132 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1347132 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:224286841 (213.8 MiB)  TX bytes:224286841 (213.8 MiB)
```

That was basically all I needed to do two days ago to get this whole thing working (add the inet6 address). Yes, IPv6 support is enabled in the kernel.

Then, I started getting a gazillion messages like:

```
Apr 10 13:17:04 lastochka kernel: IPv6 addrconf: prefix with wrong length 48
```

Makes sense, it expects /64 but I only get /48. So Googling for this, I found this site (http://onvox.net/linux/ipv6-addrconf-prefix-with-wrong-length-48) which explained the issue, and suggested I do:

```
echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra

echo 0 > /proc/sys/net/ipv6/conf/eth0/autoconf
```

To get the logging to stop. Undoing this today makes no difference to ping6.

I've read Gentoo IPv6 guide, and also followed the great Linux IPv6 How-to (http://tldp.org/HOWTO/Linux+IPv6-HOWTO/) but no luck so far.

The actual error:

```
lastochka ip6tables # ping6 ipv6.google.com

connect: Network is unreachable
```

For shits and giggles, I tuned off ip6tables, but no luck either.

Any help would be greatly appreciated!

Regards,

Max

----------

## mno

Seems to have been fixed by doing the following steps/mini HOW-TO:

1. Giving /48s get the Linux kernel mad: http://onvox.net/linux/ipv6-addrconf-prefix-with-wrong-length-48 [out of my control, this is an upstream decision]

2. Following advice there, I tell the kernel to not accept_ra: echo 0 >/proc/sys/net/ipv6/conf/eth0/accept_ra (the second step to not accept autoconf seems to be just fine)

3. From this post here: https://forums.gentoo.org/viewtopic-p-6649927.html#6512795 - it seems accept_ra is necessary for ICMP-based network resolution, which used to happen over ARP before

4. ip6tables needs to accept ALL icmp6 messages, not just type 8 as possible with IPv4.

So the resolution:

1. Ensure /proc/sys/net/ipv6/conf/*/accept_ra is 1

2. ACCPET all icmp6 in ip6tables

I can now ping6 and everything again. Hope this helps someone!

----------

