[CentOS] C7 systemd and network configuration

Wed Apr 22 03:22:14 UTC 2015
Mihamina Rakotomandimby <mihamina.rakotomandimby at rktmb.org>

On 04/21/2015 04:54 PM, Jonathan Billings wrote:
> On Tue, Apr 21, 2015 at 03:46:52PM +0200, Dennis Jacobfeuerborn wrote:
>> Networking isn't really controlled by systemd but by NetworkManager. I
>> usually just yum remove NetworkManager* and then everything works just
>> as it did in CentOS 6.
> Note:  NetworkManager is in CentOS6 too, and is part of the default
> workstation install.  The NM in CentOS7 is a bit more polished than
> the NM in CentOS6, but it is configured in the same way, using files
> in /etc/sysconfig/network-scripts/ (using the ifcfg-rh NetworkManager
> plugin).  In both cases, you can remove NM and use the 'network'
> service instead.

This is the information I needed: " ... using files in 

Looking furter I found https://access.redhat.com/discussions/644133 
where I can read:
What is the preferred method for changing an interface's setttings? 
Previously, editing /etc/sysconfig/network-scripts/ifcfg-xxx then 
"service network restart" did the trick.

On RHEL 7, after editing the ifcfg file, nothing short of a reboot seems 
to get it to use that config. I've tried "service network restart" I've 
tried "systemctl restart network.service" as well as "systemctl stop 
network.service" followed by "systemctl start network.service" Those 
don't seem to actually do anything. I need to reboot to get the new 
config to work.


Then answered by Ryan Sawhill :

A little late, but the command you're missing (if you're using NM) is:

  * |nmcli connection reload|

Which can be shortened to:

  * |nmcli c r|

That will reload the ifcfg files after manual edits. From there if you 
want to re-up a connection whose file you changed, you need to manually 
do so with another |nmcli connection| command, e.g.:

  * |nmcli c up "System eno1"|

Note that you don't actually need to take an interface down first, like 
in the old days (e.g., with |ifdown eth0| followed by |ifup eth0|).


Thanks for all.