| 场景 | 服务器双上联、数据库/存储节点高可用 |
|---|---|
| 适用 | 服务器 + 交换机 |
| 命令族 | mode lacp-static / channel-group mode active / link-aggregation mode dynamic(对 bond 802.3ad) |
华为 VRP
华为 VRP
[Huawei] interface Eth-Trunk 20
[Huawei-Eth-Trunk20] mode lacp-static
[Huawei-Eth-Trunk20] load-balance src-dst-ip
[Huawei-GigabitEthernet0/0/23] eth-trunk 20
[Huawei-GigabitEthernet0/0/24] eth-trunk 20思科 IOS
思科 IOS
SW-A(config)# interface range GigabitEthernet1/0/23-24
SW-A(config-if-range)# channel-group 20 mode active
SW-A(config)# port-channel load-balance src-dst-ip
SW-A# show etherchannel 20 summaryH3C Comware
H3C Comware
[H3C] interface Bridge-Aggregation 20
[H3C-Bridge-Aggregation20] link-aggregation mode dynamic
[H3C-GigabitEthernet1/0/23] port link-aggregation group 20
[H3C-GigabitEthernet1/0/24] port link-aggregation group 20服务器侧(Linux 示例)
服务器侧(Linux 示例)
# bonding 模式 4 = 802.3ad,与交换机 LACP 对应
ip link add bond0 type bond mode 802.3ad miimon 100 lacp_rate fast
ip link set eth0 down && ip link set eth0 master bond0
ip link set eth1 down && ip link set eth1 master bond0
cat /proc/net/bonding/bond0 # 查看成员状态与 LACP 信息对接速查:交换机 LACP(active/lacp-static/dynamic)↔ Linux bond mode 4(802.3ad);交换机静态 ↔ bond mode 0/1(双端匹配)。服务器网卡最好两端都接交换机同一聚合组,链路两端 Up 后再看 bond 内成员是否都为 up。