码迷,mamicode.com
首页 > 系统相关 > 详细

Linux网卡操作

时间:2017-08-26 15:56:44      阅读:406      评论:0      收藏:0      [点我收藏+]

标签:control   manage   logs   failure   generator   system   ring   div   网卡   

单个网卡操作
[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

 

Linux网卡操作

标签:control   manage   logs   failure   generator   system   ring   div   网卡   

原文地址:http://www.cnblogs.com/feiyun126/p/7435334.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!