Hi Neil,
thanks for that suggestion.
How can I configure static ECMP routes with Rocky 8/9 and NetworkManager?
It's roughly the same thing in NetworkManager - the change is that ipv4 routes now support metrics, which allow you to specify the following in your [ipv4] section of the keyfile:
[ipv4] route1=10.0.0.250/32,10.0.0.1,50 route2=10.0.0.250/32,10.0.0.2,50
This will create two routes with different destinations but the same metric, making them be treated as ECMP routes.
Talking to my local network admin, he and I both agree that this is not the same behavior as before.
While adding mutiple routes to the same destination might act like ECMP it probably does not. Assuming the same metric for each entry it will prefer the first route it finds when going through the routing table.
Contratry to this ECMP using nexthop syntax will only require one entry in the routing table and the the internals of ECMP routing will then decide which gateway to select next based on weight and the previous state.
I consider this a regression of the behavior that the (upstream) distribution provides.
Using a separate systemd service that will execute a script to add/remove routes via the ip command might be a (dirty) workaround. Or putting even more distance to the distribution I might install systemd-networkd which provides true ECMP and does not require an always running service.
If there are other suggestions for how to get true ECMP routing I'd really like to hear those.
Have a nice weekend,
Uwe