Bug 90265 - [networkd/resolved] [v219] nameserver reverted to fallback after suspend
Summary: [networkd/resolved] [v219] nameserver reverted to fallback after suspend
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-01 08:02 UTC by Tom Yan
Modified: 2019-02-28 10:36 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
test case (7.26 KB, text/plain)
2015-05-01 08:02 UTC, Tom Yan
Details

Description Tom Yan 2015-05-01 08:02:17 UTC
Created attachment 115493 [details]
test case

I'm using systemd-networkd and systemd-resolved for networking. I can get ip/route/nameserver from my router successfully through DHCP.

But every time after the machine is suspended, the nameserver is reverted to the fallback ones. Only restarting networkd can make it get back to the nameserver assigned by the router. Restarting resolved and deleting /run/systemd/resolve/resolv.conf manually in between will not do the job.

Other parts (ip/route) of the network are fine. I can get access to the internet before restarting systemd-networkd.

/etc/systemd/network/dhcp.network:
[Network]
DHCP=v4

This is the only network file I have.
Comment 1 Erik Johnson 2015-05-06 21:52:24 UTC
I can confirm this behavior, but I don't even need to suspend to see it happen, it just happens randomly. Restarting networkd fixes it for a short period of time, but then 5 minutes, 30 minutes, an hour later, my namservers are reset to the fallback.

I'm using wpa_supplicant to manage my home wifi connection, and it could be possible that this is triggered by a brief loss of connection to the wifi network, which triggers some sort of action in networkd that ultimately leads to resolved failing to get nameservers and reverting to the fallback.

I've had to hard-code my nameservers until this bug is fixed.
Comment 2 Andrey Vihrov 2015-05-11 13:33:54 UTC
I also observe the same issue starting from v219. v218 worked fine. After resume from suspend, journalctl -u systemd-networkd shows just

systemd-networkd[1440]: enp3s0          : lost carrier
systemd-networkd[1440]: enp3s0          : DHCP lease lost
systemd-networkd[1440]: enp3s0          : gained carrier
systemd-networkd[1440]: enp3s0          : DHCPv4 address <addr> via <route>

I only have one /etc/systemd/network/dhcp.network file, which contains

[Match]
Name=en*
[Network]
DHCP=v4
[DHCP]
UseDomains=true
Comment 3 Lennart Poettering 2019-02-28 10:36:02 UTC
I am pretty sure this was fixed long ago. Let's close this. If this still is reproducible on current versions, please file a new bug in github


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.