[systemd-devel] systemd-networkd-wait-online

Johannes Ernst johannes.ernst at gmail.com
Tue Dec 5 20:21:24 UTC 2017


I’m running systemd 235.38 on an ARM64 device called the EspressoBin [1]. The EspressoBin board has an on-board Ethernet switch, which I configure with systemd-networkd (configuration is below). The device is intended as a home router that runs IPv4 masquerading, local DNS server etc.

I’m attempting to take action when the wan interface has a network connection to the upstream ISP. I discovered /usr/lib/systemd/systemd-networkd-wait-online, which behaves as follows:

% systemd-networkd-wait-online -i wan
Exactly what I would expect — once I connect upstream Ethernet, it prints "ignoring: lan0, lan1, eth0, lo” and returns true

% systemd-networkd-wait-online —ignore lan0 —ignore lan1
Same as first

% systemd-networkd-wait-online
“Hangs”

% systemd-networkd-wait-online -i lan0
“Hangs”

The way I read the man page [2] systemd-networkd-wait-online is supposed to return with true, even if only the wan interface is connected and the other two ports are configured (but not connected). Is my understanding correct? Or do all three ports need to be connected?

Thanks,



Johannes.



Configuration:

::::::::::::::
49-ubos-eth0.network
::::::::::::::
[Match]
Name=eth0

[Network]

::::::::::::::
50-ubos-lan0.network
::::::::::::::
[Match]
Name=lan0

[Network]
Address=192.168.140.1
DNS=192.168.140.1
IPForward=yes
BindCarrier=eth0

::::::::::::::
50-ubos-lan1.network
::::::::::::::
[Match]
Name=lan1

[Network]
Address=192.168.141.1
DNS=192.168.141.1
IPForward=yes
BindCarrier=eth0

::::::::::::::
50-ubos-wan.network
::::::::::::::
[Match]
Name=wan

[Network]
DHCP=yes
IPForward=yes
BindCarrier=eth0






[1] https://espressobin.net/
[2] https://www.freedesktop.org/software/systemd/man/systemd-networkd-wait-online.service.html




More information about the systemd-devel mailing list