我正在从 NetworkManager 迁移到systemd-networkd
(升级到 Ubuntu 18.04 后)。我配置了所有接口、网桥和 VLAN,一切正常。
日志显示
root@srv ~# journalctl -b | grep " lo" | grep networkd
May 20 10:55:44 srv systemd-networkd[765]: lo: Removing non-existent address: ::1/128 (valid forever), ignoring
May 20 10:55:44 srv systemd-networkd[765]: lo: Link is not managed by us
May 20 10:55:44 srv systemd-networkd[765]: lo: Link is not managed by us
May 20 10:55:44 srv systemd-networkd[765]: lo: Link is not managed by us
May 20 10:55:44 srv systemd-networkd-wait-online[801]: ignoring: lo
May 20 10:55:44 srv systemd-networkd-wait-online[801]: ignoring: lo
May 20 10:55:44 srv systemd-networkd[765]: lo: Link is not managed by us
May 20 10:55:44 srv systemd-networkd-wait-online[801]: ignoring: lo
May 20 10:55:44 srv systemd-networkd-wait-online[801]: ignoring: lo
May 20 10:55:44 srv systemd-networkd-wait-online[801]: ignoring: lo
May 20 10:55:44 srv systemd-networkd-wait-online[801]: ignoring: lo
May 20 10:55:44 srv systemd-networkd-wait-online[801]: ignoring: lo
(ignoring: lo
然后在日志中重复多次)
首先,lo: Link is not managed by us
。那么由谁来管理呢?
然后看起来它的设置是正确的:
root@srv ~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
它确实不是由以下人员管理的systemd-networkd
:
root@srv ~# networkctl status lo
● 1: lo
Link File: /lib/systemd/network/99-default.link
Network File: n/a
Type: loopback
State: carrier (unmanaged)
Address: 127.0.0.1
但除此之外按预期工作:
root@srv ~# ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.056 ms
我应该通过配置它systemd-networkd
吗?如果是的话 - 如何配置?