Page 1 of 1
How to restart network service on CentOS8?
Posted: 2019/09/25 08:09:57
by ironblood4416
Hello,
How to restart network service on CentOS8?
I ran 'systemctl restart network.serivce' got following result:
Unit network.service could not be found.
Any one please help ?
Re: How to restart network service on CentOS8?
Posted: 2019/09/25 20:19:49
by lightman47
I think I rememberer reading some time ago that NetworkManager was the only option in 8. Don't quote me, but ...
Re: How to restart network service on CentOS8?
Posted: 2019/09/25 20:26:15
by TrevorH
It appears that the complete abandonment of the network service in el8 was rethought and it's still there as an optional install (which produces deprecation messages in the logs every time it's used unless you turn it off). Try network-scripts or network-tools packages.
Re: How to restart network service on CentOS8?
Posted: 2019/09/26 00:27:11
by ironblood4416
lightman47 wrote: ↑2019/09/25 20:19:49
I think I rememberer reading some time ago that NetworkManager was the only option in 8. Don't quote me, but ...
This means 'NM_CONTROLLED=no' is no longer needed in ifcfg-ens3?
Re: How to restart network service on CentOS8?
Posted: 2019/09/26 06:58:30
by jlehtone
There was never a need, but in some special scenarios you had to.
The original purpose of the variable was to tell NetworkManager:
"Thou shall not touch this connection!"
Think what happens IF the NM respects the 'no' even if there is nobody else to handle the connection?
Why are you looking at (or worse yet editing) ifcfg-ens3? NetworkManager does not wan't you to do that.
NM is kind and helpful (like fire).
NM offers nmcli, nmtui, clickety-clack GUI crap and whatnot that will do all the edits for you into files that you are not supposed to ever see.
NM does not support the "hands on files" philosophy. NM believes that humans make a mess.
Old school admins know that NM will mess up, somewhere, somehow.
Re: How to restart network service on CentOS8?
Posted: 2019/09/27 08:35:17
by mario.dietlein
I´m using currently the simple "ifup" and "ifdown", because i only have one if ("/etc/sysconfig/network-scripts/ifcfg-ens192")
so...
As someone said before, you could do
Code: Select all
systemctl restart NetworkManager.service
or do it directly with the NetworkManager:
Code: Select all
nmcli networking off && nmcli networking on
Re: How to restart network service on CentOS8?
Posted: 2019/09/27 08:46:13
by jlehtone
Code: Select all
nmcli c down ens192 && nmcli c up ens192
Re: How to restart network service on CentOS8?
Posted: 2019/10/01 10:01:19
by wyfha
The following command can reload the new settings.
Re: How to restart network service on CentOS8?
Posted: 2019/10/01 10:06:39
by ggpigg
Out of curiosity do you have to do this because your machine is not connected upon boot up?