跨境派

跨境派

跨境派,专注跨境行业新闻资讯、跨境电商知识分享!

当前位置:首页 > 跨境风云 > 华为ensp中链路聚合两种(lacp-static)模式配置方法

华为ensp中链路聚合两种(lacp-static)模式配置方法

时间:2024-04-28 13:20:21 来源:网络cs 作者:淼淼 栏目:跨境风云 阅读:

标签: 模式  配置  方法  聚合 
阅读本书更多章节>>>>

作者主页:点击!

ENSP专栏:点击!

创作时间:2024年4月26日11点54分


链路聚合(Link Aggregation),又称为端口聚合(Port Trunking),是一种将多条物理链路聚合成一条逻辑链路的技术。它可以提高网络带宽、增强网络冗余性和改善网络负载均衡。

链路聚合的作用

提高网络带宽

链路聚合可以将多条物理链路的带宽叠加起来,从而提供更高的带宽。例如,将两条 1 Gbps 的物理链路聚合在一起,可以提供 2 Gbps 的带宽。

增强网络冗余性

如果一条或多条物理链路出现故障,链路聚合可以将流量自动切换到其他正常的链路上,从而保证网络的正常运行。

改善网络负载均衡

链路聚合可以将流量在多条物理链路上进行均衡分配,从而提高网络的整体性能。

使用场景

需要高带宽的网络,例如服务器集群、数据中心等。需要高可靠性的网络,例如金融机构、医疗机构等。需要负载均衡的网络,例如大型企业网络、ISP 网络等。

手动模式配置

实验拓扑

LSW1基本配置

<Huawei>sysEnter system view, return user view with Ctrl+Z.[Huawei]un in enInfo: Information center is disabled.[Huawei]int eth-trunk 10[Huawei-Eth-Trunk10]trunk[Huawei-Eth-Trunk10]trunkport g 0/0/1 to 0/0/3Info: This operation may take a few seconds. Please wait for a moment...done.[Huawei-Eth-Trunk10]port link-type trunk[Huawei-Eth-Trunk10]port trunk allow-pass vlan all[Huawei-Eth-Trunk10]q

int eth-trunk 10 :进入Eth-Trunk 10的接口配置模式。

trunk :在Eth-Trunk 10接口上启用Trunk模式。这实质上是将其从一组单独的物理链路转换为单个逻辑链路。

trunkport g 0/0/1 to 0/0/3 :此命令将千兆以太网接口 g 0/0/1 至 g 0/0/3 添加为 Eth-Trunk 10 的成员接口。流量现在将分布在这些物理链路上。

port link-type trunk :设置Eth-Trunk 10的链路类型为trunk。这可确保交换机将其视为单个逻辑链路。

port trunk allow-pass vlan all :允许所有VLAN通过Eth-Trunk 10。默认情况下,Eth-Trunk只允许带标签的VLAN。此命令在 Eth-Trunk 上启用标记和未标记的 VLAN 流量。

配置完成之后查看链路聚合

[Huawei]dis eth-trunk Eth-Trunk10's state information is:WorkingMode: NORMAL         Hash arithmetic: According to SIP-XOR-DIP         Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8              Operate status: up          Number Of Up Port In Trunk: 3                     --------------------------------------------------------------------------------PortName                      Status      Weight GigabitEthernet0/0/1          Up          1      GigabitEthernet0/0/2          Up          1      GigabitEthernet0/0/3          Up          1      
Eth-Trunk10的状态信息为: 该行表示Eth-Trunk 10的以下信息。工作模式:NORMAL:表示Eth-Trunk 10工作在正常模式,这是理想的情况。哈希算法:根据 SIP-XOR-DIP:这指定用于跨成员接口负载平衡流量的哈希算法。在这种情况下,它使用源 IP (SIP) 地址与目标 IP (DIP) 地址进行异或。最少活动链路数:1:此时此值可能不相关。它可能表示与负载均衡的最小活动链路数相关的设置,但具体含义取决于交换机型号。Max Bandwidth-affected-linknumber: 8:这可能是指可以贡献 Eth-Trunk 整体带宽的成员接口的最大数量。它设置为 8,这可能是交换机型号支持的最大值。运行状态: up:这是个好消息!它确认 Eth-Trunk 10 正在运行并且可以承载流量。Number Of Up Port In Trunk: 3:这表示可能配置的成员接口中有 3 个当前已启动并参与 Eth-Trunk。

LSW2的基本配置

<Huawei>sysEnter system view, return user view with Ctrl+Z.[Huawei]un in enInfo: Information center is disabled.[Huawei]int Eth-Trunk 10[Huawei-Eth-Trunk10]trunkport g 0/0/1 to 0/0/3Info: This operation may take a few seconds. Please wait for a moment...done.[Huawei-Eth-Trunk10]port link-type trunk [Huawei-Eth-Trunk10]port trunk allow-pass vlan all[Huawei-Eth-Trunk10]q[Huawei]q

