Cisco ,H3C,华为配置端口聚合命令(lacp mode)

Cisco交换机配置

1. 创建二层聚合接口

bash 复制代码
interface port-channel 100
no shutdown

2. 将物理端口加入聚合组, 使用lacp主动模式

bash 复制代码
interface G1/0/47
no shutdown
channel-group 100 mode active
exit
interface G1/0/48
no shutdown
channel-group 100 mode active
exit

3.查看命令

思科的Catalyst和Nexus系列查看命令是不一样的

3.1 Catalyst

show etherchannel summary
示例

bash 复制代码
Cisco-3850#show etherchannel summary 
Flags:  D - down        P - bundled in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        U - in use      f - failed to allocate aggregator

        M - not in use, minimum links not met
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port


Number of channel-groups in use: 11
Number of aggregators:           11

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)         LACP      Gi1/1/1(P)  Gi2/1/1(P)  
2      Po2(SU)         LACP      Gi1/1/2(P)  Gi2/1/2(P)  
3      Po3(SU)         LACP      Gi1/0/1(P)  Gi2/0/4(P)  
4      Po4(SU)         LACP      Gi1/0/10(P) Gi2/0/10(P)
bash 复制代码
Cisco-3850#show etherchannel protocol 
                Channel-group listing: 
                ----------------------

Group: 1 
----------
Protocol:  LACP

Group: 2 
----------
Protocol:  LACP

Group: 3 
----------
Protocol:  LACP

Cisco-3850#show etherchannel 1 port-channel 
                Port-channels in the group: 
                ---------------------------

Port-channel: Po1    (Primary Aggregator)

------------

Age of the Port-channel   = 2586d:11h:03m:08s
Logical slot/port   = 10/1          Number of ports = 2
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     Gi1/1/1  Active             0
  0     00     Gi2/1/1  Active             0


         
Cisco-3850#show etherchannel 1 detail 
Group state = L2 
Ports: 2   Maxports = 16
Port-channels: 1 Max Port-channels = 16
Protocol:   LACP
Minimum Links: 0
                Ports in the group:
                -------------------
Port: Gi1/1/1
------------

Port state    = Up Mstr Assoc In-Bndl 
Channel group = 1           Mode = Active          Gcchange = -
Port-channel  = Po1         GC   =   -             Pseudo port-channel = Po1
Port index    = 0           Load = 0x00            Protocol =   LACP

Flags:  S - Device is sending Slow LACPDUs   F - Device is sending fast LACPDUs.
        A - Device is in active mode.        P - Device is in passive mode.

Local information:
                            LACP port     Admin     Oper    Port        Port
Port      Flags   State     Priority      Key       Key     Number      State
Gi1/1/1   SA      bndl      32768         0x1       0x1     0x11A       0x3D  

Partner's information:

                  LACP port                        Admin  Oper   Port    Port
Port      Flags   Priority  Dev ID          Age    key    Key    Number  State
Gi1/1/1   SA      32768     3c08.f6e3.5b80  26s    0x0    0x4    0x44    0x3D  

3.1 Nexus

show port-channel summary

show port-channel summary interface port-channel 100

sh port-channel traffic

示例

bash 复制代码
Nexus-9000# show port-channel summary 
Flags:  D - Down        P - Up in port-channel (members)
        I - Individual  H - Hot-standby (LACP only)
        s - Suspended   r - Module-removed
        b - BFD Session Wait
        S - Switched    R - Routed
        U - Up (port-channel)
        p - Up in delay-lacp mode (member)
        M - Not in use. Min-links not met
--------------------------------------------------------------------------------
Group Port-       Type     Protocol  Member Ports
      Channel
--------------------------------------------------------------------------------
100   Po100(SU)   Eth      LACP      Eth1/50(P)   Eth2/50(P)   
101   Po101(RU)   Eth      LACP      Eth1/47(P)   Eth1/48(P) 

Nexus-9000# show port-channel summary interface port-channel 100 
Flags:  D - Down        P - Up in port-channel (members)
        I - Individual  H - Hot-standby (LACP only)
        s - Suspended   r - Module-removed
        b - BFD Session Wait
        S - Switched    R - Routed
        U - Up (port-channel)
        p - Up in delay-lacp mode (member)
        M - Not in use. Min-links not met
--------------------------------------------------------------------------------
Group Port-       Type     Protocol  Member Ports
      Channel
--------------------------------------------------------------------------------
100   Po100(SU)   Eth      LACP      Eth1/50(P)   Eth2/50(P)  


Nexus-9000# sh port-channel traffic 
NOTE: Clear the port-channel member counters to get accurate statistics

