How to restart network service on CentOS8?

Issues related to configuring your network
Post Reply
ironblood4416
Posts: 2
Joined: 2019/09/25 07:52:56

How to restart network service on CentOS8?

Post by ironblood4416 » 2019/09/25 08:09:57

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 ?
Last edited by ironblood4416 on 2019/09/26 00:25:26, edited 1 time in total.

lightman47
Posts: 999
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: How to restart network service on CentOS8?

Post by lightman47 » 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 ...
Multple login IDs are not your friend when asking for help!

User avatar
TrevorH
Forum Moderator
Posts: 27127
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to restart network service on CentOS8?

Post by TrevorH » 2019/09/25 20:26:15

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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

ironblood4416
Posts: 2
Joined: 2019/09/25 07:52:56

Re: How to restart network service on CentOS8?

Post by ironblood4416 » 2019/09/26 00:27:11

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?

User avatar
jlehtone
Posts: 2430
Joined: 2007/12/11 08:17:33
Location: Finland

Re: How to restart network service on CentOS8?

Post by jlehtone » 2019/09/26 06:58:30

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.

mario.dietlein
Posts: 9
Joined: 2019/02/27 13:44:30

Re: How to restart network service on CentOS8?

Post by mario.dietlein » 2019/09/27 08:35:17

I´m using currently the simple "ifup" and "ifdown", because i only have one if ("/etc/sysconfig/network-scripts/ifcfg-ens192")
so...

Code: Select all

ifdown ens192 && ifup ens192
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

User avatar
jlehtone
Posts: 2430
Joined: 2007/12/11 08:17:33
Location: Finland

Re: How to restart network service on CentOS8?

Post by jlehtone » 2019/09/27 08:46:13

mario.dietlein wrote:
2019/09/27 08:35:17

Code: Select all

ifdown ens192 && ifup ens192

Code: Select all

nmcli c down ens192 && nmcli c up ens192

wyfha
Posts: 1
Joined: 2019/10/01 09:58:15

Re: How to restart network service on CentOS8?

Post by wyfha » 2019/10/01 10:01:19

The following command can reload the new settings.

Code: Select all

nmcli d reapply enp03

ggpigg
Posts: 9
Joined: 2015/01/13 00:36:30

Re: How to restart network service on CentOS8?

Post by ggpigg » 2019/10/01 10:06:39

Out of curiosity do you have to do this because your machine is not connected upon boot up?

Post Reply

Return to “CentOS 8 - Networking Support”