使用Centeros7中 发现 ip addr 无ip地址(已解决)
[root@centOS ~]# systemctl start network.service
Restarting network (via systemctl): Job for network.service failed because the control process exited with error code.
See “systemctl status network.service” and “journalctl -xe” for details.
[root@centOS ~]# systemctl status network.service
[root@centOS ~]# journalctl -xe
原因:
在CentOS系统上,目前有NetworkManager和network两种网络管理工具。如果两种都配置会引起冲突,而且NetworkManager在网络断开的时候,会清理路由,如果一些自定义的路由,没有加入到NetworkManager的配置文件中,路由就被清理掉,网络连接后需要自定义添加上去。
解决方法:
1.将networkmanager服务停了
systemctl stop NetworkManager
systemctl disable NetworkManager
2.重启网卡,就ok了
systemctl restart network
systemctl status network
#查看所有已安装服务
systemctl list-units --type=service
参考博文:https://blog.csdn.net/u012904764/article/details/95883192