Bug 1740551 - [RFE] Improve NM bumping metric of default-route based on connectivity check
Summary: [RFE] Improve NM bumping metric of default-route based on connectivity check
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: NetworkManager Development Team
QA Contact: Desktop QE
Depends On:
TreeView+ depends on / blocked
Reported: 2019-08-13 09:03 UTC by Thomas Haller
Modified: 2021-01-18 15:00 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-01-18 15:00:45 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

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.

Note You need to log in before you can comment on or make changes to this bug.