Hi Uwe,
On 27.04.2023 12:34, Uwe Sauter via rocky wrote:
Hi folks,
With CentOS 7/Rocky 8 and "network-scripts" I was able to configure static routes using "equal cost multi-path" (ECMP) routing. /etc/sysconfig/network-scripts/route-eth0 would contain a line like
172.16.0.0/16 nexthop via 192.168.1.250 nexthop via 192.168.1.251
which would then look like:
# ip r default via 192.168.1.254 dev eth0 172.16.0.0/16 nexthop via 192.168.1.250 dev eth0 weight 1 nexthop via 192.168.1.251 dev eth0 weight 1
It seems that the NetworkManager keyfile format is not able to handle that situation.
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 ```
Or, with nmcli:
``` nmcli con mod your-connection ipv4.routes '10.0.0.250/32 10.0.0.1 50, 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.
For reference, the syntax for ipv4.routes is
``` ip[/prefix] [next-hop] [metric] [attribute=val]... [,ip[/prefix] ...] ```
Hope this helps!
--Neil
Thanks,
Uwe _______________________________________________ rocky mailing list -- rocky@lists.resf.org To unsubscribe send an email to rocky-leave@lists.resf.org