network.service: Failed to start LSB: Bring up/down networking on Linux (Fedora/Centos/RHEL)?

network.service: Failed to start LSB: Bring up/down networking on Linux (Fedora/Centos/RHEL)?

Few reasons for network service failure like incorrect MAC address for any network interface, duplicate network config file exists for same interface, network scripts may raise the error for any interface, may be dhcpclient raises error when using BOOTPROTO as dhcp etc..

default all the network configs and ifup scripts located under directory '/etc/sysconfig/network'.

How to restart the network service on linux (Fedora/Centos/RHEL)?

systemctl restart network

network service goes to failed state if any above mentioned network related errors.

if no network service error and default network service active status looks like below,

[root@mymachine-0 ~]# systemctl status network -l
 network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network; generated)
   Active: active (exited) since Fri 2021-11-12 08:24:31 UTC; 5 days ago
 	Docs: man:systemd-sysv-generator(8)
	Tasks: 0 (limit: 62043)
   Memory: 0B
   CGroup: /system.slice/network.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Lets see few network service errors and possible solutions,

[root@mymachine-0 ~]#  sudo systemctl status network.service -l
 network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2021-11-12 08:20:31 UTC; 5 days ago
Docs: man:systemd-sysv-generator(8)
Process: 17797 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
Process: 18067 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Nov 12 12:47:58 mymachine-0.localdomain network[18067]: [FAILED]
Nov 12 12:47:58 mymachine-0.localdomain network[18067]: Bringing up interface eth1:
Nov 12 12:48:04 mymachine-0.localdomain network[18067]: Determining IP information for eno1... failed; no link present. Check cable?
Nov 12 12:48:04 mymachine-0.localdomain network[18067]: [FAILED]
Nov 12 12:48:04 mymachine-0.localdomainnetwork[18067]: /etc/rc.d/init.d/network: line 88: ifcfg-eno1:DEVICE=eno1: command not found
Nov 12 12:48:04 mymachine-0.localdomain network[18067]: /etc/rc.d/init.d/network: line 89: ifcfg-eno1:TYPE=Ethernet: command not found
Nov 12 12:48:04 mymachine-0.localdomain systemd[1]: network.service: control process exited, code=exited status=1
Nov 12 12:48:04 mymachine-0.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
Nov 12 12:48:04 mymachine-0.localdomainsystemd[1]: Unit network.service entered failed state.
Nov 12 12:48:04 mymachine-0.localdomain systemd[1]: network.service failed.

/etc/sysconfig/network-scripts/ifcfg-eno1 network configs,

DEVICE="eno1"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"

try adding NM_CONTROLLED="no" config in ifcfg file and restart network service that dhcpclient error will not fail the network service.

try adding PERSISTENT_DHCLIENT=1 in ifcfg file and restart network service.

[root@mymachine-0 ~]# systemctl status network.service -l
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri... 23min ago
Docs: man:systemd-sysv-generator(0)
Process: 1161 ExecStart=/etc/rc.d/init.dnetwork start (code=exited, status=1/FAILURE)
Nov 12 04:08:28 mymachine-0.localdomain systemd[1]: starting LSB: Bring up/down networking...
Nov 12 04:08:28 mymachine-0.localdomain network[2345]: Bringing up loopback interface: [ OK ]
Nov 12 04:08:28 mymachine-0.localdomain network[2234]: Bringing up interface eno2f1: ERROR : [/etc/sysconfig/network-scripts/ifup-Nov] Device has different MAC address than expected, ignoring.
Nov 12 04:08:28 mymachine-0.localdomain network[2261]: [FAILED]
Nov 12 04:08:28 mymachine-0.localdomain systemd[1]: network.service control process exited, code=exited status=1
Nov 12 04:08:28 mymachine-0.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
Nov 12 04:08:28 mymachine-0.localdomain systemd[1]: Unit network.service entered failed state.
Nov 12 04:08:28 mymachine-0.localdomain systemd[1]: network.service failed.

"network.service Failed to start LSB: Bring up/down networking" error might be due to incorrect MAC Address as you can observe in above log message.

We need to provide the correct MAC address in /etc/sysconfig/network-scripts/ifcfg-eno2f1 and restarting network service to resolve this issue.

[root@mymachine-0 ~]# systemctl status network.service -l
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri... 23min ago
Docs: man:systemd-sysv-generator(0)
Process: 1161 ExecStart=/etc/rc.d/init.dnetwork start (code=exited, status=1/FAILURE)
Nov 12 04:08:28 mymachine-0.localdomain systemd[1]: starting LSB: Bring up/down networking...

Nov 12 04:08:28 mymachine-0.localdomain network[1769]: Cannot find device "eno1"
Nov 12 04:08:28 mymachine-0.localdomain network[1769]: ERROR 	: [/etc/sysconfig/network-scripts/ifup-eno1] Failed to bring up eno1.
Nov 12 04:08:28 mymachine-0.localdomain/etc/sysconfig/network-scripts/ifup-eno1[2141]: Failed to bring up vhost0.
Nov 12 04:08:28 mymachine-0.localdomain network[1769]: [FAILED]

network scripts ifup scripts may exited with error like 'cannot find device' for the network interface and may fail the network service.

We need to fix the network scripts error to resolve this issue.

Lets see network config for ifcfg-eno1,

DEVICE="eno1"
BOOTPROTO="static"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=172.128.0.10
NETMASK=255.255.255.0
GATEWAY=172.128.0.1
DNS1=8.8.8.8

When set BOOTPROTO=static for using static IP Addresses, where we will provide the manual IP Address, netmask and other details.

DEVICE="eno1"
BOOTPROTO="none"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=172.128.0.10
NETMASK=255.255.255.0
GATEWAY=172.128.0.1
DNS1=8.8.8.8

This kind of issues will be resolved when changing BOOTPROTO=none instead of BOOTPROTO=static, and need to restart network service.




Python installation

Privacy Policy  |  Copyrightcopyright symbol2020 - All Rights Reserved.  |  Contact us   |  Report website issues in Github   |  Facebook page   |  Google+ page

Email Facebook Google LinkedIn Twitter
^