# service network restart是重啟所有網卡。
例如下面的例子:
>ifconfig eth0 up|down
>service network restart|start|stop
1.前者指定對應網卡后者是所有網卡
2.前者選項有啟動和關閉后者有重啟選項。
即:前者若要有restart效果,需要 ifconfig eth0 down && ifconfig eth0 up[遠程操作需要注意]
3.后者service的操作和前者/sbin下命令操作,權限不同
一些情況下service命令會收給root使用,而普通用戶在特定情況下仍可以使用ifconfig。
ifconfig eth0 192.168.10.130 netmask 255.255.252.0 gw 192.168.8.1 up
參考網址:https://blog.csdn.net/qq_44945035/article/details/89432444
https://www.cnblogs.com/liujiyu/p/9045575.html
CENTOS 7 下service network restart失敗最全解決方案:https://blog.csdn.net/play_chess_ITmanito/article/details/82423725
https://zhidao.baidu.com/question/1499456059711395979.html
https://blog.csdn.net/cpongo3/article/details/93854067