I'm trying to use systemd-networkd to configure a static route. The actual IPs are different, but here's the gist of what I'm trying to do:
ip route add 10.17.12.0/23 dev eth0
If I run this command, my networking setup works exactly as intended. I just need to establish connectivity between this host and the 10.17.12.0 subnet. My host is on a different subnet, and it cannot route there on its own for some reason. Now I want to take that same static route and configure it via a systemd-networkd file.
Here is the config I've tried using
[Match] Name=eth0 [Route] Gateway=10.2.100.5 # IP address of eth0 interface Destination=10.17.12.0/23
I have also tried with Gateway set to the default gateway for the eth0 interface, but every time I get the same error:
eth0: Could not set route: Invalid argument
Any ideas what I could be doing here?