您的位置:首页 > 运维架构 > Linux

centOS7重启网卡失败

2018-08-24 16:07 756 查看
版权声明:https://blog.csdn.net/lvtula https://blog.csdn.net/lvtula/article/details/82020531

自己手动配置了ifcfg-enoxxxxx文件后,用命令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三 2014-11-05 15:30:10 CST; 1min 5s ago 
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists 
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists 
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists 
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists 
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists 
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists 
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists 
11月 05 15:30:10 localhost.localdomain systemd[1]: network.service: control process exited, code=exited 
status=1 
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.

主要的原因是mac地址映射错误,需要显式的在配置文件中写进去,具体操作如下 :

1)用ifconfig或ip addr查看mac地址;

2)将得到的mac地址写入到配置文件中去,即在ifcfg-enoxxxxx文件中修改HWADDR="XX:XX:XX:XX:XX"

XX:XX:XX:XX:XX为mac地址。如果配置文件中没有这一项就手动增加;

3)保存退出配置文件,重启网络。

参考:https://blog.csdn.net/weiyongle1996/article/details/75128239

https://www.geek-share.com/detail/2655713613.html

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: