Preamble: ip
and ifconfig
are utilities for controlling and monitoring networking. They are not typically used for reading/writing persistent configuration files - and this is why ip link
did not work. Persistent configuration management has to be accomplished by other means, such as NetworkManager
.
(It's likely needless to say, but, as a side note, iproute2
, which provides ip
, has been/is being adopted by many distributions as a replacement for net-tools
, which provides ifconfig
. They are often both shipped as default packages in distributions for compatibility reasons).
Why ifup
worked and systemctl restart NetworkManager
did not:
On CentOS (I have checked for CentOS 7), ifup
and ifdown
are provided by initscripts
; they operate on the scripts in /etc/sysconfig/network-scripts/
, provided by the same package. Thus, no surprise in ifup
being able to apply the changes you made there.
NetworkManager - the default networking service provider that CentOS inherited from upstream - on Red Hat and Fedora is configured to use the ifcfg-rh
plugin to read/write network configuration from /etc/sysconfig/network-scripts/ifcfg-*
. But it does not monitor those files.
man nm-settings-ifcfg-rh
warns that
Users can create or modify the ifcfg-rh connection files manually, even if that is not the recommended way of managing the profiles. However, if they choose to do that, they must inform NetworkManager about their changes (see monitor-connection-file in nm-settings(5), and nmcli con (re)load).
Thus, systemctl reload NetworkManager
is not supposed to reload the configuration of a network connection from file on CentOS. To do that you can invoke nmcli connection reload
or change NetworkManager
configuration as stated in man NetworkManager.conf
:
monitor-connection-files
Whether the configured settings plugin(s) should set up file monitors and immediately pick up changes made to connection files while NetworkManager is running. This is disabled by default; NetworkManager will only read the connection files at startup, and when explicitly requested via the ReloadConnections D-Bus call. [...]
yum groups info your_group
. To know which group a package belongs to:yum groups info '*' | less +/your_package
oryum groupinfo '*' | less +/your_package
. – fra-san Nov 21 '18 at 16:27