How to setup static IPs with systemd-networkd?
I recently set up a server with its network managed directly by systemd-networkd (nuked netplan.io and Network Manager) and gave it static IPs like this: After restarting systemd-networkd.service, default routes look like this: Because there are multiple NICs and I want to make eno1 the preferred one, I want the routes laid out like this:
What should the default route metrics be in systemd-networkd?
After restarting systemd-networkd.service, default routes look like this: Because there are multiple NICs and I want to make eno1 the preferred one, I want the routes laid out like this: Without the metric value, it default to 0, meaning all routes have the same priority (highest), which I want to avoid.
What’s the difference between IP and systemd networkd?
I did some debugging and here is the difference between what ip and systemd-networkd does for the first Route block. So systemd-networkd doesn’t add scope link to the route. That’s why an attempt to add default route via 192.168.0.1 fails with Network is unreachable error.
Is there a problem with direct routes in systemd-networkd?
I have problem adding direct routes through systemd-networkd. What I’m trying to achieve is similar to: This is weird setup, I know, but I can’t use usual ip a a 192.168.0.2/24 to reach gateway. For some reason whole /24 subnet is reachable through the gateway in this subnet.
Is there a way to fix systemd networkd?
Oct 22 23:09:30 server0.hidden-domain.com systemd-networkd [21078]: remoter: Could not set route: Network is unreachable Same here. So, still no fix or at least workaround?
How to set static routes in DHCP interface?
Static routes was flushed by dhcp. Via the DHCP it takes a while and we also sets the static routes asynchronously. So If I figure this this requirement right the DHCP routes are set then the static routes supposed to be configured. I think we need to introduce a config ConfigureStaticRoutesAfterDHCP.