ubuntu 14下的多网卡绑定配置

oreax 发布于 2015/06/25 21:21
阅读 4K+
收藏 1

ubuntu 14.04 lts server,有多个网卡(4块网卡,2块插了网线),安装搜索的各种教程配置绑定:

auto lo
iface lo inet loopback
 
auto em2
iface em2 inet static
 address 172.16.1.1
 netmask 255.255.255.0
 
 auto em5
 iface em5 inet static
 address 172.16.1.2
 netmask 255.255.255.0
 
 iface bond0 inet static
 address 172.16.1.11
 netmask 255.255.255.0
 network 172.16.1.0
 broadcast 172.16.1.255
 gateway 172.16.1.254
 dns-nameservers 8.8.8.8
 up ifenslave bond0 em2 em5
 down ifenslave -d bond0 em2 em5



重启后发现172.16.1.11,bond0不通
而em2和em5各自是通的(172.16.1.1和2都是通的)
然后cat之后发现MII是down的:

cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: load balancing (round-robin)
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0



请问回事什么原因?如何绑定多块网卡?
加载中
0
Feng_Yu
Feng_Yu

上面没加auto啊,我记得auto是开机自动唤醒网卡的。你可以man手册看看,很长时间没配这个记不太清了。

另外可以试试sudo ifconfig bond0 up看看是否能启动这块网卡

0
oreax
oreax

感谢!

果然是少了auto!

返回顶部
顶部