Bug#837759: network configuration stops working reliably

Wolfgang Walter wolfgang.walter at stwm.de
Wed Sep 14 16:56:15 BST 2016


Am Mittwoch, 14. September 2016, 10:00:28 schrieben Sie:

> Control: tags -1 moreinfo
> 
> On 14 September 2016 at 06:59, Wolfgang Walter <wolfgang.walter at stwm.de> 
wrote:

> > Package: systemd
> > Version: 231-6
> > Severity: grave
> > 
> > Starting with version 231-6 the configuration of network interfaces stops
> > working reliably when rebooting a system. Downgrading to 231-5 fixes the
> > problem.
> > 
> > Symptoms: If a network interface is configured using
> > /etc/network/interfaces it seems that systemd now sometimes removes the
> > configured ip4 and/or ipv6 addresses in the boot process. It also seems
> > to remove routes of network interfaces configured manually or with
> > /etc/network/interfaces if the link state changes.
> > 
> > This seems not only be the case with interfaces configured via
> > /etc/network/ interfaces but with any interface one creates and assigns
> > ip addresses manually.
> > 
> > I tested this with a script:
> > 
> > #!/bin/sh
> > if [ "$1" = start ]; then
> > ip link del TEST >/dev/null 2>&1 || true
> > ip link add name TEST type dummy
> > ip -b - <<"EOF"
> > link set TEST up
> > addr add 10.10.10.10/32 dev TEST nodad
> > addr add 2a01:1:1:1::1/128 dev TEST nodad
> > addr add 2a01:1:1:1::2/128 dev TEST nodad
> > addr add 2a01:1:1:1::3/128 dev TEST nodad
> > addr add 2a01:1:1:1::4/128 dev TEST nodad
> > addr add 2a01:1:1:1::5/128 dev TEST nodad
> > EOF
> > ip addr ls TEST
> > sleep 2
> > elif [ "$1" = stop ]; then
> > ip addr flush dev TEST
> > ip link del TEST
> > fi
> > 
> > which I start with as a systemd oneshot service with
> > 
> >         Before=systemd-networkd.service
> > 
> > I can see in the journal that TEST has all adresses assigned but with
> > 231-6 it looses them again (probably when systemd-networkd.service
> > starts). With 231-5 or earlier this in not the case.

> 
> It appears you are using systemd-networkd. Could you please attach
> your networkd configuration?

Yes, systemd-networkd ist active. But on most machines I only have *.link 
entries, usually one to name the device:

======================
[Match]
MACAddress=11:22:33:44:55:66

[Link]
Name=net
WakeOnLan=off
======================

Most of them are virtual machines.


On those machine where I also habe *.netdev and *.network entries this also 
happens. The one with the simpliest has only one *.network:

======================
[Match]
Name=net

[Network]
LinkLocalAddressing=ipv6
IPv6AcceptRouterAdvertisements=no
DHCP=no
Address=10.11.12.13/24
Gateway=10.11.12.1
Address=2001:1234:1::abc1
Address=2001:1234:1::abc2
Address=2001:1234:1::abc3
Address=2001:1234:1::abc4
NTP=2001:1234:1::123

[Route]
Gateway=fe80::1
PreferredSource=2001:1234:1::abc1
======================

This interface works fine. But other interfaces configured by 
/etc/network/interfaces or the manually created interface TEST loose there 
ipv4 and ipv6 addresses.

Please note, that I did not create a *.link entry for TEST on any of the 
machines. 


If I later restart these interfaces (with ifdown + ifup for 
/etc/network/interfaces, systemctl restart test-network-device.service for 
TEST) they keep their addresses.



> 
> Version 231-6 is built with iptables support, so that may be causing
> an interaction that was not visible before.

Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts




More information about the Pkg-systemd-maintainers mailing list