On 2015-11-18 13:54, Guus Sliepen wrote:
[..]
>> 8<-----------------
>> $ cat /etc/sysctl.d/99-custom.conf
>> # Disable Accept of Router Advertisements
>> net.ipv6.conf.all.accept_ra=0
>> net.ipv6.conf.default.accept_ra=0
>>
>> # Make sure that privacy addresses are disabled
>> net.ipv6.conf.default.use_tempaddr=0
>> net.ipv6.conf.all.use_tempaddr=0
>> ----------------->8
> 
> Ok, tried it with and without these settings, but on a fresh install
> setting the IPv6 address, netmask and gateway just works as expected,
> both on Debian stable and unstable.

Did you try at-boot or post-boot?

>> That might thus be a kernel annoyance, thus just in case on that box the
>> version of that:
>>
>>  linux-image-3.16.0-4-686-pae  3.16.7-ckt11-1+deb8u6         i386
> 
> I have the exact same version. Well, running on amd64, but I would think
> that this is not a 32 vs. 64 bits issue.

I don't expect any issues there either.

>> hmmmmm you are not toggling use_tempaddr I hope as that would cause
>> default route to be cleared by the kernel (some kernels do that, others
>> do not btw...)?
>>
>> Indeed using the accept_ra etc settings in /etc/network/interfaces would
>> be a good thing, but the current sysctl method has worked for a long
>> long time already and a static config should just work like that.
> 
> Actually, even if you don't explicitly specify accept_ra in /e/n/i, ifup
> will set accept_ra and autoconf to 0 before configuring the IPv6 part of
> the interface.

Before should be good as then the reset behavior of some version of the
kernel don't happen. When was that behavior (setting accept_ra)
introduced btw?

> The output of ifup -v eth0 in my Debian stable vm is:

Try it at boot. sysctl, especially with systemd, might mess up the order
of things... doing DHCP also delays things btw.

>     modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure.

Why is it still modprobing this, Debian has been IPv6 enabling kernels
per default since.... long time ago, this thus would only affect people
who built their own kernels with IPv6 as a module (is that still
possible?), and then those folks will know that they need /etc/modules
when the interface configuration fails.

It does not hurt though, thus fine to keep it there.

>     sysctl -q -e -w net.ipv6.conf.eth0.accept_ra=0
>     sysctl -q -e -w net.ipv6.conf.eth0.autoconf=0
>     ip link set dev eth0   up

The interface should already be up because of DHCP (or otherwise static
config)

>     ip -6 addr add 2001:db8:ff:1234::42/64  dev eth0 
>      ip -6 route add default via 2001:db8:ff:1234::1 dev eth0 
>     /lib/ifupdown/settle-dad.sh
>     Waiting for DAD... Done
>     run-parts --exit-on-error --verbose /etc/network/if-up.d
>     run-parts: executing /etc/network/if-up.d/mountnfs
>     run-parts: executing /etc/network/if-up.d/upstart
>     
> So the problem is elsewhere, I think. Or maybe you have more interfaces,

No interfaces are there at boot. Just good old loopback and eth0.

> and something might interfere with the default gateway set by a previous
> one? Maybe you should try running ifdown -a; ifup -v -a; yourself and
> see what the output is? You can send me a copy as well if you want.

Doing ifdown/ifup works after boot....

I think a systemd/sysv kind of race might be involved actually.

That specific box did not switch to systemd yet (just has the lib
packages), and still is using sysv-rc.

Greets,
 Jeroen

Reply via email to