LACP链路聚合模式对接(或替换)指导
LACP链路聚合介绍
由于不同厂商的链路聚合模式和配置各不相同,那么如何在不同厂商设备之间做链路聚合呢?
因为LACP属于公有协议,LACPDU报文一致,所以华为设备能够对接(或替换)支持LACP模式的厂商设备。这里分别给出华为设备与CISCO、H3C、Juniper厂商设备之间通过LACP模式链路聚合对接的情况,如表3-1所示。
厂商 |
对应的LACP链路聚合模式及命令 |
---|---|
华为 |
静态LACP模式 mode lacp-static |
CISCO |
静态LACP模式 channel-group number mode active channel-group number mode passive |
H3C |
动态LACP模式 link-aggregation mode dynamic |
Juniper |
LACP模式 [edit interfaces interface-name aggregated-ether-options] lacp { active; } [edit interfaces interface-name aggregated-ether-options] lacp { passive; } |
典型组网案例
在对接(或替换)时,需要注意设备的链路聚合模式是手动还是LACP,保证两端的模式一致(即手动和手动对接,LACP模式与LACP模式对接)且两端物理接口的数量要保持一致。下面分别给出华为设备通过LACP模式对接(或替换)CISCO、H3C、Juniper厂商设备的示例。
注:以下涉及接口名称的内容只是用作标注,具体接口的名称以实际的设备为准。
案例一:华为设备对接(或替换)CISCO设备
- 组网图图3-1 华为设备对接(或替换)CISCO设备
- 操作步骤
创建链路聚合组,配置LACP模式并将接口加入Eth-Trunk。
# 配置华为设备。
<HUAWEI> system-view [~HUAWEI] interface eth-trunk 1 [*HUAWEI-Eth-Trunk1] mode lacp-static [*HUAWEI-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3 [*HUAWEI-Eth-Trunk1] commit [~HUAWEI-Eth-Trunk1] quit
# 配置CISCO设备。
CISCO#configure terminal CISCO(config)#interface port-channel 1 CISCO(config-if)#exit CISCO(config)#interface range gigabitEthernet 0/1, gigabitEthernet 0/2, gigabitEthernet 0/3 CISCO(config-if-range)#channel-protocol lacp CISCO(config-if-range)#channel-group 1 mode active CISCO(config-if-range)#exit CISCO(config)#exit
查看配置结果。
# 查看华为设备。
[~HUAWEI] display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 Working Mode: Static Preempt Delay: Disabled Hash Arithmetic: profile default System Priority: 32768 System ID: 0025-9e95-7c31 Least Active-linknumber: 1 Max Active-linknumber: 32 Operating Status: up Number Of Up Ports In Trunk: 3 Timeout Period: Slow -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight 10GE1/0/1 Selected 1GE 32768 1 20289 10111100 1 10GE1/0/2 Selected 1GE 32768 2 20289 10111100 1 10GE1/0/3 Selected 1GE 32768 3 20289 10100000 1 Partner: -------------------------------------------------------------------------------- ActorPortName SysPri SystemID PortPri PortNo PortKey PortState 10GE1/0/1 32768 0025-9e95-7c11 32768 0 20289 10111100 10GE1/0/2 32768 0025-9e95-7c11 32768 0 20289 10111100 10GE1/0/3 32768 0025-9e95-7c11 32768 0 20289 10100000
# 查看CISCO设备。
CISCO#show etherchannel 1 port-channel Port-channels in the group: --------------------------- Port-channel: Po1 (Primary Aggregator) ------------ Age of the Port-channel = 0d:05h:03m:48s Logical slot/port = 2/1 Number of ports = 3 HotStandBy port =null Port state = Port-channel Ag-Inuse Protocol = LACP Port security = Disabled Ports in the Port-channel: Index Load Port EC state No of bits ------+-------------+-----------+----------------------------------------------- 0 00 Gi0/1 Active 0 0 00 Gi0/2 Active 0 0 00 Gi0/3 Active 0 Time since last port bundled: 0d:00h:44m:09s Gi0/3 Time since last port Un-bundled: 0d:00h:44m:13s Gi0/3
- 配置文件摘要
- CISCO设备:略。
- 华为设备:
# interface Eth-Trunk1 mode lacp-static # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # interface 10GE1/0/3 eth-trunk 1 # return
案例二:华为设备对接(或替换)H3C设备
- 网络拓扑图3-2 华为设备对接(或替换)H3C设备
- 操作步骤
创建链路聚合组,配置LACP模式并将接口加入Eth-Trunk。
# 配置华为设备。
<HUAWEI> system-view [~HUAWEI] interface eth-trunk 1 [*HUAWEI-Eth-Trunk1] mode lacp-static [*HUAWEI-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3 [*HUAWEI-Eth-Trunk1] commit [~HUAWEI-Eth-Trunk1] quit
# 配置H3C设备。
<H3C> system-view [H3C] interface bridge-aggregation 1 [H3C-Bridge-Aggregation1] link-aggregation mode dynamic [H3C-Bridge-Aggregation1] quit [H3C] interface GigabitEthernet 1/0/1 [H3C-GigabitEthernet1/0/1] port link-aggregation group 1 [H3C-GigabitEthernet1/0/1] quit [H3C] interface GigabitEthernet 1/0/2 [H3C-GigabitEthernet1/0/2] port link-aggregation group 1 [H3C-GigabitEthernet1/0/2] quit [H3C] interface GigabitEthernet 1/0/3 [H3C-GigabitEthernet1/0/3] port link-aggregation group 1 [H3C-GigabitEthernet1/0/3] quit
查看配置结果。
# 查看华为设备。
[~HUAWEI] display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 Working Mode: Static Preempt Delay: Disabled Hash Arithmetic: profile default System Priority: 32768 System ID: 0025-9e95-7c31 Least Active-linknumber: 1 Max Active-linknumber: 32 Operating Status: up Number Of Up Ports In Trunk: 3 Timeout Period: Slow -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight 10GE1/0/1 Selected 1GE 32768 1 20289 10111100 1 10GE1/0/2 Selected 1GE 32768 2 20289 10111100 1 10GE1/0/3 Selected 1GE 32768 3 20289 10100000 1 Partner: -------------------------------------------------------------------------------- ActorPortName SysPri SystemID PortPri PortNo PortKey PortState 10GE1/0/1 32768 000f-e267-6c6a 32768 1 20289 10111100 10GE1/0/2 32768 000f-e267-6c6a 32768 2 20289 10111100 10GE1/0/3 32768 000f-e267-6c6a 32768 3 20289 10100000
# 查看H3C设备。
[H3C] display link-aggregation verbose bridge-aggregation 1 Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing Port Status: S -- Selected, U -- Unselected, I -- Individual Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, D -- Synchronization, E -- Collecting, F -- Distributing, G -- Defaulted, H -- Expired Aggregate Interface: Bridge-Aggregation1 Aggregation Mode: Dynamic Loadsharing Type: Shar System ID: 0x8000, 000f-e267-6c6a Local: Port Status Priority Oper-Key Flag -------------------------------------------------------------------------------- GE1/0/1 S 32768 2 {ACDEF} GE1/0/2 S 32768 2 {ACDEF} GE1/0/3 S 32768 2 {ACDEF} Remote: Actor Partner Priority Oper-Key SystemID Flag -------------------------------------------------------------------------------- GE1/0/1 1 32768 2 0x8000, 0025-9e95-7c31 {ACDEF} GE1/0/2 2 32768 2 0x8000, 0025-9e95-7c31 {ACDEF} GE1/0/3 3 32768 2 0x8000, 0025-9e95-7c31 {ACDEF}
- 配置文件摘要
- H3C设备:略。
- 华为设备:
# interface Eth-Trunk1 mode lacp-static # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # interface 10GE1/0/3 eth-trunk 1 # return
案例三:华为设备对接(或替换)Juniper设备
- 网络拓扑图3-3 华为设备对接(或替换)Juniper设备
- 操作步骤
创建链路聚合组,配置LACP模式并将接口加入Eth-Trunk。
# 配置华为设备。
<HUAWEI> system-view [~HUAWEI] interface eth-trunk 1 [*HUAWEI-Eth-Trunk1] mode lacp-static [*HUAWEI-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3 [*HUAWEI-Eth-Trunk1] commit [~HUAWEI-Eth-Trunk1] quit
# 配置Juniper设备。
[edit interfaces] ge--1/0/1 { ether-options { 802.3ad ae0; } } ge--1/0/2 { ether-options { 802.3ad ae0; } } ge--1/0/3 { ether-options { 802.3ad ae0; } } ae0 { aggregated-ether-options { lacp { active; } } }
查看配置结果。
# 查看华为设备。
[~HUAWEI] display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 Working Mode: Static Preempt Delay: Disabled Hash Arithmetic: profile default System Priority: 32768 System ID: 0025-9e95-7c31 Least Active-linknumber: 1 Max Active-linknumber: 32 Operating Status: up Number Of Up Ports In Trunk: 3 Timeout Period: Slow -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight 10GE1/0/1 Selected 1GE 32768 1 20289 10111100 1 10GE1/0/2 Selected 1GE 32768 2 20289 10111100 1 10GE1/0/3 Selected 1GE 32768 3 20289 10100000 1 Partner: -------------------------------------------------------------------------------- ActorPortName SysPri SystemID PortPri PortNo PortKey PortState 10GE1/0/1 32768 0025-9e95-7c11 32768 1 20289 10111100 10GE1/0/2 32768 0025-9e95-7c11 32768 2 20289 10111100 10GE1/0/3 32768 0025-9e95-7c11 32768 3 20289 10100000
# 查看Juniper设备。
<root> show interface ae0 Physical interface: ae0, Enable, Physical link is Up Interface index: 129, SNMP ifIndex: 601 Link-level type: Ethernet. MTU: 1514, Speed: 20Gbps, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Disable, Minimum Links needed: 1, Minimum bandwidth needed: 0 Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x0 Current address: 78:fe:3d:e4:25:00, Harfware address: 78:fe:3d:e4:25:00 Last flapped : 2011-06-29 13:06:52 UTC (00:27:39 ago) Input rate : 2032 bps (0 pps) Output rate : 0 bps (0 pps) Logical interface ae0.0 (Index 67) (SNMP ifIndex 602) Flags: SNMP-Traps 0x0 Encapsulation: ENET2 Statistics Packets pps Bytes bps Bundle: Input : 0 0 0 0 Output: 2172 0 231733 0 Protocol eth-switch Flags: Is-Primary
- 配置文件摘要
- Juniper设备:略。
- 华为设备:
# interface Eth-Trunk1 mode lacp-static # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # interface 10GE1/0/3 eth-trunk 1 # return