Quantcast
Channel: 钻戒 and 仁豆米
Viewing all articles
Browse latest Browse all 290

Open vSwitch下LACP做端口绑定bonding

$
0
0

背景:链路聚合(Link Aggregation Control Protocol, or LACP)

Linux下可以多端口Bongding,那么Open vSwitch也是没问题的。

假设我们用得是Dell R730机器,4个网口,捆成一个,dell的网卡名是em1,而不是eth0。

ovs加bonding的命令:

ovs-vsctl add-bond <bridge name> <bond name> <list of interfaces>  

So

ovs-vsctl add-bond ovsbr0 bond0 em1 em2 em3 em4  lacp=active  

注意加了个lcap-active,缺省不激活的,没法用。

查看一下:

ovs-appctl bond/show <bond name>  
ovs-appctl lacp/show <bond name>

bond/show的结果:

# ovs-appctl bond/show bond0
bond_mode: balance-slb  
bond-hash-algorithm: balance-slb  
bond-hash-basis: 0  
updelay: 0 ms  
downdelay: 0 ms  
next rebalance: 6415 ms  
lacp_negotiated: true

slave em4: enabled  
    active slave
    may_enable: true

slave em3: enabled  
    may_enable: true

slave em2: enabled  
    may_enable: true

slave em1: enabled  
    may_enable: true

这样bond就设置好了,链路也聚合了,但是,没完啊,没有地址,大家按以前的方法把bond0的ip和网关设置好即可:

# vi /etc/sysconfig/network-scripts/ifcfg-bond0
-----------
DEVICE=bond0  
DEVICETYPE=ovs  
TYPE=OVSPort  
OVS_BRIDGE=ovsbr0  
BOOTPROTO=none  
NM_CONTROLLED=yes  
IPV6INIT=no  
PEERDNS=no  
ONBOOT=yes  
IPADDR=192.168.56.200  
NETMASK=255.255.255.0  
------

Viewing all articles
Browse latest Browse all 290

Trending Articles