• 【技术分享】配置手工模式链路聚合(交换机之间直连)


    组网图形

    手工模式链路聚合简介

    以太⽹链路聚合是指将多条以太⽹物理链路捆绑在⼀起成为⼀条逻辑链路,从⽽实现增加链路带宽的⽬的。链路聚合分为⼿⼯模式和LACP模式。

    ⼿⼯模式下,Eth-Trunk的建⽴、成员接⼝的加⼊由⼿⼯配置,没有链路聚合控制协议LACP的参与。当需要在两个直连设备间提供⼀个较⼤的链路带宽⽽设备⼜不⽀持LACP协议时,可以使⽤⼿⼯模式。⼿⼯模式可以实现增加带宽、提⾼可靠性、负载分担的⽬的。

    ⼿⼯模式下,所有的活动链路都参与数据转发并分担流量。

    配置注意事项

    • ⼀个Eth-Trunk接⼝中的成员接⼝必须是以太⽹类型和速率相同的接⼝。

    • Eth-Trunk链路两端相连的物理接⼝的数量、速率、双⼯⽅式、流控配置必须⼀致。

    • 如果本端设备接⼝加⼊了Eth-Trunk,与该接⼝直连的对端接⼝也必须加⼊Eth-Trunk,两端才能正常通信。

    • 两台设备对接时需要保证两端设备上链路聚合的模式⼀致。

    • 本举例适⽤于S系列交换机所有产品的所有版本。

    组网需求

    如图1所示,SwitchA和SwitchB通过以太链路分别都连接VLAN10和VLAN20的⽹络,且SwitchA和SwitchB之间有较⼤的数据流量。

    ⽤户希望SwitchA和SwitchB之间能够提供较⼤的链路带宽来使相同VLAN间互相通信。同时⽤户也希望能够提供⼀定的冗余度,保证数据传输和链路的可靠性。

    配置思路

    采⽤如下的思路配置⼿⼯模式链路聚合:

    1. 创建Eth-Trunk接⼝并加⼊成员接⼝,实现增加链路带宽。

    2. 创建VLAN并将接⼝加⼊VLAN。

    3. 配置负载分担⽅式,实现流量在Eth-Trunk各成员接⼝间的负载分担,增加可靠性。

    操作步骤

    1.在SwitchA和SwitchB上创建Eth-Trunk接⼝并加⼊成员接⼝

    1. system-view
    2. [HUAWEI] sysname SwitchA
    3. [SwitchA] interface eth-trunk 1 //创建ID为1的Eth-Trunk接⼝
    4. [SwitchA-Eth-Trunk1] trunkport gigabitethernet 1/0/1 to 1/0/3 //在Eth-Trunk1接⼝中加⼊
    5. GE1/0/1到GE1/0/3三个成员接⼝
    6. [SwitchA-Eth-Trunk1] quit
    7. system-view
    8. [HUAWEI] sysname SwitchB
    9. [SwitchB] interface eth-trunk 1 //创建ID为1的Eth-Trunk接⼝
    10. [SwitchB-Eth-Trunk1] trunkport gigabitethernet 1/0/1 to 1/0/3 //在Eth-Trunk1接⼝中加⼊
    11. GE1/0/1到GE1/0/3三个成员接⼝
    12. [SwitchB-Eth-Trunk1] quit

    2.创建VLAN并将接⼝加⼊VLAN

    创建VLAN10和VLAN20并分别加⼊接⼝。SwitchB的配置与SwitchA类似,不再赘述。

    1. [SwitchA] vlan batch 10 20
    2. [SwitchA] interface gigabitethernet 1/0/4
    3. [SwitchA-GigabitEthernet1/0/4] port link-type trunk //设置接⼝链路类型为trunk,接⼝缺省链路类
    4. 型不是trunk⼝
    5. [SwitchA-GigabitEthernet1/0/4] port trunk allow-pass vlan 10
    6. [SwitchA-GigabitEthernet1/0/4] quit
    7. [SwitchA] interface gigabitethernet 1/0/5
    8. [SwitchA-GigabitEthernet1/0/5] port link-type trunk //设置接⼝链路类型为trunk,接⼝缺省链路类
    9. 型不是trunk⼝
    10. [SwitchA-GigabitEthernet1/0/5] port trunk allow-pass vlan 20
    11. [SwitchA-GigabitEthernet1/0/5] quit

    配置Eth-Trunk1接⼝允许VLAN10和VLAN20通过。SwitchB的配置与SwitchA类似,不再赘述。

    1. [SwitchA] interface eth-trunk 1
    2. [SwitchA-Eth-Trunk1] port link-type trunk //设置接⼝链路类型为trunk,接⼝缺省链路类型不是
    3. trunk⼝
    4. [SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20
    5. [SwitchA-Eth-Trunk1] quit

    3.配置Eth-Trunk1的负载分担⽅式。SwitchB的配置与SwitchA类似,不再赘述。

    1. [SwitchA] interface eth-trunk 1
    2. [SwitchA-Eth-Trunk1] load-balance src-dst-mac //配置Eth-Trunk1基于源MAC地址与⽬的MAC地
    3. 址进⾏负载分担
    4. [SwitchA-Eth-Trunk1] quit

    4.验证配置结果

    在任意视图下执⾏display eth-trunk 1命令,检查Eth-Trunk是否创建成功,及成员接⼝是否正确加⼊。

    1. [SwitchA] display eth-trunk 1
    2. Eth-Trunk1's state information is:
    3. WorkingMode: NORMAL Hash arithmetic: According to SA-XOR-DA
    4. Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
    5. Operate status: up Number Of Up Port In Trunk: 3
    6. PortName Status Weight
    7. GigabitEthernet1/0/1 Up 1
    8. GigabitEthernet1/0/2 Up 1
    9. GigabitEthernet1/0/3 Up 1

    从以上信息看出Eth-Trunk 1中包含3个成员接⼝GigabitEthernet1/0/1、GigabitEthernet1/0/2和GigabitEthernet1/0/3,成员接⼝的状态都为Up。Eth-Trunk 1的“Operate status”为up。

    配置文件

    SwitchA的配置⽂件

    1. sysname SwitchA
    2. vlan batch 10 20
    3. interface Eth-Trunk1
    4. port link-type trunk
    5. port trunk allow-pass vlan 10 20
    6. load-balance src-dst-mac
    7. interface GigabitEthernet1/0/1
    8. eth-trunk 1
    9. interface GigabitEthernet1/0/2
    10. eth-trunk 1
    11. interface GigabitEthernet1/0/3
    12. eth-trunk 1
    13. interface GigabitEthernet1/0/4
    14. port link-type trunk
    15. port trunk allow-pass vlan 10
    16. interface GigabitEthernet1/0/5
    17. port link-type trunk
    18. port trunk allow-pass vlan 20

    SwitchB的配置⽂件

    1. sysname SwitchB
    2. vlan batch 10 20
    3. interface Eth-Trunk1
    4. port link-type trunk
    5. port trunk allow-pass vlan 10 20
    6. load-balance src-dst-mac
    7. interface GigabitEthernet1/0/1
    8. eth-trunk 1
    9. interface GigabitEthernet1/0/2
    10. eth-trunk 1
    11. interface GigabitEthernet1/0/3
    12. eth-trunk 1
    13. interface GigabitEthernet1/0/4
    14. port link-type trunk
    15. port trunk allow-pass vlan 10
    16. interface GigabitEthernet1/0/5
    17. port link-type trunk
    18. port trunk allow-pass vlan 20

    end

    欢迎关注微信公众号【厦门微思网络】。http://www.xmws.cn专业IT认证培训19周年
    主要课程:思科、华为、红帽、ORACLE、VMware、CISP、PMP等认证培训及考证

  • 相关阅读:
    索引库操作
    OpenCV之摩尔纹
    【无标题】
    37.JavaScript对象与JSON格式的转换,JSON.stringify、JSON.parse方法的使用方法和注意事项
    408 | 【2015年】计算机统考真题 自用回顾知识点整理
    基于51单片机智能晾衣架控制系统设计( proteus仿真+程序+设计报告+原理图+讲解视频)
    sql面试
    初识知识图谱
    提升技术的13个建议
    Spring Cloud Gateway(网关)
  • 原文地址:https://blog.csdn.net/XMWS_IT/article/details/126761787