Network scripts are deprecated in Red Hat Enterprise Linux 8 and they are no longer provided by default. In Red Hat Enterprise Linux 8, to run the ifup and the ifdown scripts, NetworkManager must be running. By default if you try to use legacy network.service unit file is not available with RHEL 8.

[root@rhel-8 ~]# systemctl restart network
Failed to restart network.service: Unit network.service not found.

You can use “NetworkManager.service” as the default networking service in RHEL 8. Red Hat Enterprise Linux 8 uses the default networking service, NetworkManager, which is a dynamic network control and configuration daemon to keep network devices and connections up and active when they are available.


Starting Network Service with NetworkManager

To start NetworkManager:

[root@rhel-8 ~]# systemctl start NetworkManager

To enable NetworkManager automatically at boot time:

[root@rhel-8 ~]# systemctl enable NetworkManager


Start Network Service without NetworkManager

If you use NM_CONTROLLED=no in ifcfg file then you will be unable to bring up interfaces with ‘ifup‘ command.

The basic installation of RHEL 8 provides a new version of the ifup and ifdown scripts which call the NetworkManager service through the nmcli tool.

The custom commands in /sbin/ifup-local, ifdown-pre-local and ifdown-local scripts are not executed.


How to fix “Failed to restart network.service: Unit network.service not found” in RHEL 8

If any of these scripts are required, the installation of the deprecated network scripts in the system is still possible with the following command:

On RHEL system you must have an active subscription to RHN or you can configure a local offline repository using which “yum” package manager can install the provided rpm and it’s dependencies.
[root@rhel-8 ~]# yum install network-scripts

In RHEL 7 /etc/rc.d/init.d/network was owned by initscripts but with RHEL 8 this tool is part of network-scripts rpm

Next you can check the content of network-scripts rpm

[root@rhel-8 ~]# rpm -ql network-scripts-10.00.1-1.el8.x86_64 | grep "/etc/rc.d/init.d/network"

The ifup and ifdown scripts link will be installed with legacy network scripts.

Calling the legacy network scripts shows a warning about their deprecation.

[root@rhel-8 ~]# ifup eth0
WARN      : [ifup] You are using 'ifup' script provided by 'network-scripts', which are now deprecated.
WARN      : [ifup] 'network-scripts' will be removed in one of the next major releases of RHEL.
WARN      : [ifup] It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well.
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)

Now you can use systemctl to restart the network service

[root@rhel-8 ~]# systemctl restart network

[root@rhel-8 ~]# systemctl is-active network

Lastly I hope the steps from the article to fix “Failed to restart network.service: Unit network.service not found” in RHEL 8 Linux was helpful. So, let me know your suggestions and feedback using the comment section.


Leave a Reply

Your email address will not be published. Required fields are marked *