ChanId      Port Rx-Ucst Tx-Ucst Rx-Mcst Tx-Mcst Rx-Bcst Tx-Bcst
------ --------- ------- ------- ------- ------- ------- -------
    70    Eth1/4    0.0%    0.0%    0.0%    0.0%    0.0%    0.0%
    70    Eth1/5    0.0%    0.0%    0.0%    0.0%    0.0%    0.0%
------ --------- ------- ------- ------- ------- ------- -------
   100   Eth1/50  19.84%  97.97%  96.69%  95.43%  47.23%  43.32%
   100   Eth2/50  80.15%   2.02%   3.30%   4.56%  52.76%  56.67%
------ --------- ------- ------- ------- ------- ------- -------

H3C 交换机配置

1. 创建二层聚合接口,并指定为动态LACP模式

bash 复制代码
interface Bridge-Aggregation 1
 port link-type trunk
 port trunk permit vlan all
 link-aggregation mode dynamic      # 启用动态LACP(必须)
 link-aggregation load-sharing mode destination-mac  # 负载均衡策略  , 属于可选项,可以不加
 quit

2. 将物理端口加入聚合组

bash 复制代码
interface GigabitEthernet 1/0/1
 port link-aggregation group 1
 quit
interface GigabitEthernet 1/0/2
 port link-aggregation group 1
 quit

3. (可选)限制选中端口数量

bash 复制代码
interface Bridge-Aggregation 1
 link-aggregation selected-port maximum 2
 link-aggregation selected-port minimum 1   # 最少存活链路

✅ 验证命令:

display link-aggregation summary ---- 查看所有聚合接口摘要信息

display link-aggregation verbose ------ 查看所有聚合接口详细信息(S=Selected,U=Unselected)

bash 复制代码
<h3c-switch> display link-aggregation  summary 
Aggregation Interface Type: 
BAGG -- Bridge-Aggregation, BLAGG -- Blade-Aggregation, RAGG -- Route-Aggregation, SCH-B -- Schannel-Bundle 
Aggregation Mode: S -- Static, D -- Dynamic 
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Actor System ID: 0x8000, 78aa-8236-112e

AGG        AGG   Partner ID              Selected  Unselected  Individual  Share
Interface  Mode                          Ports     Ports       Ports       Type 
--------------------------------------------------------------------------------
BAGG1      D     0x7f9b, 0023-04ee-be69  8         0           0           Shar 
BAGG11     D     0xffff, 346f-1102-ea36  2         0           0           Shar 
BAGG12     D     0xffff, 346f-1102-ea37  2         0           0           Shar 
BAGG13     D     0xffff, 346f-1102-eabe  2         0           0           Shar 

<h3c-switch> display link-aggregation verbose 
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing 
Port Status: S -- Selected, U -- Unselected, I -- Individual 
Port: A -- Auto port, M -- Management port, R -- Reference port 
Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, 
        D -- Synchronization, E -- Collecting, F -- Distributing, 
        G -- Defaulted, H -- Expired 

Aggregate Interface: Bridge-Aggregation1
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0x8000, 78aa-8236-112e
Local: 
  Port                Status   Priority Index    Oper-Key               Flag
  XGE1/0/23           S        32768    3        1                      {ACDEF}
  XGE1/0/24           S        32768    1        1                      {ACDEF}
Remote:        
  Actor               Priority Index    Oper-Key SystemID               Flag   
  XGE1/0/23           32768    16681    33111    0x7f9b, 0023-04ee-be69 {ACDEF}
  XGE1/0/24(R)        32768    297      33111    0x7f9b, 0023-04ee-be69 {ACDEF}
相关推荐
请为小H留灯2 小时前
网络连通性测试:3 种常用方法(Telnet、Ping、Curl)详解
网络·curl·telnet·网络测试
ITUnicorn3 小时前
【HarmonyOS 6】进度组件实战:打造精美的数据可视化
华为·harmonyos·arkts·鸿蒙·harmonyos6
blackorbird3 小时前
新型Keenadu安卓固件级后门揭开跨僵尸网络协同攻击链条
android·网络
小叮当⇔4 小时前
计算机网络实验——华为eNSP模拟器常用命令总结
服务器·计算机网络·华为
桂花很香,旭很美4 小时前
[7天实战入门Go语言后端] Go 后端实战踩坑与解法手册
服务器·网络·golang
七夜zippoe4 小时前
图神经网络实战:从社交网络到推荐系统的工业级应用
网络·人工智能·pytorch·python·神经网络·cora
REDcker5 小时前
从 SS7 到 VoLTE:核心信令协议栈与移动网络演进详解
开发语言·网络·sip·移动网络·volte·ss7·七号信令
Web极客码5 小时前
WordPress安全密钥和SALT使用
网络