[systemd-devel] No default route after "systemctl restart systemd-networkd"
Gena Makhomed
gmm at csdoc.com
Fri Nov 27 21:18:16 UTC 2020
Hello, All!
How to fix or workaround this problem with default route?
-------------------------------------------
Configuration file /etc/systemd/network/eth0.network:
[Match]
Name=eth0
[Network]
Gateway=111.111.111.111
[Address]
Address=222.222.222.222/32
Peer=111.111.111.111/32
-------------------------------------------
After server boot:
# ip r
default via 111.111.111.111 dev eth0 proto static
111.111.111.111 dev eth0 proto kernel scope link src 222.222.222.222
And now server is reachable from network.
-------------------------------------------
After executing command "systemctl restart systemd-networkd":
# ip r
111.111.111.111 dev eth0 proto kernel scope link src 222.222.222.222
And now server is unreachable from network.
-------------------------------------------
OS: CentOS 8.2
# rpm -q systemd
systemd-239-31.el8_2.2.x86_64
From repo: BaseOS
# rpm -q systemd-networkd
systemd-networkd-246.6-1.el8.x86_64
From repo: epel
Configuration manual:
https://docs.hetzner.com/robot/dedicated-server/network/network-configuration-using-systemd-networkd/
-------------------------------------------
How to fix or workaround this problem with default route?
--
Best regards,
Gena
More information about the systemd-devel
mailing list