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 1654249 - GATEWAY in /etc/sysconfig/network doesn't work
Summary: GATEWAY in /etc/sysconfig/network doesn't work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Francesco Giudici
QA Contact: Desktop QE
Marc Muehlfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-28 10:26 UTC by fzxiaomange
Modified: 2019-08-07 09:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-07 09:05:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description fzxiaomange 2018-11-28 10:26:17 UTC
Description of problem:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8-beta/html/configuring_and_managing_networking/getting-started-with-managing-networking-with-networkmanager#Using-NetworkManager-with-sysconfig-files_getting-started-with-networking-devices-with-NetworkManager
In the redhat doc, it describe "For global settings, use the /etc/sysconfig/network file". But when I set GATEWAY=x.x.x.x in /etc/sysconfig/network, then nmcli c reload and reboot os, the gateway is not the GATEWAY value.

Version-Release number of selected component (if applicable):
rhel8.0 beta

Actual results:
When set GATEWAY=192.168.1.1 in /etc/sysconfig/network and reboot, the `ip route` doesn't display `default via 192.168.1.1`

Expected results:
When set GATEWAY=192.168.1.1 in /etc/sysconfig/network and reboot, the `ip route` should display `default via 192.168.1.1`

Comment 1 Thomas Haller 2018-11-28 11:55:02 UTC
what is the content of our ifcfg files?

Comment 2 Thomas Haller 2018-11-28 12:01:14 UTC
> of our ifcfg files?
     ^^ "Your"

not just "/etc/sysconfig/network" file, but also the relevant /etc/sysconfig/network-scripts/* files. Thanks.

Comment 3 fzxiaomange 2018-12-05 08:04:33 UTC
sorry,the nic state is dhcp, so /etc/sysconfig/network is not effected, when I set ifcfg BOOTPROTO=none + NM_CONTROLLED=no,the /etc/sysconfig/network is effect.

You can close the bug.

Comment 4 Thomas Haller 2018-12-05 08:30:28 UTC
With NM_CONTROLLED=no you tell NetworkManager to ignore this ifcfg file and let initscript handle it. This bug is reported against NetworkManager, so not letting the file being handled by NetworkManager does not solve this bug (it merely avoids it). Also, the documentation recommending this, is still wrong.

NetworkManager could fix this to accept GATEWAY from /etc/sysconfig/network. But I don't think doing that (or advising to do that) is a good idea. With legacy initscripts, various configuration files are sourced together, and the possibilities where the configuration comes from is endless (because you could just source yet another file). For NetworkManager, that "flexibility" likely doesn't make sense. If you edit ifcfg file by hand (which you may do instead of using nmcli), then write them in a manner that is suitable for NetworkManager (see `man nm-settings-ifcfg-rh`).

The documentation should be fixed instead not to suggest editing /etc/sysconfig/network [1].



[1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8-beta/html/configuring_and_managing_networking/getting-started-with-managing-networking-with-networkmanager#Using-NetworkManager-with-sysconfig-files_getting-started-with-networking-devices-with-NetworkManager

Comment 6 Marc Muehlfeld 2019-08-07 09:05:30 UTC
The sentence "For global settings, use the /etc/sysconfig/network file." was removed from the second paragraph of the following section:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_and_managing_networking/index#Using-NetworkManager-with-sysconfig-files_getting-started-with-networking-devices-with-NetworkManager

The changes are now available on the Customer Portal.


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