systemd-networkd no DNS resolution after upgrade

This forum is for discussion about general software issues.

systemd-networkd no DNS resolution after upgrade

Postby tchelovek » Sun Dec 20, 2015 7:25 am

I have presently 4 units running ArchLinux Arm an Odroid C1 (linux-odroid-c1 3.10.80-18 armv7h), a Raspberry Pi 2B+ ( linux-raspberrypi 4.1.15-1 armv7h) and two Raspberry Pi B+ ( linux-raspberrypi 4.1.15-1 armv6h )

systemd is 228-3 for all of them

All have their network set up with systemd-networkd using static IP following the document at https://wiki.archlinux.org/index.php/Systemd-networkd.

After upgrading all of them with pacman -Syu only the Odroid C1 has internet access, while all of the Raspberries fail.

The only way to overcome the situation is adding the DNS servers to /etc/hosts, alternatively I can add DNS entries to /etc/systemd/network/eth0.network, which works, but will result in the link having two Ip-adresses.

Not sure what causes the problem and what the proper remedy would be.

I am posting here as the suggested Git-Hub doesn't seem to have a place for bug reports.

$this->bbcode_second_pass_code('', '/etc/resolv.conf

# This file is managed by systemd-resolved(8). Do not edit.
#
# Third party programs must not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage
# resolv.conf(5) in a different way, replace the symlink by a
# static file or a different symlink.

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
# Too many DNS servers configured, the following entries may be ignored.
nameserver 2001:4860:4860::8844')

$this->bbcode_second_pass_code('', '/etc/systemd/network/eth0.network

[Match]
Name=eth0

[Network]
Address=192.168.178.21/24
Gateway=192.168.178.1')
ODROID C1 ( armv7h ), Raspberry Pi 2B+ ( armv7h ), 2 x Raspberry Pi B+ ( armv6h ), Raspberry Pi4 (armv7l)
tchelovek
 
Posts: 17
Joined: Sat Mar 07, 2015 1:33 pm
Location: Yes

Re: systemd-networkd no DNS resolution after upgrade

Postby technosf » Sun Dec 20, 2015 9:56 pm

Fixed IP's or set by DHCP?
If DHCP:
o Is the DHCP server broadcasting the DNS servers?
o Are you running a local DNS cache, say, dnsmasq?
o Is your firewall blocking DNS on any local cache server?
o Why are you setting the gateway?

If fixed, then, yup, you have to set the DNS servers, and the interface IP :D
[size=85] MochaBin 5G || NSA325 [/size]
technosf
 
Posts: 147
Joined: Sat Jan 08, 2011 10:54 pm

Re: systemd-networkd no DNS resolution after upgrade

Postby tchelovek » Mon Dec 21, 2015 8:13 am

$this->bbcode_second_pass_quote('', 'F')ixed IP's or set by DHCP?


As mentioned in my post:

$this->bbcode_second_pass_quote('', 'A')ll have their network set up with systemd-networkd using static IP following the document at https://wiki.archlinux.org/index.php/Systemd-networkd.
.
.
.
After upgrading all of them with pacman -Syu only the Odroid C1 has internet access, while all of the Raspberries fail.


The difference betwen odroid c1 and raspberries being a different Kernel version.

In the meantime I have found another issue, not sure whether that correlates to this malfunction:

systemctl - l status systemd-networkd gives:

$this->bbcode_second_pass_code('', '* systemd-networkd.service - Network Service
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit) since Sun 2015-12-20 18:18:22 CET; 14h ago
Docs: man:systemd-networkd.service(8)
Process: 413 ExecStart=/usr/lib/systemd/systemd-networkd (code=exited, status=1/FAILURE)
Main PID: 413 (code=exited, status=1/FAILURE)
Status: "Shutting down..."

Dec 20 18:18:22 odroidc1arch1 systemd[1]: systemd-networkd.service: Unit entered failed state.
Dec 20 18:18:22 odroidc1arch1 systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
Dec 20 18:18:22 odroidc1arch1 systemd[1]: systemd-networkd.service: Service has no hold-off time, scheduling restart.
Dec 20 18:18:22 odroidc1arch1 systemd[1]: Stopped Network Service.
Dec 20 18:18:22 odroidc1arch1 systemd[1]: systemd-networkd.service: Start request repeated too quickly.
Dec 20 18:18:22 odroidc1arch1 systemd[1]: Failed to start Network Service.
Dec 20 18:18:22 odroidc1arch1 systemd[1]: systemd-networkd.service: Unit entered failed state.
Dec 20 18:18:22 odroidc1arch1 systemd[1]: systemd-networkd.service: Failed with result 'start-limit'.')

not only after manual (re-)start but also after booting. This happens on all 4 units.
ODROID C1 ( armv7h ), Raspberry Pi 2B+ ( armv7h ), 2 x Raspberry Pi B+ ( armv6h ), Raspberry Pi4 (armv7l)
tchelovek
 
Posts: 17
Joined: Sat Mar 07, 2015 1:33 pm
Location: Yes

Re: systemd-networkd no DNS resolution after upgrade

Postby tchelovek » Tue Dec 22, 2015 1:17 pm

After milking GOOGLE for some time, I found some hint at https://github.com/systemd/systemd/issues/1982

I now changed /etc/systemd/network/wlan0.network to:

$this->bbcode_second_pass_code('', '[Match]
Name=wlan0

[Network]
DNS=no
DNS=192.168.178.1
IPv6AcceptRouterAdvertisements=false
Address=192.168.178.42/24
Gateway=192.168.178.1')

and /etc/systemd/resolved.conf to

$this->bbcode_second_pass_code('', '# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
DNS=192.168.178.1
#FallbackDNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
LLMNR=yes
')

/etc/resolv.conf now simply reads

$this->bbcode_second_pass_code('', '# This file is managed by systemd-resolved(8). Do not edit.
#
# Third party programs must not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage
# resolv.conf(5) in a different way, replace the symlink by a
# static file or a different symlink.

nameserver 192.168.178.1

')

And, according to https://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg34727.html it looks like a bug by downstream not backporting the upstream solution.
ODROID C1 ( armv7h ), Raspberry Pi 2B+ ( armv7h ), 2 x Raspberry Pi B+ ( armv6h ), Raspberry Pi4 (armv7l)
tchelovek
 
Posts: 17
Joined: Sat Mar 07, 2015 1:33 pm
Location: Yes


Return to General

Who is online

Users browsing this forum: Google [Bot] and 2 guests