Wondering how to fix ‘Failed to restart network.service’? We can help you.

Network scripts are deprecated in Red Hat Enterprise Linux 8 and 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 we try to use legacy network.service unit file it will not be available and may end up showing the following error.

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

Here at Bobcares, we fix similar issues as a part of our Server Management Services. Today, let’s see how our Support Techs fix this for our customers.

  1. Troubleshoot
  2. Start Network Service without NetworkManager
  3. Fix “Failed to restart network.service: Unit network.service not found” in RHEL 8
  4. How to fix “Failed to restart network.service: Unit network.service not found” in RHEL 7

How to fix ‘Failed to restart network.service’ on RHEL 7 and RHEL 8

Red Hat Enterprise Linux 8 uses the default networking service, NetworkManager. As it is a dynamic network control and configuration daemon to keep network devices and connections up and active when they are available.

Before going into the steps for fixing this issue we will see some basic commands.

Starting Network Service with NetworkManager

To start NetworkManager:

# systemctl start NetworkManager

To enable NetworkManager automatically at boot time:

# systemctl enable NetworkManager

Start Network Service without NetworkManager

If we use NM_CONTROLLED=no in ifcfg file, then we 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 you are using NM_CONTROLLED=NO in your network interface configuration file then you won’t be able to bring up the interface using ifup command.

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
#IPADDR=172.18.70.39
#NETMASK=255.255.254.0
#GATEWAY=172.18.70.1
#DNS1=172.18.70.1
#DNS2=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=no
IPV6_DEFROUTE=no
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
UUID=5f643886-9a8a-4d2e-b3b8-a5193bf08077
DEVICE=enp0s3
ONBOOT=yes
NM_CONTROLLED=NO

You need to install network-scripts package using dnf install network-scripts command as shown below. Since it is already installed in my system so it will show that the package is already installed.
[root@localhost ~]# dnf install network-scripts
CentOS-8 - AppStream 11 kB/s | 4.3 kB 00:00
CentOS-8 - Base 9.2 kB/s | 3.9 kB 00:00
CentOS-8 - Extras 2.0 kB/s | 1.5 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 4.5 kB/s | 7.8 kB 00:01
Extra Packages for Enterprise Linux 8 - x86_64 2.9 kB/s | 5.5 kB 00:01
Extra Packages for Enterprise Linux 8 - x86_64 670 kB/s | 6.9 MB 00:10
Google Cloud SDK 210 B/s | 454 B 00:02
Google Cloud SDK 2.9 MB/s | 37 MB 00:12
Package network-scripts-10.00.4-1.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Now you can check from RPM DB if network service is available in the network-scripts package list using rpm -ql network-scripts | grep “/etc/init.d/network” command as shown below.

[root@localhost ~]# rpm -ql network-scripts | grep "/etc/rc.d/init.d/network"
/etc/rc.d/init.d/network
Once it is confirmed that network service is available you can ifup enp0s3 command to bring up the interface.
[root@localhost ~]# ifup enp0s3
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.
Also you need to restart your service either using service network restart or systemctl restart network command as shown below. Once service is restarted you can check the status by running systemctl is-active network command.
[root@localhost ~]# systemctl restart network
[root@localhost ~]# systemctl is-active network
active

Now if you check the network status then you can see that network service is up and running. You can check the status by running systemctl status network command as shown below.
[root@localhost ~]# systemctl status network
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; generated)
Active: active (exited) since Fri 2020-06-12 07:01:58 EDT; 23min ago
Docs: man:systemd-sysv-generator(8)
Process: 1068 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)
Jun 11 19:43:30 localhost.localdomain systemd[1]: Starting LSB: Bring up/down networking...
Jun 11 19:43:30 localhost.localdomain network[1068]: WARN : [network] You are using 'network' service provided by 'network-scripts', which are now deprecated.
Jun 11 19:43:30 localhost.localdomain network[1089]: You are using 'network' service provided by 'network-scripts', which are now deprecated.
Jun 11 19:43:30 localhost.localdomain network[1068]: WARN : [network] 'network-scripts' will be removed in one of the next major releases of RHEL.
Jun 11 19:43:30 localhost.localdomain network[1090]: 'network-scripts' will be removed in one of the next major releases of RHEL.
Jun 11 19:43:30 localhost.localdomain network[1068]: WARN : [network] It is advised to switch to 'NetworkManager' instead for network management.
Jun 11 19:43:30 localhost.localdomain network[1091]: It is advised to switch to 'NetworkManager' instead for network management.
Jun 11 19:43:30 localhost.localdomain network[1068]: Bringing up loopback interface: [ OK ]
Jun 11 19:43:30 localhost.localdomain network[1068]: Bringing up interface enp0s3: [ OK ]
Jun 11 19:43:30 localhost.localdomain systemd[1]: Started LSB: Bring up/down networking.

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

This error can be seen in RHEL 7 based systems due to any network configuration or network interface issues.

Following are the steps to fix “Failed to restart network.service: Unit network.service not found” in RHEL 7

First, we need to check the network interface status.

For example, suppose the network interface is eth1. So we need to run ifconfig eth1 command to check the status of interface eth1.

