單個網卡操作 [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