In /lib/systemd/network/10-eth0.network
on my client, I am failing to configure anything that can translate my manual command:
sudo ip route add default via 192.168.7.1 dev eth0
where 192.168.7.1
is the static IPv4 address of my host.
My last 10-eth0.network
configuration attempt:
[Match]
Name=eth0
[Link]
RequiredForOnline=no
[Route]
Address=192.168.7.2/24
Destination=192.168.7.1/32
Gateway=192.168.7.1
Refreshed with sudo systemctl restart systemd-networkd
and validated with ip route
(it doesn't show up).
See also:
[Route]
Section Options- Answers that aren't working: systemd-networkd and direct routes