Description of problem:
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):
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`
When set GATEWAY=192.168.1.1 in /etc/sysconfig/network and reboot, the `ip route` should display `default via 192.168.1.1`
what is the content of our ifcfg files?
> of our ifcfg files?
not just "/etc/sysconfig/network" file, but also the relevant /etc/sysconfig/network-scripts/* files. Thanks.
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.
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 .
The sentence "For global settings, use the /etc/sysconfig/network file." was removed from the second paragraph of the following section:
The changes are now available on the Customer Portal.