• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

04-二层技术-以太网交换命令参考

目录

12-L2PT命令

本章节下载 12-L2PT命令  (181.88 KB)

12-L2PT命令


1 L2PT

1.1  L2PT配置命令

1.1.1  display l2protocol statistics

display l2protocol statistics命令用来显示L2PT报文统计信息。

【命令】

display l2protocol statistics [ interface interface-type interface-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

mdc-admin

mdc-operator

【参数】

interface interface-type interface-number:显示指定二层以太网接口或二层聚合接口上的L2PT报文统计信息。interface-type interface-number表示接口类型和接口编号。如未指定本参数,将显示所有二层以太网接口和二层聚合接口的L2PT报文统计信息。

【举例】

# 显示所有二层以太网接口和二层聚合接口的L2PT报文统计信息。

<Sysname> display l2protocol statistics

L2PT statistics information on interface Bridge-Aggregation1:

Protocol  Encapsulated      Decapsulated      Forwarded         Dropped

CDP       0                 0                 0                 0

DLDP      0                 3                 0                 0

EOAM      0                 2                 0                 0

GVRP      8                 4                 9                 2

LACP      0                 0                 0                 0

LLDP      0                 3                 0                 0

MVRP      0                 0                 0                 0

PAGP      0                 1                 0                 0

PVST      0                 0                 0                 0

STP       5                 5                 5                 0

Tunnel    N/A               N/A               100               10

VTP       0                 6                 0                 0

UDLD      0                 0                 0                 0

DTP       0                 0                 0                 0

CFD       0                 0                 0                 0

 

L2PT statistics information on interface Ten-GigabitEthernet3/0/1:

Protocol  Encapsulated      Decapsulated      Forwarded         Dropped

CDP       0                 0                 0                 0

DLDP      2                 3                 3                 0

EOAM      5                 2                 9                 0

GVRP      8                 4                 9                 2

LACP      0                 0                 0                 0

LLDP      3                 3                 3                 3

MVRP      0                 0                 0                 0

PAGP      5                 1                 7                 3

PVST      0                 0                 0                 0

STP       5                 5                 5                 0

Tunnel    N/A               N/A               100               10

VTP       0                 6                 0                 0

UDLD      0                 0                 0                 0

DTP       0                 0                 0                 0

CFD       0                 0                 0                 0

表1-1 display l2protocol statistics命令显示信息描述表

字段

描述

Protocol

协议类型

Encapsulated

封装统计计数

用户侧收到协议报文后封装成Tunnel报文,对应的协议封装统计计数加1

对于Tunnel(表示Tunnel报文),对应值显示为N/A,为无效统计计数

Decapsulated

解封装统计计数

网络侧收到Tunnel报文后解封装成协议报文,对应的协议解封装统计计数加1

对于Tunnel,对应值显示为N/A,为无效统计计数

Forwarded

转发统计计数

·     用户侧或网络侧收到协议报文后转发,对应的协议转发统计计数加1

·     网络侧收到Tunnel报文后转发,对应的Tunnel转发统计计数加1(如果网络侧收到Tunnel报文时,设备没有任何用户侧端口,则Tunnel转发统计计数不会增加)

Dropped

丢弃统计计数

·     接口收到协议报文后丢弃,对应的协议丢弃统计计数加1(如果协议报文被硬件丢弃,则协议丢弃统计计数不会增加)

·     接口收到Tunnel报文后丢弃,对应的Tunnel丢弃统计计数加1

 

1.1.2  l2protocol rate-limit

l2protocol rate-limit命令用来配置指定协议在开启了L2PT功能接口上透传的最大速率。

undo l2protocol rate-limit命令用来取消配置指定协议在开启了L2PT功能接口上透传的最大速率。

【命令】

在二层以太网接口视图下:

l2protocol rate-limit rate [ cdp | dldp | eoam | gvrp | lacp | lldp | mvrp | pvst | stp ]

undo l2protocol rate-limit [ cdp | dldp | eoam | gvrp | lacp | lldp | mvrp | pvst | stp ]

在二层聚合接口视图下:

l2protocol rate-limit rate [ cdp | gvrp | lacp | lldp | mvrp  | pvst | stp ]

undo l2protocol rate-limit [ cdp | gvrp | lacp | lldp | mvrp | pvst | stp ]

【缺省情况】

设备对各协议的L2PT透传均不进行限速。

【视图】

二层以太网接口视图

二层聚合接口视图

【缺省用户角色】

network-admin

mdc-admin

【参数】

rate:开启了L2PT功能的接口在透传协议报文时,每秒钟能够透传的最大报文数量,超过该数量的报文将被丢弃。取值范围为1~100。

cdp:表示CDP协议。

dldp:表示DLDP协议。

eoam:表示EOAM协议。

gvrp:表示GVRP协议。

mvrp:表示MVRP协议。

lacp:表示LACP协议。

lldp:表示LLDP协议。

pvst:表示PVST协议。

stp:表示STP协议。

【使用指导】

用户侧协议报文较多时,开启L2PT功能的接口带宽资源可能被少数几种协议占满,导致其他协议的报文拥塞、无法被透传。通过配置本命令限制各个协议的报文在透传时的最大速率,可以方便用户规划各协议占用带宽的比例,更充分地利用接口的带宽资源。

未指定任何参数时,表示同时配置所有协议的L2PT透传最大速率。

【举例】

# 在接口Ten-GigabitEthernet3/0/1上,配置LACP协议通过L2PT功能透传的最大速率为50报文/秒。

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] l2protocol rate-limit 50 lacp

