On Wed, Nov 18, 2015 at 11:28:49AM +0100, Jeroen Massar wrote:

> Debian stable 0.7.53.1, I avoid Ubuntu like a plague :)
[...]
> Note that we zero out /etc/sysctl.d/10-ipv6-privacy.conf (empty file
> with just comments) to avoid privacy parameters to be set (Ubuntu
> actually does do that, not sure if Debian does, don't think so though)

Hm, there is no /etc/sysctl.d/10-ipv6-privacy.conf in a default Debian
install.

> 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.

> 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.

> 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. The output of ifup -v eth0 in my Debian stable vm is:

    Configuring interface eth0=eth0 (inet)
    run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
    
    dhclient -v -pf /run/dhclient.eth0.pid -lf 
/var/lib/dhcp/dhclient.eth0.leases eth0  
    Internet Systems Consortium DHCP Client 4.3.1
    Copyright 2004-2014 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/
    
    Listening on LPF/eth0/52:54:00:12:34:56
    Sending on   LPF/eth0/52:54:00:12:34:56
    Sending on   Socket/fallback
    DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
    DHCPREQUEST on eth0 to 255.255.255.255 port 67
    DHCPOFFER from 10.0.2.2
    DHCPACK from 10.0.2.2
    bound to 10.0.2.15 -- renewal in 39089 seconds.
    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
    Configuring interface eth0=eth0 (inet6)
    run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
    modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure.
    
    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
    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,
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.

-- 
Met vriendelijke groet / with kind regards,
      Guus Sliepen <[email protected]>

Attachment: signature.asc
Description: Digital signature

Reply via email to