You are not logged in.

#1 2019-01-13 03:29:11

shawn.baker
Member
Registered: 2018-12-22
Posts: 1

timeout with first ping using systemd-resolved

I'm trying to configure the simplest system I can using just systemd-networkd and systemd-resolved. I start with a standard install, remove the networking tools, configure networkd and resolved, and reboot. The network connection works just fine, but when I try "ping google.com", it hangs and times out after two minutes. Am I missing some configuration steps?

Here's exactly what I do after the standard install (as described in the installation guide):

pacman -Rs netctl
pacman -Rs dhcpcd
vi /etc/systemd/network/10-lan0.link
	[Match]
	MACAddress=aa:bb:cc:dd:ee:ff
	
	[Link]
	Name=lan0
vi /etc/systemd/network/20-lan0.network
	[Match]
	Name=lan0
	
	[Network]
	DHCP=ipv4
	
	[DHCP]
	RouteMetric=20
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
systemctl enable systemd-networkd
systemctl enable systemd-resolved
reboot

Some notes:

  • Typing in the ping command a second time sometimes works, sometimes doesn't.

  • Using the up arrow to repeat the ping command a second time always works.

  • Giving the system minutes to initialize itself doesn't change the result.

  • Doing "ip a" first shows a valid IP address but doesn't change the result.

  • Doing an "ls /etc" before the first ping causes it to work.

  • Doing an "ls /run/systemd/resolve" before the first ping causes it to work.

  • Doing a ping of a valid IP address always works.

  • Linking to resolv.conf instead of stub-resolv.conf makes it work sometimes, but not always.

Based on these observations, it seems like systemd-resolved needs a poke to get started.

Offline

#2 2019-01-13 09:12:53

seth
Member
Registered: 2012-09-03
Posts: 49,944

Re: timeout with first ping using systemd-resolved

https://wiki.archlinux.org/index.php/Haveged ?

Ftr, systemd-resolved is not "simple" and actually breaks deterministic DNS resolution by design - if you intend to do sth. networking specific, I'd rather not use it at all to avoid hazzle down the road.

Online

Board footer

Powered by FluxBB