交换机端修改(华三的交换机)
##聚合组
interface Bridge-Aggregation22
description guanli
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 11 1100 to 1120
link-aggregation mode dynamic
#端口配置
interface Ten-GigabitEthernet1/0/22
port link-mode bridge
description Sxxx
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 11 1100 to 1120
port link-aggregation group 22
服务器端修改
#ovs bond 默认是bond1 模式
查看bond1模式
# ovs-appctl bond/show
---- bond2 ----
bond_mode: active-backup
bond may use recirculation: no, Recirc-ID : -1
bond-hash-basis: 0
updelay: 0 ms
downdelay: 0 ms
lacp_status: off
active slave mac: 6c:b3:11:08:d7:28(enp134s0f0)
slave enp134s0f0: enabled
active slave
may_enable: true
slave enp175s0f0: enabled
may_enable: true
##把模式修改lacp bond4 模式
# ovs-vsctl set port bond2 bond_mode=balance-tcp lacp=active
##重启服务
# systemctl restart openvswitch
##确认是否修改完成
# ovs-appctl bond/show
---- bond2 ----
bond_mode: balance-tcp
bond may use recirculation: yes, Recirc-ID : 1
bond-hash-basis: 0
updelay: 0 ms
downdelay: 0 ms
next rebalance: 3550 ms
lacp_status: negotiated
active slave mac: 6c:b3:11:09:06:a8(enp175s0f0)
slave enp134s0f0: enabled
may_enable: true
slave enp175s0f0: enabled
active slave
may_enable: true
###Linux bond1 修改 centos7.6 只需要修改配置文件即可
# cat ifcfg-bond1
DEVICE=bond1
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no
TYPE=Ethernet
USERCTL=no
MTU=1500
BONDING_OPTS="mode=1 miimon=100"
BOOTPROTO=static
IPADDR=172.19.19.19
NETMASK=255.255.255.0
[root@node04 network-scripts]#
##修改成mode4 结构
###Linux bond1 修改
network-scripts]# cat ifcfg-bond1
DEVICE=bond1
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no
TYPE=Ethernet
USERCTL=no
MTU=1500
BONDING_OPTS="mode=4 miimon=100"
BOOTPROTO=static
IPADDR=172.19.19.19
NETMASK=255.255.255.0
重启服务
#systemctl restart network
##查看bond1模式是否修改
# cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
System priority: 65535
System MAC address: 6c:b3:11:09:05:fa
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 2
Actor Key: 15
Partner Key: 1
Partner Mac Address: 14:51:7e:af:1d:01
Slave Interface: enp134s0f1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 6c:b3:11:09:05:fa
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
system priority: 65535
system mac address: 6c:b3:11:09:05:fa
port key: 15
port priority: 255
port number: 1
port state: 61
details partner lacp pdu:
system priority: 32768
system mac address: 14:51:7e:af:1d:01
oper key: 1
port priority: 32768
port number: 4
port state: 61
Slave Interface: enp175s0f1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 6c:b3:11:09:06:aa
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
system priority: 65535
system mac address: 6c:b3:11:09:05:fa
port key: 15
port priority: 255
port number: 2
port state: 61
details partner lacp pdu:
system priority: 32768
system mac address: 14:51:7e:af:1d:01
oper key: 1
port priority: 32768
port number: 3
port state: 61