• 简单组网(LACP)负载分担链路聚合


    LACP 模式链路聚合:为了提高Eth-Trunk的容错性,并且能提供备份功能,保证成员链路的高可靠性,出现了链路聚合控制协议LACP(Link Aggregation Control Protocol),LACP模式就是采用LACP 的一种链路聚合模式。
    LACP为交换数据的设备提供一种标准的协商方式,以供设备根据自身配置自动形成聚合链路并启动聚合链路收发数据。
    聚合链路形成以后,LACP负责维护链路状态,在聚合条件发生变化时,自动调整或解散链路聚合。

    1、拓扑图

    微信图片_20200903223002

    2、创建vlan,并将接口加入到vlan中

    SWA

    [SWA]vlan batch 101 102
    Info: This operation may take a few seconds. Please wait for a moment...done.
    [SWA]int g0/0/1
    [SWA-GigabitEthernet0/0/1]port link-type access
    [SWA-GigabitEthernet0/0/1]port default vlan 101
    [SWA-GigabitEthernet0/0/1]quit
    [SWA]int g0/0/2
    [SWA-GigabitEthernet0/0/2]port link-type access
    [SWA-GigabitEthernet0/0/2]port default vlan 102
    [SWA-GigabitEthernet0/0/2]quit

    SWB

    [Huawei]sysname SWB
    [SWB]vlan batch 101 102
    Info: This operation may take a few seconds. Please wait for a moment...done.
    [SWB]int g0/0/1
    [SWB-GigabitEthernet0/0/1]port link-type access
    [SWB-GigabitEthernet0/0/1]port default vlan 101
    [SWB-GigabitEthernet0/0/1]quit
    [SWB]int g0/0/2
    [SWB-GigabitEthernet0/0/2]port link-type access
    [SWB-GigabitEthernet0/0/2]port default vlan 102
    [SWB-GigabitEthernet0/0/2]quit

    3、创建Eth-Trunk接口,设置为LACP模式,并将成员加入进来,同时将接口设置为trunk模式,允许vlan101和vlan102通过

    SWA

    [SWA]int Eth-Trunk 1
    [SWA-Eth-Trunk1]mode lacp-static
    [SWA-Eth-Trunk1]trunkport GigabitEthernet 0/0/21 to 0/0/24
    Info: This operation may take a few seconds. Please wait for a moment...done.
    [SWA-Eth-Trunk1]port link-type trunk
    [SWA-Eth-Trunk1]port trunk allow-pass vlan 101 102
    [SWA-Eth-Trunk1]quit
    

    SWB

    [SWB]int Eth-Trunk 1
    [SWB-Eth-Trunk1]mode lacp-static
    [SWB-Eth-Trunk1]trunkport GigabitEthernet 0/0/21 to 0/0/24
    Info: This operation may take a few seconds. Please wait for a moment...done.
    [SWB-Eth-Trunk1]port link-type trunk
    [SWB-Eth-Trunk1]port trunk allow-pass vlan 101 102
    [SWB-Eth-Trunk1]quit

    4、配置SWA为LACP的主动端,将其优先级设为100,并配置活动接口上限为2,设置接口优先级确定初始活动链路。

    SWA

    [SWA]lacp priority 100
    [SWA]int Eth-Trunk 1
    [SWA-Eth-Trunk1]max active-linknumber 2
    [SWA-Eth-Trunk1]quit
    [SWA]int g0/0/21
    [SWA-GigabitEthernet0/0/21]lacp priority 100
    [SWA-GigabitEthernet0/0/21]quit
    [SWA]int g0/0/22
    [SWA-GigabitEthernet0/0/22]lacp priority 100
    [SWA-GigabitEthernet0/0/22]quit
    

    5、查看配置效果

    21和22接口为活动接口,实现负载链路聚合。

    同时23、24接口为备份接口,当21、22出现故障的时候立刻启动备份链路,提高可靠性。

    [SWA]dis eth-trunk 1
    Eth-Trunk1's state information is:
    Local:
    LAG ID: 1                   WorkingMode: STATIC
    Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP
    System Priority: 100        System ID: 4c1f-cc64-1d11
    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
    GigabitEthernet0/0/21  Selected 1GE      100     22     305     10111100  1
    GigabitEthernet0/0/22  Selected 1GE      100     23     305     10111100  1
    GigabitEthernet0/0/23  Unselect 1GE      32768   24     305     10100000  1
    GigabitEthernet0/0/24  Unselect 1GE      32768   25     305     10100000  1
    
    Partner:
    --------------------------------------------------------------------------------
    ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
    GigabitEthernet0/0/21  32768    4c1f-cc35-195e  32768   22     305     10111100
    GigabitEthernet0/0/22  32768    4c1f-cc35-195e  32768   23     305     10111100
    GigabitEthernet0/0/23  32768    4c1f-cc35-195e  32768   24     305     10110000
    GigabitEthernet0/0/24  32768    4c1f-cc35-195e  32768   25     305     10110000
    
    [SWA]

    将21接口shutdown查看效果

    [SWA]int g0/0/21
    [SWA-GigabitEthernet0/0/21]shutdown
    [SWA-GigabitEthernet0/0/21]dis eth
    [SWA-GigabitEthernet0/0/21]dis eth-trunk 1
    Eth-Trunk1's state information is:
    Local:
    LAG ID: 1                   WorkingMode: STATIC
    Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP
    System Priority: 100        System ID: 4c1f-cc64-1d11
    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
    GigabitEthernet0/0/21  Unselect 1GE      100     22     305     10100010  1
    GigabitEthernet0/0/22  Selected 1GE      100     23     305     10111100  1
    GigabitEthernet0/0/23  Selected 1GE      32768   24     305     10111100  1
    GigabitEthernet0/0/24  Unselect 1GE      32768   25     305     10100000  1
    
    Partner:
    --------------------------------------------------------------------------------
    ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
    GigabitEthernet0/0/21  0        0000-0000-0000  0       0      0       10100011
    GigabitEthernet0/0/22  32768    4c1f-cc35-195e  32768   23     305     10111100
    GigabitEthernet0/0/23  32768    4c1f-cc35-195e  32768   24     305     10111100
    GigabitEthernet0/0/24  32768    4c1f-cc35-195e  32768   25     305     10110000
    
    [SWA-GigabitEthernet0/0/21]

    切换时基本感受不到网络变化。

    读书和健身总有一个在路上

    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文链接,否则保留追究法律责任的权利。
  • 相关阅读:
    EA教程 (四) SQLHelper类
    详解包含、扩展和泛化
    几种常用的单例模式详解
    我的分层
    EA教程(二)数据库
    软件版本号如何定义
    精解PV操作之信号量
    eclipse连接数据库驱动汇总
    [Leetcode 17] 13 Roman to Integer
    Short term goal for 2013 rest time
  • 原文地址:https://www.cnblogs.com/Renqy/p/13610998.html
Copyright © 2020-2023  润新知