问题信息
今天,我修改完网卡配置文件后,执行重启网卡操作,提示Failed to start LSB: Bring up/down networking
# service network restart
Restarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
# systemctl status network.service
11月 05 15:30:10 localhost.localdomain systemd[1]:Failed to start LSB: Bring up/down networking.
11月 05 15:30:10 localhost.localdomain systemd[1]: Unit network.service entered failed state.
解决方法
原来是我的网卡配置文件有问题,因此要查看网卡信息,修改网卡配置文件信息。
查看网卡配置信息
# 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 10.1.2.182/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
NAME=ens34
DEVICE=ens34
HWADDR=00:50:56:af:66:fc
重启网卡
# service network restart
本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-01/139669.htm