Failed to start LSB: Bring up/down networking
一、遇到的问题
1、重启机器后,网络异常报:Failed to start LSB: Bring up/down networking
重启网络服务
#重启网络:CentOS6使用service network restart命令
[root@hu ~]# systemctl restart network
Restarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
#执行'systemctl status network.service'进一步排查
[root@localhost ~]# systemctl status network.service
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since三 2021-12-29 09:30:10 CST; 1min 5s ago
12月 29 09:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
...
...
12月 29 09:30:10 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1
12月 29 09:30:10 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
12月 29 09:30:10 localhost.localdomain systemd[1]: Unit network.service entered failed state.
二、解决方案
1.禁用NetworkManager
#关闭NetworkManager服务
[root@hu ~]# systemctl stop NetworkManager
#永久关闭NetworkManager服务
[root@hu ~]# systemctl disable NetworkManager
2.关闭防火墙
# 查看防火墙状态
[root@hu ~]# firewall-cmd --state
running ---运行中
# 关闭防火墙
[root@hu ~]# systemctl stop firewall
[root@hu ~]# firewall-cmd --state
not running ---关闭
3.关闭selinux
#查看selinux状态
[root@hu ~]# getenforce
Enforcing ---开启
# 临时关闭
[root@hu ~]# setenforce 0 ---立即生效,重启后失效
# 永久关闭,修改selinux配置文件。 ---重启后生效
[root@hu ~]# vim /etc/selinux/config
...
SELINUX=disabled
...
4.重启机器&重启网络
#重启机器
[root@hu ~]# reboot
...
...
[root@hu ~]# systemctl restart network
[root@hu ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:0e:b4:0d brd ff:ff:ff:ff:ff:ff
inet 192.168.139.128/24 brd 192.168.63.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe0e:b40d/64 scope link
valid_lft forever preferred_lft forever
3: ens37: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:0c:29:0e:b4:17 brd ff:ff:ff:ff:ff:ff