单个网卡操作 [root@localhost ~]# ifdown eth0 #关闭网络 [root@localhost ~]# ifup eth0 #启动网络 网络服务: [root@localhost ~]# service network stop #关闭网络服务 [root@localhost ~]# service network start #启动网络服务 [root@localhost ~]# service network restart #重启网络服务 root@localhost ~]# service network status #查看网卡状态
当网重启出问题时,如下:
network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled) Active: failed (Result: exit-code) since 五 2017-08-25 16:05:09 CST; 22h ago Docs: man:systemd-sysv-generator(8) Process: 1096 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE) 8月 25 16:05:00 node4 systemd[1]: Starting LSB: Bring up/down networking... 8月 25 16:05:01 node4 network[1096]: 正在打开环回接口: 错误:激活连接失败:No suitable device found for this connection. 8月 25 16:05:01 node4 network[1096]: [失败] 8月 25 16:05:01 node4 network[1096]: 正在打开接口 eno16777736: 错误:激活连接失败:No suitable device found for this connection. 8月 25 16:05:01 node4 network[1096]: [失败] 8月 25 16:05:09 node4 network[1096]: 正在打开接口 eth0: [ 确定 ] 8月 25 16:05:09 node4 systemd[1]: network.service: control process exited, code=exited status=1 8月 25 16:05:09 node4 systemd[1]: Failed to start LSB: Bring up/down networking. 8月 25 16:05:09 node4 systemd[1]: Unit network.service entered failed state. 8月 25 16:05:09 node4 systemd[1]: network.service failed.
解决办法:
先删除多余的ifcfg-eno16777736文件
systemctl stop NetworkManager
systemctl disable NetworkManager
然后在执行
systemctl start network.service