[root@localhost ~]# ifconfig eth1
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.150 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::a00:27ff:fe1d:8e54 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:1d:8e:54 txqueuelen 1000 (Ethernet)
RX packets 105385 bytes 129825301 (123.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 28452 bytes 4965590 (4.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Now, we can bring down the interface using ifdown eth1 and bring up again using ifup eth1 command.

[root@localhost ~]# ifdown eth1
[root@localhost ~]# ifup eth1

Next, we can restart the network and check if the network is active or not.

[root@localhost ~]# systemctl restart network
[root@localhost ~]# systemctl is-active network
active

Now if we check the network status, we can see that network service is up and running.

[root@localhost ~]# systemctl status network
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; generated)
Active: active (exited) since Mon 2021-03-08 07:01:58 EDT; 23min ago
Docs: man:systemd-sysv-generator(8)
Process: 1068 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)

Mar 7 19:43:30 localhost.localdomain systemd[1]: Starting LSB: Bring up/down networking...
Mar 7 19:43:30 localhost.localdomain network[1068]: WARN : [network] You are using 'network' service provided by 'network-scripts', which are now deprecated.
Mar 7 19:43:30 localhost.localdomain network[1089]: You are using 'network' service provided by 'network-scripts', which are now deprecated.
Mar 7 19:43:30 localhost.localdomain network[1068]: WARN : [network] 'network-scripts' will be removed in one of the next major releases of RHEL.
Mar 7 19:43:30 localhost.localdomain network[1090]: 'network-scripts' will be removed in one of the next major releases of RHEL.
Mar 7 19:43:30 localhost.localdomain network[1068]: WARN : [network] It is advised to switch to 'NetworkManager' instead for network management.
Mar 7 19:43:30 localhost.localdomain network[1091]: It is advised to switch to 'NetworkManager' instead for network management.
Mar 7 19:43:30 localhost.localdomain network[1068]: Bringing up loopback interface: [ OK ]
Mar 7 19:43:30 localhost.localdomain network[1068]: Bringing up interface eth1: [ OK ]
Mar 7 19:43:30 localhost.localdomain systemd[1]: Started LSB: Bring up/down networking.

 [Still, stuck with the error? – We can help you]

Methods to Restart Network Service on RHEL 9

RHEL 9 and other recent Red Hat-based systems use NetworkManager to manage network configurations. There are several ways to restart or reload network services, depending on what you need to achieve,  restarting all interfaces, a specific connection, or just reloading configurations.

1. Restart Network Using systemctl

This is the most common way to restart the entire NetworkManager service.

sudo systemctl restart NetworkManager

Explanation:
This command stops and starts the NetworkManager service again, applying any configuration changes system-wide.

To verify the service status:

sudo systemctl status NetworkManager
2. Reload Network Configurations

If you’ve made small configuration changes and don’t want to interrupt active connections, use reload instead of restart.

sudo nmcli general reload

Explanation:
This reloads the NetworkManager configuration files without disconnecting current sessions.

3. Restart a Specific Network Connection

Instead of restarting the entire service, you can restart just one connection:

sudo nmcli connection down <connection-name>
sudo nmcli connection up <connection-name>

Example:

sudo nmcli connection down "Wired connection 1"
sudo nmcli connection up "Wired connection 1"

Explanation:
Useful when you only want to restart one interface (like eth0 or a Wi-Fi connection) instead of all network connections.

4. Bring Network Interfaces Up or Down (ip Command)

For low-level control, use the ip command.

sudo ip link set <interface> down
sudo ip link set <interface> up

Example:

sudo ip link set eth0 down
sudo ip link set eth0 up

Explanation:
This directly controls the state of a network interface without involving NetworkManager.

5. Restart Networking Using nmcli networking Command

You can also use nmcli to restart networking as a whole:

sudo nmcli networking off
sudo nmcli networking on

Explanation:
This disables and re-enables all network interfaces managed by NetworkManager.

How to Restart Network Services in Ubuntu 24.04

1. Restart NetworkManager

Ubuntu 24.04 uses NetworkManager to handle connections. You can restart it with:

sudo systemctl restart NetworkManager

To check its status:

sudo systemctl status NetworkManager

If you see “active (running)”, it’s working fine.

2. Restart the Networking Service

For older setups or servers, use the networking service:

sudo systemctl restart networking

Verify:

sudo systemctl status networking
3. Bring a Network Interface Up or Down

If you want to restart a specific interface (like eth0 or enp3s0):

sudo ip link set eth0 down
sudo ip link set eth0 up

Replace eth0 with your actual interface name. To list all interfaces:

ip addr show
4. Restart Network via Command Line Shortcut

Another quick way:

sudo nmcli networking off
sudo nmcli networking on

Failed to Restart Network Service: Unit network.service not found

If you’ve tried restarting the network service in Ubuntu using:
sudo systemctl restart network

and got the error —
Failed to restart network.service: Unit network.service not found.
it simply means that the “network” service doesn’t exist in recent Ubuntu versions.

Modern Ubuntu systems use Netplan or NetworkManager instead of the old networking service. Here’s how you can fix it.

First, check which network manager your system is using:

ls /etc/netplan/

If Netplan is configured, apply changes with:

sudo netplan apply

If you’re using NetworkManager, restart it instead:

sudo systemctl restart NetworkManager

You can also restart networking using:

sudo systemctl restart networking

To verify the status:

sudo systemctl status networking

If you want to restart the interface manually, run:

sudo ifdown eth0 && sudo ifup eth0

(Replace eth0 with your actual interface name.)

Conclusion

To conclude we saw how our Support Techs fix ‘Failed to restart network.service’ on both RHEL 7 and RHEL 8