端口汇聚是将多个以太网端口汇聚在一起形成一个逻辑上的汇聚组,使用汇聚服务的上层实体把同一汇聚组内的多条物理链路视为一条逻辑链路。
端口汇聚可以实现流量在汇聚组中各个成员端口之间进行分担,以增加带宽。同时,同一汇聚组的各个成员端口之间彼此动态备份,提高了连接可靠性。
基于IEEE802.3ad标准的LACP(Link Aggregation Control Protocol,链路汇聚控制协议)是一种实现链路动态汇聚与解汇聚的协议。LACP协议通过LACPDU(Link Aggregation Control Protocol Data Unit,链路汇聚控制协议数据单元)与对端交互信息。
启动某端口的LACP协议后,该端口将通过发送LACPDU向对端通告自己的系统优先级、系统MAC、端口优先级、端口号和操作Key。对端接收到这些信息后,将这些信息与其它端口所保存的信息比较以选择能够汇聚的端口,从而双方可以对端口加入或退出某个动态汇聚组达成一致。
按照汇聚方式的不同,端口汇聚可以分为三类:手工汇聚、静态LACP汇聚、动态LACP汇聚。
实验环境:两台H3C E126A,Ethernet1/0/24、Ethernet1/0/23汇聚为一条链路。
手工汇聚:
第一台交换机的配置:
[H3CA]link-aggregation group 10 mode manual
[H3CA]interface ethernet 1/0/24
[H3CA-Ethernet1/0/24]port link-aggregation group 10
Can not specify a loopback-detection enable port as aggregation group member !
[H3CA-Ethernet1/0/24]undo loopback-detection enable //关闭掉lookback-detection功能
[H3CA-Ethernet1/0/24]port link-aggregation group 10
[H3CA-Ethernet1/0/24]
[H3CA]interface ethernet1/0/23
[H3CA-Ethernet1/0/23]undo loopback-detection enable
[H3CA-Ethernet1/0/23]port link-aggregation group 10
[H3CA-Ethernet1/0/23]
第二台交换机的配置:
[H3CB]link-aggregation group 10 mode manual
[H3CB]interface ethernet1/0/24
[H3CB-Ethernet1/0/24]undo loopback-detection enable
[H3CB-Ethernet1/0/24]port link-aggregation group 10
[H3CB-Ethernet1/0/24]interface ethernet1/0/23
[H3CB-Ethernet1/0/23]undo loopback-detection enable
[H3CB-Ethernet1/0/23]port link-aggregation group 10
[H3CB-Ethernet1/0/23]
显示相关信息:
[H3CB]display link-aggregation summary //显示摘要信息
Aggregation Group Type -- Dynamic, S -- Static , M -- Manual
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Actor ID: 0x8000, 000f-e2a8-2def
AL AL Partner ID Select Unselect Share Master
ID Type Ports Ports Type Port
--------------------------------------------------------------------------------
10 M none 2 0 Shar Ethernet1/0/23
[H3CB]
[H3CB]display link-aggregation interface ethernet1/0/24 //显示接口信息
Ethernet1/0/24:
Selected AggID: 10
Local:
Port-Priority: 32768, Oper key: 1, Flag: 0x00
Remote:
System ID: 0x0, 0000-0000-0000
Port Number: 0, Port-Priority: 0 , Oper-key: 0, Flag: 0x00
[H3CB]display link-aggregation interface ethernet1/0/23
Ethernet1/0/23:
Selected AggID: 10
Local:
Port-Priority: 32768, Oper key: 1, Flag: 0x00
Remote:
System ID: 0x0, 0000-0000-0000
Port Number: 0, Port-Priority: 0 , Oper-key: 0, Flag: 0x00
[H3CB]
[H3CB]display link-aggregation verbose //显示详细信息
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Flags: A -- LACP_Activity, B -- LACP_timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregation ID: 10, AggregationType: Manual, Loadsharing Type: Shar
Aggregation Description:
System ID: 0x8000, 000f-e2a8-2def
Port Status: S -- Selected, U -- Unselected
Local:
Port Status Priority Key Flag
--------------------------------------------------------------------------------
Ethernet1/0/23 S 32768 1 {}
Ethernet1/0/24 S 32768 1 {}
Remote:
Actor Partner Priority Key SystemID Fla
g
--------------------------------------------------------------------------------
Ethernet1/0/23 0 0 0 0x0000,0000-0000-0000 {}
Ethernet1/0/24 0 0 0 0x0000,0000-0000-0000 {}
[H3CB]
LACP静态配置及显示信息:
[H3CA]link-aggregation group 10 mode static
[H3CA]interface ethernet1/0/24
[H3CA-Ethernet1/0/24]port link-aggregation group 10
Can not specify a loopback-detection enable port as aggregation group member !
[H3CA-Ethernet1/0/24]undo loopback-detection enable
[H3CA-Ethernet1/0/24]port link-aggregation group 10
%Apr 1 23:58:48:162 2000 H3CA LAGG/3/PartnerNoLacp:- 1 -LACP is not enabled on
the remote end of port Ethernet
[H3CA-Ethernet1/0/24]interface ethernet1/0/23
[H3CA-Ethernet1/0/23]undo loopback-detection enable
[H3CA-Ethernet1/0/23]port link-aggregation group 10
[H3CA-Ethernet1/0/23]
%Apr 1 23:59:52:016 2000 H3CA LAGG/3/PartnerNoLacp:- 1 -LACP is not enabled on
the remote end of port Ethernet1/0/23.
[H3CA-Ethernet1/0/23]
[H3CB]link-aggregation group 10 mode static
[H3CB]interface ethernet1/0/24
[H3CB-Ethernet1/0/24]undo loopback-detection enable
[H3CB-Ethernet1/0/24]port link-aggregation group 10
[H3CB-Ethernet1/0/24]interface ethernet1/0/23
[H3CB-Ethernet1/0/23]undo loopback-detection enable
[H3CB-Ethernet1/0/23]port link-aggregation group 10
[H3CB-Ethernet1/0/23]quit
[H3CB]
[H3CA-Ethernet1/0/23]display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Flags: A -- LACP_Activity, B -- LACP_timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregation ID: 10, AggregationType: Static, Loadsharing Type: Shar
Aggregation Description:
System ID: 0x8000, 000f-e286-97be
Port Status: S -- Selected, U -- Unselected
Local:
Port Status Priority Key Flag
--------------------------------------------------------------------------------
Ethernet1/0/23 S 32768 1 {ACDEF}
Ethernet1/0/24 S 32768 1 {ACDEF}
Remote:
Actor Partner Priority Key SystemID Fla
g
--------------------------------------------------------------------------------
Ethernet1/0/23 23 32768 1 0x8000,000f-e2a8-2def {ACDEF}
Ethernet1/0/24 24 32768 1 0x8000,000f-e2a8-2def {ACDEF}
[H3CA-Ethernet1/0/23]
[H3CA]display link-aggregation summary
Aggregation Group Type -- Dynamic, S -- Static , M -- Manual
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Actor ID: 0x8000, 000f-e286-97be
AL AL Partner ID Select Unselect Share Master
ID Type Ports Ports Type Port
--------------------------------------------------------------------------------
10 S 0x8000,000f-e2a8-2def 2 0 Shar Ethernet1/0/23
[H3CA]display link-aggregation interface ethernet1/0/24
Ethernet1/0/24:
Selected AggID: 10
Local:
Port-Priority: 32768, Oper key: 1, Flag: 0x3d
Remote:
System ID: 0x8000, 000f-e2a8-2def
Port Number: 24, Port-Priority: 32768 , Oper-key: 1, Flag: 0x3d
Received LACP Packets: 16 packet(s), Illegal: 0 packet(s)
Sent LACP Packets: 28 packet(s)
[H3CA]
LACP动态配置:
[H3CA]interface ethernet1/0/24
[H3CA-Ethernet1/0/24]lacp enable
Can not specify a loopback-detection enable port as aggregation group member !
[H3CA-Ethernet1/0/24]undo loopback-detection enable
[H3CA-Ethernet1/0/24]lacp enable
[H3CA-Ethernet1/0/24]quit
%Apr 1 23:58:42:156 2000 H3CA LAGG/3/PartnerNoLacp:- 1 -LACP is not enabled on
the remote end of port Ethernet1/0/24.
[H3CA]interface ethernet1/0/23
[H3CA-Ethernet1/0/23]undo loopback-detection enable
[H3CA-Ethernet1/0/23]lacp enable
[H3CA-Ethernet1/0/23]
%Apr 1 23:59:27:689 2000 H3CA LAGG/3/PartnerNoLacp:- 1 -LACP is not enabled on
the remote end of port Ethernet1/0/23.
[H3CA-Ethernet1/0/23]
[H3CB]interface ethernet1/0/24
[H3CB-Ethernet1/0/24]undo loopback-detection enable
[H3CB-Ethernet1/0/24]lacp enable
[H3CB-Ethernet1/0/24]interface ethernet1/0/23
[H3CB-Ethernet1/0/23]undo loopback-detection enable
[H3CB-Ethernet1/0/23]lacp enable
[H3CB-Ethernet1/0/23]quit
配置关键点:
1.同一个汇聚组中端口的基本配置必须保持一致,基本配置主要包括STP、QoS、VLAN、端口属性等相关配置;
2.对于端口环回监测(loopback-detection)特性的相关命令和端口汇聚的相关命令,不能同时配置;
3.对于配置了mac-address max-mac-count命令的端口,不能加入到汇聚组中;反之,对于已经加入到某个汇聚组中的端口,也不能再配置mac-address max-mac-count命令;
4.对于使能了MAC地址认证或802.1x的端口,不能加入到汇聚组中;
5.对于镜像目的端口、远程镜象反射端口、不能加入到汇聚组中;
6.对于配置了黑洞MAC地址、静态MAC地址或配置了静态ARP的端口,不能加入到汇聚组中;
7.对于配置了MAC地址和IP地址绑定的端口,不能加入到汇聚组中;
8.对于已经配置了端口安全(Port-Sercurity)特性相关命令的端口,不能加入到汇聚组中
转载于:https://blog.51cto.com/wenjia111/1954452