Bug 1740551

Summary: [RFE] Improve NM bumping metric of default-route based on connectivity check
Product: Red Hat Enterprise Linux 8 Reporter: Thomas Haller <thaller>
Component: NetworkManagerAssignee: NetworkManager Development Team <nm-team>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: acardace, atragler, bgalvani, fgiudici, lrintel, pasik, rkhan, sukulkar, thaller, till, vbenes
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-18 15:00:45 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:

Description Thomas Haller 2019-08-13 09:03:30 UTC
Nowadays NetworkManager can do per-device and per-af connectivity checking (if enabled, see bug 1437608).

If a device has no global connectivity, then the device's default-route (/0 prefix length) for that address family gets a penalty of +20000 to the metric. 

The example usecase is when your phone is connected to mobile network, and then you connect to a Wi-Fi network that is behind a captive portal. At first, there is no connectivity on Wi-Fi, and the default-route there gets bumped so that mobile internet is still preferred. Once you login to the captive portal, the default-metric gets the original value and is now preferred over mobile network.


Also, with bug 1714438, we can add a default-route like any other static, manual route.


Currently, we add the penalty to every /0 route. I think that is not always desirable. It should be configurable whether a device's default-route is subject to such behavior. Also, for default-routes configured as manual routes, the user should be able to opt-out from this. Also, maybe regular routes should get the same treatment.


TODO: make it more configurable of whether a route gets the penalty or not.

 - add the possiblity that non-default (!= /0) routes the the penalty too

 - add a way to opt-out for default-routes to get the penalty (or maybe even disable it for manual routes altogether).

Comment 4 Thomas Haller 2021-01-18 15:00:45 UTC
currently there are no resources to work on this.

Also, in RHEL connectivity-check is commonly not done.
Also, connectivity-check is supposed to do something simple -- for simple use-cases like on a note-book. It may not be fully flexibile/configurable, and that is fine.

Maybe in the future.