RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1870059 - [RFE] show gateway instead of 0.0.0.0/0 in nmcli output
Summary: [RFE] show gateway instead of 0.0.0.0/0 in nmcli output
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.3
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: 8.0
Assignee: Vojtěch Bůbela
QA Contact: David Jaša
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-19 09:43 UTC by Vladimir Benes
Modified: 2022-05-10 15:31 UTC (History)
8 users (show)

Fixed In Version: NetworkManager-1.34.0-0.1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 14:54:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2022:1985 0 None None None 2022-05-10 14:54:38 UTC
freedesktop.org Gitlab NetworkManager NetworkManager merge_requests 943 0 None None None 2021-08-17 11:51:30 UTC

Description Vladimir Benes 2020-08-19 09:43:20 UTC
Description of problem:
checking default gateway is not possible for a human via one command in nmcli. First you need to check which profile is connected via nmcli or nmcli con and then nmcli con show $profile |grep GATEWAY (or scroll down). I think nmcli command should show something like ip a s; ip r; ip -6 r. Now it just shows incomplete info. We should fix it.

wlp2s0: connected to legacy
        "Intel 8265 / 8275"
        wifi (iwlwifi), 48:A4:72:0B:E7:F3, hw, mtu 1500
        ip4 default
        inet4 192.168.1.40/24
        route4 0.0.0.0/0
        route4 213.175.37.11/32
        route4 192.168.1.1/32
        route4 192.168.1.0/24
        route4 192.168.1.40/32
        inet6 fe80::5868:6f91:2ff:e341/64
        route6 fe80::/64
        route6 fe80::5868:6f91:2ff:e341/128
        route6 ff00::/8
 
we know driver, profile, ip4/6 address but we cannot easily see default route now. I think we should have gateway4 or something like that.

Version-Release number of selected component (if applicable):
1.26.0-6

How reproducible:
always

Steps to Reproduce:
1. run nmcli

Actual results:
no gateway

Expected results:
gateway should be shown different way than other routes

Additional info:
my actual ip 4 output:

$ ip r 
default via 192.168.1.1 dev wlp2s0 proto dhcp metric 600 
10.0.0.0/8 via 10.40.192.1 dev tun0 proto static metric 50 
10.40.192.0/20 dev tun0 proto kernel scope link src 10.40.194.112 metric 50 
192.168.1.0/24 dev wlp2s0 proto kernel scope link src 192.168.1.40 metric 600 
192.168.1.1 dev wlp2s0 proto static scope link metric 600 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
213.175.37.11 via 192.168.1.1 dev wlp2s0 proto static metric 600

Comment 3 Gris Ge 2021-03-03 04:53:12 UTC
Hi Vladimir,
This is decorative and controversial.

Can we close till this cause real problem(for me, 0.0.0.0/0 and ::/0 works well)?

Comment 4 Vladimir Benes 2021-03-09 14:52:58 UTC
(In reply to Gris Ge from comment #3)
> Hi Vladimir,
> This is decorative and controversial.
> 
> Can we close till this cause real problem(for me, 0.0.0.0/0 and ::/0 works
> well)?

This bug was about the nmcli command not saying what the gateway is. We can see it via the ip r command but one cannot easily guess it from the nmcli output, that's it.

Comment 5 Thomas Haller 2021-06-30 07:39:50 UTC
in kernel, routes can have many attributes (beside the gateway).

Most (not all) of these attributes are also part of what identifies the route. That is their "primary key" which identifies them.

for example, we can add two routes that are identical except a different "window".

On D-Bus API and in nmcli, we only expose a subset of these attributes. Hence, such two routes would look indentical on nmcli/D-Bus, while they differ in yet another attribute that is invisible. That is a bit odd.

Eventually we should expose "all" attributes (which is a never ending task as new attributes get added).

For starters, it's of course good and right to show the gateway!!

Comment 11 errata-xmlrpc 2022-05-10 14:54:06 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/RHEA-2022:1985


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