查看链路聚合

<Huawei>dis eth-trunk Eth-Trunk10's state information is:WorkingMode: NORMAL         Hash arithmetic: According to SIP-XOR-DIP         Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8              Operate status: up          Number Of Up Port In Trunk: 3                     --------------------------------------------------------------------------------PortName                      Status      Weight GigabitEthernet0/0/1          Up          1      GigabitEthernet0/0/2          Up          1      GigabitEthernet0/0/3

自动模式配置

实验拓扑

LSW3的基本配置

<Huawei>sysEnter system view, return user view with Ctrl+Z.[Huawei]un in enInfo: Information center is disabled.[Huawei]int eth[Huawei]int Eth-Trunk 10[Huawei-Eth-Trunk10]mode lacp-static [Huawei-Eth-Trunk10]load-balance dst-mac [Huawei-Eth-Trunk10]trunkport g 0/0/1 to 0/0/3Info: This operation may take a few seconds. Please wait for a moment...done.[Huawei-Eth-Trunk10]q

mode lacp-static :这会将链路聚合控制协议 (LACP) 模式设置为静态。静态LACP模式下,交换机手动捆绑指定的成员接口,无需与其他设备协商。

load-balance dst-mac :配置Eth-Trunk使用目的MAC地址对成员接口之间的流量进行负载均衡。数据包将根据目的 MAC 地址进行哈希处理,结果值将决定数据包通过哪个成员接口发送。

trunkport g 0/0/1 to 0/0/3 :此命令将千兆以太网接口 g 0/0/1 至 g 0/0/3 添加为 Eth-Trunk 10 的成员接口。现在流量将根据目标 MAC 在这些物理链路上分配每个数据包的地址。

<Huawei>dis eth-trunk Eth-Trunk10's state information is:Local:LAG ID: 10                  WorkingMode: STATIC                               Preempt Delay: Disabled     Hash arithmetic: According to DA                  System Priority: 32768      System ID: 4c1f-cce1-2e0a                         Least Active-linknumber: 1  Max Active-linknumber: 8                          Operate status: up          Number Of Up Port In Trunk: 3                     --------------------------------------------------------------------------------ActorPortName          Status   PortType PortPri PortNo PortKey PortState WeightGigabitEthernet0/0/1   Selected 1GE      32768   2      2609    10111100  1     GigabitEthernet0/0/2   Selected 1GE      32768   3      2609    10111100  1     GigabitEthernet0/0/3   Selected 1GE      32768   4      2609    10111100  1     Partner:--------------------------------------------------------------------------------ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortStateGigabitEthernet0/0/1   32768    4c1f-cc09-06f6  32768   2      2609    10111100GigabitEthernet0/0/2   32768    4c1f-cc09-06f6  32768   3      2609    10111100GigabitEthernet0/0/3   32768    4c1f-cc09-06f6  32768   4      2609    10111100

LSW4的配置命令

<Huawei>sysEnter system view, return user view with Ctrl+Z.[Huawei]un in enInfo: Information center is disabled.[Huawei]int e[Huawei]int Eth-Trunk 10[Huawei-Eth-Trunk10]mode lacp-static [Huawei-Eth-Trunk10]load-balance dst-mac [Huawei-Eth-Trunk10]trunkport g 0/0/1 to 0/0/3Info: This operation may take a few seconds. Please wait for a moment...done.[Huawei-Eth-Trunk10]q
[Huawei]dis eth-trunk Eth-Trunk10's state information is:Local:LAG ID: 10                  WorkingMode: STATIC                               Preempt Delay: Disabled     Hash arithmetic: According to DA                  System Priority: 32768      System ID: 4c1f-cc09-06f6                         Least Active-linknumber: 1  Max Active-linknumber: 8                          Operate status: down        Number Of Up Port In Trunk: 0                     --------------------------------------------------------------------------------ActorPortName          Status   PortType PortPri PortNo PortKey PortState WeightGigabitEthernet0/0/1   Unselect 1GE      32768   2      2609    10100010  1     GigabitEthernet0/0/2   Unselect 1GE      32768   3      2609    10100010  1     GigabitEthernet0/0/3   Unselect 1GE      32768   4      2609    10100010  1     Partner:--------------------------------------------------------------------------------ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortStateGigabitEthernet0/0/1   0        0000-0000-0000  0       0      0       10100011GigabitEthernet0/0/2   0        0000-0000-0000  0       0      0       10100011GigabitEthernet0/0/3   0        0000-0000-0000  0       0      0       10100011

阅读本书更多章节>>>>

本文链接:https://www.kjpai.cn/fengyun/2024-04-28/163230.html,文章来源:网络cs,作者:淼淼,版权归作者所有,如需转载请注明来源和作者,否则将追究法律责任!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。

文章评论