背景: 物理机35重装系统后,配置网卡。在network-scripts下增加了ifcfg-eth0 ifcfg-eth1 ifcfg-eth2 ifcfg-eth3 ifcfg-bond文件, 重启network失败,systemctl status network查看状态:Failed to start LSB:Bring up/down networking。 ip addr查看网卡信息,如下: enp2s0f0 68:91:d0:63:8b:e0 UP eno1 ac:1f:6b:f0:28:2c UP enp2s0f1 68:91:d0:63:8b:e1 DOWN eno2 ac:1f:6b:f0:28:21 DOWN
解决方法 第一步:禁用NetworkManager
systemctl stop NetworkManager systemctl disable NetworkManager第二步:修改配置文件,添加mac地址 查看网卡信息
# ip addr 1: lo: 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: ens34: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:af:66:fc brd ff:ff:ff:ff:ff:ff inet 13.10.12.35/23 brd 10.1.3.255 scope global ens34 valid_lft forever preferred_lft forever inet6 fe80::250:56ff:feaf:66fc/64 scope link valid_lft forever preferred_lft forever修改ifcfg-xxx文件
# cd /etc/sysconfig/network-scripts/ # mv ifcfg-XXX ifcfg-ens34 # vim ifcfg-ens34 DEVICE=ens34 #修改名称 HWADDR=00:50:56:af:66:fc #增加此行再次重启network,成功