配置LACP模式链路聚合

前端之家收集整理的这篇文章主要介绍了配置LACP模式链路聚合前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

组网需求

在两台Router设备上配置LACP模式链路聚合组,提高两设备之间的带宽与可靠性,具体要求如下:

两条活动链路具有负载分担的能力。

两设备间的链路具有一条冗余备份链路,当活动链路出现故障链路时,备份链路替代故障链路,保持数据传输的可靠性。

配置LACP模式链路聚合组网图

wKioL1lzQB2gI1q9AAB1hs5yT2Y740.jpg-wh_50

配置思路

采用如下的思路配置LACP模式链路聚合:

1. 在Router设备上创建Eth-Trunk,配置Eth-Trunk为LACP模式,实现链路聚合功能

2. 将成员接口加入Eth-Trunk。

3. 配置系统优先级,确定主动端,按照主动端设备的接口选择活动接口。

4. 配置活动接口上限阈值,实现保证带宽的情况下提高网络的可靠性。

5. 配置接口优先级,确定活动链路接口,优先级高的接口将被选作活动接口。

操作步骤

创建编号为1的Eth-Trunk,配置它的工作模式为LACP模式

# 配置RouterA。

<Huawei> system-view

[Huawei] sysname RouterA

[RouterA] interface eth-trunk 1

[RouterA-Eth-Trunk1] mode lacp-static

[RouterA-Eth-Trunk1] quit

# 配置RouterB。

<Huawei> system-view

[Huawei] sysname RouterB

[RouterB] interface eth-trunk 1

[RouterB-Eth-Trunk1] mode lacp-static

[RouterB-Eth-Trunk1] quit

将成员接口加入Eth-Trunk

# 配置RouterA。

[RouterA] interface ethernet 2/0/1

[RouterA-Ethernet2/0/1] eth-trunk 1

[RouterA-Ethernet2/0/1] quit

[RouterA] interface ethernet 2/0/2

[RouterA-Ethernet2/0/2] eth-trunk 1

[RouterA-Ethernet2/0/2] quit

[RouterA] interface ethernet 2/0/3

[RouterA-Ethernet2/0/3] eth-trunk 1

[RouterA-Ethernet2/0/3] quit

# 配置RouterB。

[RouterB] interface ethernet 2/0/1

[RouterB-Ethernet2/0/1] eth-trunk 1

[RouterB-Ethernet2/0/1] quit

[RouterB] interface ethernet 2/0/2

[RouterB-Ethernet2/0/2] eth-trunk 1

[RouterB-Ethernet2/0/2] quit

[RouterB] interface ethernet 2/0/3

[RouterB-Ethernet2/0/3] eth-trunk 1

[RouterB-Ethernet2/0/3] quit

在RouterA上配置系统优先级为100,使其成为LACP主动端

[RouterA] lacp priority 100

在RouterA上配置活动接口上限阈值为2

[RouterA] interface eth-trunk 1

[RouterA-Eth-Trunk1] max active-linknumber 2

[RouterA-Eth-Trunk1] quit

在RouterA上配置接口优先级确定活动链路

[RouterA] interface ethernet 2/0/1

[RouterA-Ethernet2/0/1] lacp priority 100

[RouterA-Ethernet2/0/1] quit

[RouterA] interface ethernet 2/0/2

[RouterA-Ethernet2/0/2] lacp priority 100

[RouterA-Ethernet2/0/2] quit

验证配置结果

# 查看各Router设备的Eth-Trunk信息,查看链路是否协商成功。

[RouterA] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SA-XOR-DA
System Priority: 100 System ID: 00e0-fca8-0417
Least Active-linknumber: 1 Max Active-linknumber: 2
Operate status: Up Number Of Up Port In Trunk: 2
------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet2/0/1 Selected 100M 100 6145 2865 11111100 1
Ethernet2/0/2 Selected 100M 100 6146 2865 11111100 1
Ethernet2/0/3 Unselect 100M 32768 6147 2865 11100000 1

Partner:
------------------------------------------------------------------------------
PartnerPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet2/0/1 32768 00e0-fca6-7f85 32768 6145 2609 11111100
Ethernet2/0/2 32768 00e0-fca6-7f85 32768 6146 2609 11111100
Ethernet2/0/3 32768 00e0-fca6-7f85 32768 6147 2609 11110000

[RouterB] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SA-XOR-DA
System Priority: 32768 System ID: 00e0-fca6-7f85
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: Up Number Of Up Port In Trunk: 2
------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet2/0/1 Selected 100M 32768 6145 2609 11111100 1
Ethernet2/0/2 Selected 100M 32768 6146 2609 11111100 1
Ethernet2/0/3 Unselect 100M 32768 6147 2609 11100000 1

Partner:
------------------------------------------------------------------------------
PartnerPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet2/0/1 100 00e0-fca8-0417 100 6145 2865 11111100
Ethernet2/0/2 100 00e0-fca8-0417 100 6146 2865 11111100
Ethernet2/0/3 100 00e0-fca8-0417 32768 6147 2865 11110000

通过以上显示信息可以看到,RouterA的系统优先级为100,高于RouterB的系统优先级。Eth-Trunk的成员接口中Ethernet 2/0/1、Ethernet 2/0/2成为活动接口,处于“Selected”状态,接口Ethernet 2/0/3处于“Unselect”状态,同时实现M条链路的负载分担和N条链路的冗余备份功能

猜你在找的设计模式相关文章