CentOS7 Failed to start LSB: Bring up/down networking

    前一天晚上装的CentOS7,用着没问题,第二天打开后,xshell无法连接,一看,ip地址都不见了,重启网卡失败,按照提示输入

systemctl status network,出现Failed to start LSB: Bring up/down networking错误,百度了半天,网上的方法杂七杂八,最后总结出来的办法如下:

1、修改mac地址

(1)通过ip addr查看机器mac地址

ip addr

         CentOS7 Failed to start LSB: Bring up/down networking_第1张图片    

(2) 修改配置文件中的mac地址

vi /etc/sysconfig/network-scripts/ifcfg-ens33

添加 HWADDR=00:0c:29:7b:0c:89,修改后配置文件如下:

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
HWADDR=00:0c:29:7b:0c:89
#UUID=13630152-5573-4baf-b60e-3b3b8710accd
#DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.200.11
NETMASK=255.255.255.0
GATEWAY=192.168.200.2
DNS1=8.8.8.8
DNS2=144.144.144.144

重新加载文件

source /etc/sysconfig/network-scripts/ifcfg-ens33

2、禁用NetworkManager

1. systemctl stop NetworkManager

2. systemctl disable NetworkManager

3、重启网卡

systemctl restart network

 

你可能感兴趣的:(Linux)