[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Losing IPv6 connectivity after 20min, why?



On Mon, Sep 19, 2016 at 12:55:11PM +0200, Olaf Schreck wrote:
> My hoster (Hetzner) routes the 2a01:4f8:191:XXXX:/64 network to the 
> server.  Following their instructions, I assign a static address from that 
> block and set the default route to fe80::1, either manually 
>  ip -6 addr add 2a01:4f8:191:XXXX::5/64 dev eth0
>  ip -6 route add default via fe80::1 dev eth0
> 
> or in /etc/network/interfaces like this
>  iface eth0 inet6 static
>   address 2a01:4f8:191:XXXX::5
>   netmask 64
>   gateway fe80::1
> 
> This works, I can ping6.  But it reproducible stops working after 20min, 
> confirmed using this command
>  while true; do date; ping6 -c3 -w5 www.google.com; sleep 10; done

Check ip neigh output. Does the entry for your default gateway go
STALE after those 20 minutes?

Also check the lifetime of any SLAAC ip addresses given in ip addr
output.

> I'm sure it's not Google rate-limiting my pings, I get the same results with 
> various IPv6 addresses that I'm authorized to ping.

fyi, google does not rate-limit pings against 8.8.8.8, 8.8.4.4 and
their IPv6 counterparts which I simply cannot memorize.

> To restore IPv4 connectivity (IPv4 still working), I can either reboot or 
> re-add the default route with these commands (order is important):
>  ip -6 route del default
>  ip -6 route del fe80::1 dev eth0
>  ip -6 route add fe80::1 dev eth0
>  ip -6 route add default via fe80::1 dev eth0

Do you really need to meddle with the fe80::1 route? Do you really
need an explicit route for fe80::1%eth0? Will it work without?

Does adding a route for 2000/3 via fe80::1 dev eth0 help, or is it
really necessary to remove the default route and to re-add it?

> Important data point: This server has 2 ethernet interfaces, so there are 
> 2 link-local fe80::/64 routes to eth0 and eth1.  I was suspicious that the 
> problem might be related, so I disabled IPv6 on the second interface 
> completely with with sysctl net.ipv6.conf.eth1.disable_ipv6 = 1.

No need, an fe80::/64 IP address is only valid when an interface is
added:

[2/501]mh@parada:~$ ping6 fe80::1
connect: Invalid argument
[3/502]mh@parada:~$ ping6 fe80::1%eth0
PING fe80::1%eth0(fe80::1) 56 data bytes
64 bytes from fe80::1: icmp_seq=1 ttl=64 time=2.25 ms
^C
--- fe80::1%eth0 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.252/2.252/2.252/0.000 ms
[4/503]mh@parada:~$

Same reason why I think that your explicit fe80::1 route is unnecessary.

> And that resulted in stable and flawless IPv6 connectivity!

Is the other interface connected? eth1 should not play a role here at
all.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: