Debian / IPv6: Default route expires after 1800 secs, loosing connectivity

It looks like i missed that net.ipv6.conf.default.autoconf was set to 1. Adding a file in /etc/sysctl.d to suppress this at boot solved the problem for me:

root@wopr:~# cat /etc/sysctl.d/ipv6.conf
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.default.autoconf=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.eth0.accept_ra=0
net.ipv6.conf.eth0.autoconf=0

Now i get a defaualt route that won't expire at boot time. Problem solved. Thanks for pointing me in the right direction, Sander.


1800 seconds sounds like a default timeout for a Router Advertisement.

My first guess would be that there is a Cisco router on the network that is configured with ipv6 nd ra suppress on the interface. In that mode the router will send out an RA when a host requests one with an RS, but doesn't refresh it regularly. A host sends an RS when bringing up the interface, which would explain why it gets a default route after boot.

That setting is a weird useless Cisco setting. A router should either send RAs when asked + regularly (the default on Cisco), or not at all (ipv6 nd ra suppress all). The half-way setting ipv6 nd ra suppress causes weird behaviour like this and should not be used.