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}
相关推荐
ALex_zry4 小时前
C++网络编程心跳机制与连接保活:长连接稳定性保障
开发语言·网络·c++
@insist1236 小时前
网络工程师-信道容量计算与 PCM 编码:数据通信核心原理及软考考点解析
网络·网络工程师·pcm·软考·软件水平考试
桌面运维家7 小时前
VHD/VHDX 数据守护:BAT位图校验与修复
linux·服务器·网络
F1FJJ8 小时前
Shield CLI Postgres v0.3.10:当 142 张表挤在一张 ER 图里,我们做了什么
网络·vscode·网络协议·postgresql·开源软件
Hello_Embed9 小时前
嵌入式上位机开发入门(四):TCP 编程 —— Client 端实现
网络·笔记·网络协议·tcp/ip·嵌入式
小雨青年9 小时前
鸿蒙 HarmonyOS 6 | Video 组件网络视频播放异常排查实战
网络·音视频·harmonyos
网硕互联的小客服9 小时前
CentOS系统如何卸载桌面并以shell 字符界面启动?
运维·服务器·网络·安全
攻城狮在此11 小时前
华三中小型企业二层组网配置案例一(单ISP+单链路)
网络·华为
REDcker11 小时前
Nagle 算法与 TCP_NODELAY、TCP_CORK 详解
网络·tcp/ip·算法
Swift社区12 小时前
从手游到鸿蒙游戏:开发逻辑变了什么?
游戏·华为·harmonyos