Bug 2081302

Summary: [RFE] Support IPv4 hash-based multipath routing (ECMP)
Product: Red Hat Enterprise Linux 9 Reporter: Thomas Haller <thaller>
Component: NetworkManagerAssignee: Fernando F. Mancera <ferferna>
Status: CLOSED ERRATA QA Contact: David Jaša <djasa>
Severity: unspecified Docs Contact: Jaroslav Klech <jklech>
Priority: unspecified    
Version: 9.0CC: andbartl, bgalvani, ferferna, jklech, lrintel, pasik, rkhan, sfaye, sukulkar, till, vbenes
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.41.8-1.el9 Doc Type: Enhancement
Doc Text:
.Introduction of the `weight` property in ECMP routing with NetworkManager With this update, RHEL 9 supports a new property `weight` when defining IPv4 Equal-Cost Multi-Path (ECMP) routes. You can configure multipath routing using NetworkManager to load-balance and stabilize network traffic. This allows for multiple paths to be used for data transmission between two nodes, which improves the network efficiency and provides redundancy in the event of a link failure. Conditions for using the `weight` property include: * The valid values are 1-256. * Define multiple next-hop routes as single-hop routes with the `weight` property. * If you do not set `weight`, NetworkManager cannot merge the routes into an ECMP route.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:17:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2079808, 2130221, 2162401    

Description Thomas Haller 2022-05-03 10:46:23 UTC
This bug was initially created as a copy of Bug #2079808


Add support for IPv4 multihop (multipath, ECMP) routes.

Currently NetworkManager ignores all IPv4 multihop routes and cannot configure them. This should be fixed.


For IPv6, kernel will automatically merge compatible single-hop routes (that only differ by their next hop). So NetworkManager supports multihop routes by just pretending there are only multi-hop routes. If you configure two routes that only differ by their next-hop, then NM will configure them, kernel will treat them as multi-hop and all works. The only thing that is missing for IPv6 is to configure a weight for the next hop.

For IPv4, it's entirely different. The next hop (or hops) of an IPv4 route is part of the identity of an IPv4 route, that means, if you have two routes that only differ by their next hop(s), then these are just two different routes as far as kernel is concerned.

Comment 8 Beniamino Galvani 2023-01-11 15:39:35 UTC
Seems to work fine here (except for the off-by-one weight that will be addressed in a later patch):

  # nmcli connection add type dummy ifname dummy1 ip4 172.25.10.1/24 ipv4.routes "192.168.1.1 10 weight=100"
  Connection 'dummy-dummy1' (dcc4e533-cea4-4d70-a48f-3edd6c0686a7) successfully added.

  # nmcli connection add type dummy ifname dummy2 ip4 172.25.10.2/24 ipv4.routes "192.168.1.1 10 weight=200"
  Connection 'dummy-dummy2' (490fb23f-ed9a-42f2-82e1-6f9e41eadd1b) successfully added.

  # ip route
  [...]
  192.168.1.1 proto static scope link metric 10
	nexthop dev dummy1 weight 101
	nexthop dev dummy2 weight 201

Setting Verified:Tested.

Comment 16 David Jaša 2023-02-13 22:23:35 UTC
VERIFIED using NetworkManager-1.41.90-1.el9.x86_64

The functionality works, automation coverage may be augmented in the future.

Comment 18 errata-xmlrpc 2023-05-09 08:17:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (NetworkManager bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2485