Package: ifupdown
Version: 0.8.10
Severity: normal
Tags: ipv6

I wanted to implement IPv6 in my network, but my debian machine has some issues
with it. The IPv6 connection works just fine when configured statically via the
/etc/network/interfaces file in the following way:

iface bond0 inet6 static
        address 2001:470:71:1234::150
        netmask 64
        gateway 2001:470:71:1234::1

It also works fine when I use the following line instead:

iface bond0 inet6 auto

But there's some issues when I want to use DHCP:

iface bond0 inet6 dhcp

In the last case, there's no default route, and the connection simply doesn't
work.

I tried to configure the network without IPv6 (only IPv4) via the
/etc/network/interfaces file, and then manually start dhclient so it could get
the IPv6 lease. In this case, the routes were added without problems.

I'm using some LXC containers, and I have one bridge interface. Here's the
sysctl configuration:

net.ipv4.ip_forward = 0
net.ipv4.conf.all.forwarding = 0
net.ipv4.conf.default.forwarding = 0
net.ipv4.conf.bond0.forwarding = 1
net.ipv4.conf.br-lxc.forwarding = 1
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.bond0.forwarding = 1
net.ipv6.conf.br-lxc.forwarding = 1

When forwarding is set only in the case of the br-lxc interface, the LXC
containers can't reach the internet. I had to enable forwarding also on the
bond0 interface. I'm not sure whether it's required, but it doesn't work
otherwise. And here's the problem with DHCPv6. When I set "dhcp" in the
/etc/network/interfaces file, and restart the network service, in the log I can
see the following message:

ifup[75305]: /sbin/sysctl -q -e -w net.ipv6.conf.bond0.accept_ra=1

According to the kernel documentation on this sysctl parameter, there's
something like this:

0 Do not accept Router Advertisements.
1 Accept Router Advertisements if forwarding is disabled.
2 Overrule forwarding behaviour. Accept Router Advertisements even if
forwarding is enabled.

I've set this option manually to 2. That's why when I run dhclient manually,
the routes are filled properly. When I try to configure the IPv6 connection via
the /etc/network/interfaces file, ifup changes the value of the bond0.accept_ra
to 1, and the interface can't simply accept RA packets because of forwarding.

So the question is, how to prevent ifup from changing the value of accept_ra
sysctl parameter?



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (130, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ifupdown depends on:
ii  adduser              3.113+nmu3
ii  init-system-helpers  1.28
ii  iproute2             4.3.0-1+b1
ii  libc6                2.21-9
ii  lsb-base             9.20160110

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.3.3-8

Versions of packages ifupdown suggests:
pn  ppp     <none>
pn  rdnssd  <none>

Reply via email to