# 在二层聚合接口Bridge-Aggregation1上,配置LACP协议通过L2PT功能透传的最大速率为50报文/秒。

<Sysname> system-view

[Sysname] interface bridge-aggregation 1

[Sysname-Bridge-Aggregation1] l2protocol rate-limit 50 lacp

【相关命令】

·     l2protocol tunnel dot1q

1.1.3  l2protocol tunnel dot1q

l2protocol tunnel dot1q命令用来开启指定协议的L2PT功能。

undo l2protocol tunnel dot1q命令用来关闭指定协议的L2PT功能。

【命令】

在二层以太网接口视图下:

l2protocol { cdp | dldp | eoam | gvrp | lacp | lldp | mvrp | pvst | stp } tunnel dot1q

undo l2protocol { cdp | dldp | eoam | gvrp | lacp | lldp | mvrp | pvst | stp } tunnel dot1q

在二层聚合接口视图下:

l2protocol { cdp | gvrp | lacp | lldp | mvrp | pvst | stp } tunnel dot1q

undo l2protocol { cdp | gvrp | lacp | lldp | mvrp | pvst | stp } tunnel dot1q

【缺省情况】

各协议的L2PT功能均处于关闭状态。

【视图】

二层以太网接口视图

二层聚合接口视图

【缺省用户角色】

network-admin

mdc-admin

【参数】

cdp:表示CDP协议。

dldp:表示DLDP协议。

eoam:表示EOAM协议。

gvrp:表示GVRP协议。

lacp:表示LACP协议。

lldp:表示LLDP协议。

mvrp:表示MVRP协议。

pvst:表示PVST协议。

stp:表示STP协议。

【使用指导】

L2PT功能仅需在用户侧接口上开启。如果在网络侧接口上开启了L2PT功能,则会将该接口认为是用户侧接口。

在接口上开启某协议的L2PT功能时,对应的CE上应启用该协议,同时当前接口必须关闭该协议。

如果CE上与PE开启L2PT功能的接口相连的聚合接口上正在运行某协议(例如STP),则PE设备上对应的接口必须关闭该协议。

允许在二层聚合组的成员端口上开启L2PT功能,但配置不生效。

不能在业务环回组的成员端口上开启L2PT功能。

对于LLDP协议,L2PT功能只支持Nearest Bridge(最近桥代理)类型的LLDP报文。

【举例】

# 在接口Ten-GigabitEthernet3/0/1上关闭STP协议,并开启STP协议的L2PT功能。

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] undo stp enable

[Sysname-Ten-GigabitEthernet3/0/1] l2protocol stp tunnel dot1q

# 在二层聚合接口Bridge-Aggregation1上关闭STP协议,并开启STP协议的L2PT功能。

<Sysname> system-view

[Sysname] interface bridge-aggregation 1

[Sysname-Bridge-Aggregation1] undo stp enable

[Sysname-Bridge-Aggregation1] l2protocol stp tunnel dot1q

1.1.4  l2protocol tunnel-dmac

l2protocol tunnel-dmac命令用来配置所有协议的Tunnel报文的组播目的MAC地址。

undo l2protocol tunnel-dmac命令用来恢复缺省情况。

【命令】

l2protocol tunnel-dmac mac-address

undo l2protocol tunnel-dmac

【缺省情况】

所有协议Tunnel报文的组播目的MAC地址均为010f-e200-0003。

【视图】

系统视图

【缺省用户角色】

network-admin

mdc-admin

【参数】

mac-address:Tunnel报文的组播目的MAC地址。取值为0100-0ccd-cdd0、0100-0ccd-cdd1、0100-0ccd-cdd2或010f-e200-0003。

【使用指导】

通过本命令,可以配置所有协议的Tunnel报文组播目的MAC地址;通过l2protocol type tunnel-dmac命令,可以为特定协议配置该协议的Tunnel报文组播目的MAC地址。如果同时配置了二者,则设备在透传特定协议的报文时,选取为该协议指定的Tunnel报文组播目的MAC地址。

【举例】

# 配置Tunnel报文的组播目的MAC地址为0100-0ccd-cdd0。

<Sysname> system-view

[Sysname] l2protocol tunnel-dmac 0100-0ccd-cdd0

【相关命令】

·     l2protocol type tunnel-dmac

1.1.5  reset l2protocol statistics

reset l2protocol statistics命令用来清除L2PT报文的统计信息。

【命令】

reset l2protocol statistics [ interface interface-type interface-number ]

【视图】

用户视图

【缺省用户角色】

network-admin

mdc-admin

【参数】

interface interface-type interface-number:清除指定二层以太网接口或二层聚合接口上的L2PT报文统计信息。interface-type interface-number表示接口类型和接口编号。如未指定本参数,将清除所有二层以太网接口和二层聚合接口的L2PT报文统计信息。

【举例】

# 清除所有二层以太网接口和二层聚合接口的L2PT报文统计信息。

<Sysname> reset l2protocol statistics

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们