Ubuntu14.04重启网卡不生效

Ubuntu14.04重启网卡不生效

MAY 28TH, 2014 | COMMENTS

Stopping or restarting the networking job is not supported.
Use ifdown & ifup to reconfigure desired interface.

Ubuntu14.04修改配置,重启网卡没有生效,出现如下问题:

# cat /etc/issue
Ubuntu 14.04 LTS \n \l # service networking restart stop: Job failed while stopping start: Job is already running: networking # tail -f /var/log/upstart/networking.log Stopping or restarting the networking job is not supported. Use ifdown & ifup to reconfigure desired interface. 

从以上日志内容可以看出,传统的service重启和停止网络已经不再支持了,需要通过使用ifdown & ifup来实现相应的操作。

  • 重启指定网卡
# ifdown eth0 && ifup eth0
  • 重启除lo网卡的所有网卡
# ifdown --exclude=lo -a && sudo ifup --exclude=lo -a
  • 配置桥接
# apt-get install bridge-utils
# cat /etc/network/interfaces
auto lo iface lo inet loopback  auto eth0 iface eth0 inet manual  auto br0 iface br0 inet static address 192.168.0.10 netmask 255.255.255.0 gateway 192.168.0.1 bridge_ports eth0 bridge_stp off bridge_fd 0 bridge_maxwait 0 dns-nameservers 192.168.0.1 # ifup br0 # brctl show bridge name bridge id STP enabled interfaces br0 8000.02000a0080e1 no eth0 

–EOF–

 

转载于:https://www.cnblogs.com/Dennis-mi/articles/5241358.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值