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

H3C S3100-UM[S3100-SI(UM)]系列以太网交换机 命令手册-Release 22XX系列-6W101

23-QoS-QoS Profile命令

本章节下载  (270.43 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S3100/S3100-SI(UM)/Command/Command_Manual/H3C_S3100-SI(UM)-Release_22XX-6W101/201108/722207_30005_0.htm

23-QoS-QoS Profile命令


1 QoS命令

1.1  QoS命令

1.1.1  burst-mode enable

【命令】

burst-mode enable

undo burst-mode enable

【视图】

系统视图

【参数】

【描述】

burst-mode enable命令用来开启设备支持Burst功能。undo burst-mode enable命令用来关闭Burst功能。

缺省情况下,Burst功能处于关闭状态。

【举例】

# 开启交换机支持Burst功能。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] burst-mode enable

1.1.2  display priority-trust

【命令】

display priority-trust

【视图】

任意视图

【参数】

【描述】

display priority-trust命令用来显示当前交换机的优先级信任模式。

相关配置可参考命令priority-trust

【举例】

# 显示当前交换机的优先级信任模式。

<Sysname> display priority-trust

Priority trust mode: dscp

1.1.3  display qos cos-local-precedence-map

【命令】

display qos cos-local-precedence-map

【视图】

任意视图

【参数】

【描述】

display qos cos-local-precedence-map命令用来显示802.1p优先级和本地优先级之间的映射关系。

相关配置可参考命令qos cos-local-precedence-map

【举例】

# 显示802.1p优先级和本地优先级之间的映射关系。

<Sysname> display qos cos-local-precedence-map

 cos-local-precedence-map:

               cos(802.1p) :      0     1     2    3     4     5    6    7

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

   local precedence(queue) :      1     0     0    1     2     2    3    3

1.1.4  display qos dscp-local-precedence-map

【命令】

display qos dscp-local-precedence-map

【视图】

任意视图

【参数】

【描述】

display qos dscp-local-precedence-map命令用来显示DSCP优先级和本地优先级之间的映射关系。

相关配置可参考命令qos dscp-local-precedence-map

【举例】

# 显示DSCP优先级和本地优先级之间的映射关系。

<Sysname> display qos dscp-local-precedence-map

 dscp-local-precedence-map:

             dscp : local-precedence(queue)

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

                0 :            0

                1 :            0

                2 :            0

                3 :            0

                4 :            0

                5 :            0

                6 :            0

                7 :            0

                8 :            0

                9 :            0

               10 :            0

               11 :            0

               12 :            0

               13 :            0

               14 :            0

               15 :            0

               16 :            1

               17 :            1

               18 :            1

               19 :            1

               20 :            1

               21 :            1

               22 :            1

               23 :            1

               24 :            1

               25 :            1

               26 :            1

               27 :            1

               28 :            1

               29 :            1

               30 :            1

               31 :            1

               32 :            2

               33 :            2

               34 :            2

               35 :            2

               36 :            2

               37 :            2

               38 :            2

               39 :            2

               40 :            2

               41 :            2

               42 :            2

               43 :            2

               44 :            2

               45 :            2

               46 :            2

               47 :            2

               48 :            3

               49 :            3

               50 :            3

               51 :            3

               52 :            3

               53 :            3

               54 :            3

               55 :            3

               56 :            3

               57 :            3

               58 :            3

               59 :            3

               60 :            3

               61 :            3

               62 :            3

               63 :            3

1.1.5  display qos-global

【命令】

display qos-global { all | mirrored-to | traffic-limit | traffic-priority | traffic-redirect | traffic-statistic }

【视图】

任意视图

【参数】

all:显示全局的所有QoS配置信息。

mirrored-to:显示全局的流镜像配置信息。

traffic-limit:显示全局的流量监管配置信息和统计结果。

traffic-priority:显示全局的优先级重标记配置信息。

traffic-redirect:显示全局的重定向配置信息。

traffic-statistic:显示全局的流量统计配置信息和统计结果。

【描述】

display qos-global命令用来显示全局的QoS配置信息。

【举例】

# 显示交换机全局的所有QoS配置信息。

<Sysname> display qos-global all

 global: traffic-limit inbound:

   Matches: Acl 2000 rule 0  running

     Target rate: 128 Kbps

     Exceed action: drop

   meter-statistic running

     62284 byte outprofile

     82521 byte inprofile

表1-1 display qos-global命令显示信息描述表

字段

描述

Inbound

入方向

Matches

匹配的流分类规则

Target rate

流量监管的速率

Exceed action

对超出限制的报文采取的动作

meter-statistic running

流量监管的统计功能,meter-statistic not running为没有配置统计功能

62284 byte outprofile

超出流量监管的报文字节数

82521 byte inprofile

符合流量监管的报文字节数

 

1.1.6  display qos-interface all

【命令】

display qos-interface {interface-type interface-number | unit-id } all

【视图】

任意视图

【参数】

interface-type interface-number:端口类型和端口编号,表示显示指定端口上的所有QoS配置信息。

unit-id:Unit ID,取值只能为1。如果指定此参数将显示所有端口的所有QoS配置信息。

【描述】

display qos-interface all命令用来显示指定端口或者所有端口的所有QoS配置信息。

【举例】

# 显示端口Ethernet 1/0/1上的所有QoS配置信息。

<Sysname> display qos-interface Ethernet 1/0/1 all

 

Ethernet1/0/1: line-rate

   Inbound: 1024 Kbps

 

Ethernet1/0/1:

 

 Queue scheduling mode: weighted round robin

 weight of queue 0: 12

 weight of queue 1: 8

 weight of queue 2: 4

 weight of queue 3: 1

表1-2 display qos-interface all命令显示信息描述表

字段

描述

line-rate

端口限速配置

Inbound

入方向,Outbound为出方向

1024 Kbps

限制的速率为1024 Kbps

Queue scheduling mode

队列调度模式为wrr

weight of queue 0

队列0的权重

 

1.1.7  display qos-interface line-rate

【命令】

display qos-interface { interface-type interface-number | unit-id } line-rate

【视图】

任意视图

【参数】

interface-type interface-number:端口类型和端口编号,表示显示指定端口上的端口限速配置信息。

unit-id:Unit ID,取值只能为1。如果指定此参数将显示所有端口的端口限速配置信息。

【描述】

display qos-interface line-rate命令用来显示指定端口或者所有端口的端口限速配置信息。

相关配置可参考命令line-rate

【举例】

# 显示端口Ethernet 1/0/1上的端口限速配置信息。

<Sysname> display qos-interface Ethernet 1/0/1 line-rate

 

Ethernet1/0/1: line-rate

   Inbound: 128 kbps

以上显示信息的解释请参见表1-2

1.1.8  display qos-interface mirrored-to

【命令】

display qos-interface { interface-type interface-number | unit-id } mirrored-to

【视图】

任意视图

【参数】

interface-type interface-number:端口类型和端口编号,表示显示指定端口上的流镜像配置信息。

unit-id:Unit ID,取值只能为1。如果指定此参数将显示所有端口的流镜像配置信息。

【描述】

display qos-interface mirrored-to命令用来显示指定端口或者所有端口的流镜像配置信息。

相关配置可参考命令mirrored-to

【举例】

# 显示交换机端口Ethernet 1/0/1上的流镜像配置信息。

<Sysname> display qos-interface Ethernet 1/0/1 mirrored-to

Ethernet1/0/1: mirrored-to

 Inbound:

   Matches: Acl 2000 rule 0  running

     Mirrored to: monitor interface

表1-3 display qos-interface mirrored-to命令显示信息描述表

字段

描述

Ethernet1/0/1

配置了流镜像的端口

Inbound

入方向

Matches

匹配的流分类规则

Mirrored to

l      monitor interface为镜像至指定的端口

l      cpu为镜像至CPU

 

1.1.9  display qos-interface traffic-limit

【命令】

display qos-interface { interface-type interface-number | unit-id } traffic-limit

【视图】

任意视图

【参数】

interface-type interface-number:端口类型和端口编号,表示显示指定端口上的流量监管配置信息。

unit-id:Unit ID,取值只能为1。如果指定此参数将显示所有端口的流量监管配置信息和统计信息。

【描述】

display qos-interface traffic-limit命令用来显示指定端口或者所有端口的流量监管配置信息和统计结果。

相关配置可参考命令traffic-limit

【举例】

# 显示交换机端口Ethernet 1/0/1上的流量监管配置信息和统计结果。

<Sysname> display qos-interface Ethernet 1/0/1 traffic-limit

 

Ethernet1/0/1: traffic-limit

 Inbound:

   Matches: Acl 2001 rule 0  running

     Target rate: 128 Kbps

     Exceed action: drop

   meter-statistic running

     12 byte outprofile

     24 byte inprofile

以上显示信息的解释请参见表1-1

1.1.10  display qos-interface traffic-priority

【命令】

display qos-interface { interface-type interface-number | unit-idtraffic-priority

【视图】

任意视图

【参数】

interface-type interface-number:端口类型和端口编号,表示显示指定端口上的优先级重标记配置信息。

unit-id:Unit ID,取值只能为1。如果指定此参数将显示所有端口的优先级重标记配置信息。

【描述】

display qos-interface traffic-priority命令用来显示指定端口或者所有端口的优先级重标记配置信息。

相关配置可参考命令traffic-priority

【举例】

# 显示交换机端口Ethernet 1/0/1上的优先级重标记配置信息。

<Sysname> display qos-interface Ethernet 1/0/1 traffic-priority

Ethernet1/0/1: traffic-priority

 Inbound:

   Matches: Acl 2000 rule 0  running

     Priority action: local-precedence 1

表1-4 display qos-interface traffic-priority命令显示信息描述表

字段

描述

Ethernet1/0/1

配置了优先级重标记的端口

Inbound

入方向

Matches

匹配的流分类规则

Priority action

优先级重标记的动作,local-precedence表示重标记报文的本地优先级

 

1.1.11  display qos-interface traffic-redirect

【命令】

display qos-interface { interface-type interface-number | unit-idtraffic-redirect

【视图】

任意视图

【参数】

interface-type interface-number:端口类型和端口编号,表示显示指定端口上的重定向配置信息。

unit-id:Unit ID,取值只能为1。如果指定此参数将显示所有端口的重定向配置信息。

【描述】

display qos-interface traffic-redirect命令用来显示指定端口或者所有端口的重定向配置信息。

相关配置可参考命令traffic-redirect

【举例】

# 显示交换机端口Ethernet 1/0/1上的重定向配置信息。

<Sysname> display qos-interface Ethernet 1/0/1 traffic-redirect

Ethernet1/0/1: traffic-redirect

 Inbound:

   Matches: Acl 2000 rule 0  running

     Redirected to: interface Ethernet1/0/2

表1-5 display qos-interface traffic-redirect命令显示信息描述表

字段

描述

Ethernet1/0/1

配置了重定向的端口

Inbound

入方向

Matches

匹配的流分类规则

Redirected to

l      interface为重定向至指定的端口

l      cpu为重定向至CPU

 

1.1.12  display qos-interface traffic-statistic

【命令】

display qos-interface { interface-type interface-number | unit-id } traffic-statistic

【视图】

任意视图

【参数】

interface-type interface-number:端口类型和端口编号,表示显示指定端口上的流量统计配置信息和统计结果。

unit-id:Unit ID,取值只能为1。如果指定此参数将显示所有端口的流量统计配置信息和统计结果。

【描述】

display qos-interface traffic-statistic命令用来显示指定端口或者所有端口的流量统计配置信息和统计结果。

相关配置可参考命令traffic-statistic

【举例】

# 显示交换机端口Ethernet 1/0/1上的流量统计配置信息和统计结果。

<Sysname> display qos-interface Ethernet 1/0/1 traffic-statistic

Ethernet1/0/1: traffic-statistic

 Inbound:

   Matches: Acl 2000 rule 0  running

     8251 packet

表1-6 display qos-interface traffic-statistic命令显示信息描述表

字段

描述

Ethernet1/0/1

配置了流量统计的端口

Inbound

入方向

Matches

匹配的流分类规则

8251 packet

报文的统计结果

 

1.1.13  display qos-vlan

【命令】

display qos-vlan [ vlan-id ] { all | mirrored-to | traffic-limit | traffic-priority | traffic-redirect | traffic-statistic }

【视图】

任意视图

【参数】

vlan-id:VLAN编号,取值范围为1~4094。如果不指定vlan-id,表示显示所有VLAN的QoS配置信息。

all:显示VLAN的所有QoS配置信息。

mirrored-to:显示VLAN的流镜像配置信息。

traffic-limit:显示VLAN的流量监管配置信息和统计结果。

traffic-priority:显示VLAN的优先级重标记配置信息。

traffic-redirect:显示VLAN的重定向配置信息。

traffic-statistic:显示VLAN的流量统计配置信息和统计结果。

【描述】

display qos-vlan命令用来显示VLAN的QoS配置信息。

【举例】

# 显示交换机 VLAN 1的所有QoS配置信息。

<Sysname> display qos-vlan 1 all

Vlan 1 traffic-limit

 Inbound:

   Matches: Acl 3001 rule 0  running

     Target rate: 128 Kbps

     Exceed action: drop

   meter-statistic not running

以上显示信息的解释请参见表1-1

1.1.14  display queue-scheduler

【命令】

display queue-scheduler

【视图】

任意视图

【参数】

【描述】

display queue-scheduler命令用来显示队列调度的模式及相关参数。

相关配置可参考命令queue-scheduler

【举例】

#  显示队列调度模式及相关参数。

<Sysname> display queue-scheduler

 Queue scheduling mode: weighted round robin

 weight of queue 0: 1

 weight of queue 1: 2

 weight of queue 2: 3

 weight of queue 3: 4

1.1.15  line-rate

【命令】

line-rate { inbound | outbound } target-rate

undo line-rate { inbound | outbound }

【视图】

以太网端口视图

【参数】

inbound:对端口接收报文进行速率限制。

outbound:对端口发送报文进行速率限制。

target-rate:对报文限制的速率,单位为Kbps。取值范围为:

l              百兆以太网端口:64~99968

l              千兆以太网端口:64~1000000

速率限制的粒度为64Kbps,如果用户输入的值在N*64~(N+1)*64之间(N为自然数),交换机将自动修改此值为(N+1)*64 Kbps。

【描述】

line-rate命令用来对端口接收或发送报文的速率进行限制。undo line-rate命令用来取消端口限速的配置。

缺省情况下,没有配置端口限速。

相关配置可参考命令display qos-interface line-rate

如果在设备上配置了组播风暴抑制或流量监管功能,那么该设备的所有端口上都不能配置端口接收报文限速功能。关于组播风暴抑制的详细介绍请参见本手册“端口基本配置”部分。

 

【举例】

# 限制端口Ethernet 1/0/1发送报文的速率为128Kbps。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet1/0/1] line-rate outbound 128

# 查看端口Ethernet 1/0/1上的端口限速的配置信息。

[Sysname-Ethernet1/0/1] display qos-interface Ethernet 1/0/1 line-rate

Ethernet1/0/1: line-rate

   Outbound: 128 Kbps

1.1.16  mirrored-to

【命令】

mirrored-to inbound acl-rule { cpu | monitor-interface }

undo mirrored-to inbound acl-rule

【视图】

系统视图/以太网端口视图

【参数】

inbound:表示对端口接收到的数据包进行镜像。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式及相应参数说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

表1-7 组合应用ACL的方式

组合方式

acl-rule的形式

单独应用一个IP型ACL(基本ACL或高级ACL)中所有规则

ip-group  acl-number

单独应用一个IP型ACL中一条规则

ip-group acl-number rule rule

单独应用一个Link型ACL中所有规则

link-group acl-number

单独应用一个Link型ACL中一条规则

link-group acl-number rule rule

同时应用IP型ACL中一条规则和一个Link型ACL的一条规则

ip-group acl-number rule rule link-group acl-number rule rule

 

表1-8 ACL组合方式参数说明

参数

说明

ip-group acl-number

基本或高级ACL序号,取值范围为2000~3999

link-group acl-number

二层ACL序号,取值范围为4000~4999

rule-id

ACL规则编号,取值范围为0~65534

如果不指定则表示ACL中的所有规则

 

cpu:表示将数据包镜像至CPU。

monitor-interface:表示将数据包镜像至监控端口。

【描述】

mirrored-to命令用来在全局或端口引用ACL进行流识别,对匹配的报文进行流镜像。undo mirrored-to命令用来取消全局或端口的流镜像配置。

需要注意的是,针对同一条ACL规则,流镜像功能和重定向功能在全局或端口上不能同时配置。

相关配置可参考命令display qos-interface mirrored-to

【举例】

# 在交换机端口Ethernet 1/0/1上配置流镜像,将通过此端口的匹配ACL 2000的报文镜像至端口Ethernet 1/0/4。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] acl number 2000

[Sysname-acl-basic-2000] rule permit source 1.1.1.1 0

[Sysname-acl-basic-2000] quit

[Sysname] interface Ethernet 1/0/4

[Sysname-Ethernet1/0/4] monitor-port

[Sysname-Ethernet1/0/4] quit

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet1/0/1] mirrored-to inbound ip-group 2000 monitor-interface

# 查看端口Ethernet 1/0/1上的流镜像配置信息。

[Sysname-Ethernet1/0/1] display qos-interface Ethernet 1/0/1 mirrored-to

Ethernet1/0/1: mirrored-to

 Inbound:

   Matches: Acl 2000 rule 1  running

     Mirrored to: monitor interface                                          

1.1.17  mirrored-to vlan

【命令】

mirrored-to vlan vlan-id inbound acl-rule { cpu | monitor-interface }

undo mirrored-to inbound acl-rule

【视图】

系统视图

【参数】

vlan vlan-id:VLAN编号,取值范围为1~4094。

inbound:表示对接收到的数据包进行流镜像。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

cpu:表示将数据包镜像至CPU。

monitor-interface:表示将数据包镜像至监控端口。

【描述】

mirrored-to vlan命令用来在VLAN上引用ACL进行流识别,对匹配的报文进行流镜像。undo mirrored-to vlan命令用来取消VLAN上的流镜像配置。

需要注意的是,针对同一条ACL规则,流镜像功能和重定向功能在VLAN上不能同时配置。

在VLAN上配置的流镜像只能对带有802.1Q标签头的报文生效。

 

相关配置可参考命令display qos-vlanmonitor-port

【举例】

# 在交换机的VLAN 1上配置流镜像,将匹配ACL 2000规则的报文镜像至端口Ethernet 1/0/2。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] acl number 2000

[Sysname-acl-basic-2000] rule permit source 1.1.1.1 0

[Sysname-acl-basic-2000] quit

[Sysname] interface Ethernet1/0/2

[Sysname-Ethernet1/0/2] monitor-port

[Sysname-Ethernet1/0/2] quit

[Sysname] mirrored-to vlan 1 inbound ip-group 2000 monitor-interface

# 查看VLAN1上的流镜像配置信息。

<Sysname> display qos-vlan 1 mirrored-to

Vlan 1 mirrored-to

 Inbound:

   Matches: Acl 2000 rule 1  running

     Mirrored to: monitor interface

1.1.18  priority

【命令】

priority priority-level

undo priority

【视图】

以太网端口视图

【参数】

priority-level:端口优先级,取值范围为0~7。

【描述】

priority命令用来配置以太网端口的优先级。undo priority命令用来恢复缺省情况。

缺省情况下,端口的优先级为0。

【举例】

# 配置端口Ethernet 1/0/1的端口优先级为6。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet1/0/1] priority 6

1.1.19  priority trust

【命令】

priority trust

undo priority

【视图】

系统视图

【参数】

【描述】

priority trust命令用来配置信任报文的802.1p优先级。undo priority命令用来恢复缺省情况,即信任端口优先级模式。

缺省情况下,交换机信任端口优先级模式。对于带有802.1Q标签头的报文,交换机使用端口的优先级替换报文的802.1p优先级,然后查找802.1p优先级到本地优先级映射表,将报文放入不同的端口输出队列进行调度。

用户可以通过priority trust命令配置交换机信任报文本身携带的802.1p优先级,而不使用接收端口的优先级来替换报文的802.1p优先级。

【举例】

# 配置交换机信任报文的802.1p优先级。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] priority trust

# 查看配置结果。

[Sysname] display this

#

 sysname H3C

#

 priority trust

1.1.20  priority-trust

【命令】

priority-trust { cos | dscp }

undo priority-trust

【视图】

系统视图

【参数】

cos:配置优先级信任模式为信任802.1p优先级。

dscp:配置优先级信任模式为信任DSCP优先级。

【描述】

priority-trust命令用来配置具体信任何种类型的报文优先级。undo priority-trust命令用来恢复信任缺省的802.1p(CoS)报文优先级。

本系列以太网交换机的端口支持4个输出队列,用户可以根据报文的优先级将其放入到相应的输出队列中进行调度:

l              根据报文的DSCP优先级:DSCP优先级取值为0~63。缺省情况下,DCSP优先级为0~15的报文放入0队列,DCSP优先级为16~31的报文放入1队列,DCSP优先级为32~47的报文放入2队列,DCSP优先级为48~63的报文放入3队列。

l              根据报文的CoS优先级:CoS优先级取值为0~7。缺省情况下,CoS优先级为1、2的报文放入0队列,CoS优先级为0、3的报文放入1队列,CoS优先级为4、5的报文放入2队列,CoS优先级为6、7的报文放入3队列。

用户可以根据实际情况选择相应的优先级作为报文进入端口输出队列的依据。

需要注意的是:如果用户需要在本系列以太网交换机上配置信任模式为信任DSCP优先级,则必须配置priority trust命令。

相关配置可参考命令display priority-trust

【举例】

# 配置交换机的优先级信任模式为信任报文的DSCP优先级。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] priority-trust dscp

# 查看配置结果。

[Sysname] display priority-trust

 Priority trust mode: dscp

1.1.21  qos cos-local-precedence-map

【命令】

qos cos-local-precedence-map cos0-map-local-prec cos1-map-local-prec cos2-map-local-prec cos3-map-local-prec cos4-map-local-prec cos5-map-local-prec cos6-map-local-prec cos7-map-local-prec

undo qos cos-local-precedence-map

【视图】

系统视图

【参数】

cos0-map-local-prec:表示CoS优先级0到本地优先级的映射值,取值范围0~3。

cos1-map-local-prec:表示CoS优先级1到本地优先级的映射值,取值范围0~3。

cos2-map-local-prec:表示CoS优先级2到本地优先级的映射值,取值范围0~3。

cos3-map-local-prec:表示CoS优先级3到本地优先级的映射值,取值范围0~3。

cos4-map-local-prec:表示CoS优先级4到本地优先级的映射值,取值范围0~3。

cos5-map-local-prec:表示CoS优先级5到本地优先级的映射值,取值范围0~3。

cos6-map-local-prec:表示CoS优先级6到本地优先级的映射值,取值范围0~3。

cos7-map-local-prec:表示CoS优先级7到本地优先级的映射值,取值范围0~3。

【描述】

qos cos-local-precedence-map命令用来配置802.1p优先级和本地优先级之间的映射关系。undo qos cos-local-precedence-map命令用来恢复缺省情况。

缺省情况下,802.1p优先级和本地优先级之间的映射关系如表1-9所示。

表1-9 802.1p优先级和本地优先级之间的映射关系

802.1p优先级

本地优先级

0

1

1

0

2

0

3

1

4

2

5

2

6

3

7

3

 

相关配置可参考命令display qos cos-local-precedence-map

【举例】

# 配置802.1p优先级和本地优先级之间的映射关系为0->0、1->0、2->1、3->1、4->2、5->2、6->3、7->3。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] qos cos-local-precedence-map 0 0 1 1 2 2 3 3

# 查看配置结果。

[Sysname] display qos cos-local-precedence-map

 cos-local-precedence-map:

            cos(802.1p) :    0    1    2    3    4    5    6    7

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

local precedence(queue) :    0    0    1    1    2    2    3    3

1.1.22  qos dscp-local-precedence-map

【命令】

qos dscp-local-precedence-map dscp-list : local-precedence

undo qos dscp-local-precedence-map [dscp-list ]

【视图】

系统视图

【参数】

dscp-list:DSCP优先级列表。DSCP优先级取值范围为0~63,可以是单个DSCP优先级的值,也可以是多个DSCP优先级的值,DSCP优先级取值之间使用空格分开。dscp-list后面使用“:”号和local-precedence连接,表示二者的映射关系。

local-precedence:表示DSCP列表对应的本地优先级队列,取值范围为0~3。

【描述】

qos dscp-local-precedence-map命令用来配置DSCP优先级和本地优先级之间的映射关系。undo qos dscp-local-precedence-map命令用来恢复缺省情况。

缺省情况下,DSCP优先级和本地优先级之间的映射关系如表1-10所示。

表1-10 DSCP优先级和本地优先级之间的映射关系

DSCP优先级

本地优先级队列

0~15

0

16~31

1

32~47

2

48~63

3

 

相关配置可参考命令display qos dscp-local-precedence-map

【举例】

# 配置DSCP优先级和本地优先级队列之间的映射关系,将DSCP优先级为0~15的报文对应的本地优先级队列配置为2。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] qos dscp-local-precedence-map 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 : 2

# 查看配置结果。

[Sysname] display qos dscp-local-precedence-map

 dscp-local-precedence-map:

             dscp : local-precedence(queue)

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

                0 :            2

                1 :            2

                2 :            2

                3 :            2

                4 :            2

                5 :            2

                6 :            2

                7 :            2

                8 :            2

                9 :            2

               10 :            2

               11 :            2

               12 :            2

               13 :            2

               14 :            2

               15 :            2

               16 :            1

               17 :            1

               18 :            1

               19 :            1

               20 :            1

               21 :            1

               22 :            1

               23 :            1

               24 :            1

               25 :            1

               26 :            1

               27 :            1

               28 :            1

               29 :            1

               30 :            1

               31 :            1

               32 :            2

               33 :            2

               34 :            2

               35 :            2

               36 :            2

               37 :            2

               38 :            2

               39 :            2

               40 :            2

               41 :            2

               42 :            2

               43 :            2

               44 :            2

               45 :            2

               46 :            2

               47 :            2

               48 :            3

               49 :            3

               50 :            3

               51 :            3

               52 :            3

               53 :            3

               54 :            3

               55 :            3

               56 :            3

               57 :            3

               58 :            3

               59 :            3

               60 :            3

               61 :            3

               62 :            3

               63 :            3

1.1.23  queue-scheduler

【命令】

queue-scheduler { hq-wrr queue0-weight queue1-weight queue2-weight | wrr queue0-weight queue1-weight queue2-weight queue3-weight }

undo queue-scheduler

【视图】

系统视图

【参数】

hq-wrr queue0-weight queue1-weight queue2-weight:表明队列使用HQ-WRR调度算法。queue0-weight:0号队列的权重;queue1-weight:1号队列的权重;queue2-weight:2号队列的权重。权重的取值范围为1~15。

wrr queue0-weight queue1-weight queue2-weight queue3-weight:表明队列使用加权轮询调度算法。queue0-weight:0号队列的权重;queue1-weight:1号队列的权重;queue2-weight:2号队列的权重;queue3-weight:3号队列的权重。权重的取值范围为1~15。

【描述】

queue-scheduler命令用来配置队列调度算法及参数。undo queue-scheduler命令用来恢复缺省情况。

缺省情况下,采用WRR队列调度算法,队列0~3权重为1,2,3,4。

本系列以太网交换机的端口支持4输出队列,用户可以根据需要配置队列调度方法:

l              当配置调度算法为WRR时,交换机为每个队列配置一个加权值(依次为w0、w1、w2、w3),加权值表示获取资源的比重。例如配置4个队列的加权值为1、2、4、8(依次对应w0、w1、w2、w3),如果端口上4个输出队列中的数据流量超过了端口的能力,交换机将按照1:2:4:8的比例在4个输出队列之间进行轮询调度。交换机每发送15个报文中各个队列中的报文分布为:1个0队列的报文,2个1队列的报文,4个2队列的报文,8个3队列的报文。

l              当配置调度算法为HQ-WRR时,交换机在4个输出队列中选择队列3为高优先级队列。如果端口上4个输出队列中的数据流量超过了端口的能力,交换机首先保证队列3的报文优先发送出去,然后对其余3个队列实行WRR调度。

相关配置可参考命令display queue-scheduler

【举例】

# 配置交换机的队列调度模式为WRR,队列0~3的权重分别为12,8,4,1。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] queue-scheduler wrr 12 8 4 1

# 查看配置结果。

[Sysname] display queue-scheduler

 Queue scheduling mode: weighted round robin

 weight of queue 0: 12

 weight of queue 1: 8

 weight of queue 2: 4

 weight of queue 3: 1

1.1.24  reset traffic-limit

【命令】

reset traffic-limit inbound acl-rule

【视图】

系统视图/以太网端口视图

【参数】

inbound:表示清除接收到的数据包的统计信息。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。

【描述】

reset traffic-limit命令用来清除全局或端口配置的流量监管功能的统计信息。

相关配置可参考命令traffic-limit

【举例】

# 清除交换机端口Ethernet1/0/1上匹配ACL 2000的流量监管的统计信息。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet1/0/1

[Sysname-Ethernet1/0/1] reset traffic-limit inbound ip-group 2000

1.1.25  reset traffic-limit vlan

【命令】

reset traffic-limit vlan vlan-id inbound acl-rule

【视图】

系统视图

【参数】

vlan vlan-id:VLAN编号,取值范围为1~4094,。

inbound:表示清除接收到的数据包的统计信息。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。

【描述】

reset traffic-limit vlan命令用来清除VLAN上配置的流量监管功能的统计信息。

相关配置可参考命令traffic-limit vlan

【举例】

# 清除交换机VLAN 1上匹配ACL 2000的流量监管的统计信息。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] reset traffic-limit vlan 1 inbound ip-group 2000

1.1.26  reset traffic-statistic

【命令】

reset traffic-statistic inbound acl-rule

【视图】

系统视图/以太网端口视图

【参数】

inbound:表示清除接收到的数据包的统计信息。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。

【描述】

reset traffic-statistic命令用来清除全局或端口配置的流量统计信息。

相关配置可参考命令traffic-statistic

【举例】

# 清除交换机端口Ethernet1/0/1上匹配ACL 2000的流量统计信息。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet1/0/1

[Sysname-Ethernet1/0/1] reset traffic-statistic inbound ip-group 2000

1.1.27  reset traffic-statistic vlan

【命令】

reset traffic-statistic vlan vlan-id inbound acl-rule

【视图】

系统视图

【参数】

vlan vlan-id:VLAN编号,取值范围为1~4094。

inbound:表示清除接收到的数据包的统计信息。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。

【描述】

reset traffic-statistic vlan命令用来清除VLAN上配置的流量统计信息。

相关配置可参考命令traffic-statistic vlan

【举例】

# 清除交换机VLAN 1上匹配ACL 2000的流量统计信息。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] reset traffic-statistic vlan 1 inbound ip-group 2000

1.1.28  traffic-limit

【命令】

traffic-limit inbound acl-rule target-rate [ exceed exceed-action ] [ meter-statistic ]

undo traffic-limit inbound acl-rule [ meter-statistic ]

【视图】

系统视图/以太网端口视图

【参数】

inbound:表示对接收到的数据包进行流量监管。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

target-rate:对报文限制的速率,单位为Kbps。系统视图下的取值范围为64~1000000,以太网端口视图下的取值范围为:

l              百兆以太网端口:64~99968

l              千兆以太网端口:64~1000000

速率限制的粒度为64Kbps,如果用户输入的数字在N*64~(N+1)*64之间(N为自然数),交换机将自动修改此值为(N+1)*64Kbps。

exceed exceed-action:设定报文流量超过设定流量时设备对超过部分的报文采取的动作,动作如下:

l              drop:丢弃报文。

l              forward:转发报文。

meter-statistic:流量监管的统计功能,统计在限制速率内的报文字节数和限制速率外的报文字节数。需要注意的是,针对同一条ACL规则,meter-statistic参数和流量统计功能在全局或端口上不能同时配置。

【描述】

traffic-limit命令用来在全局或端口引用ACL进行流识别,对匹配的报文进行流量监管,设定流量监管的参数,以及对流量范围内、外的报文分别采取不同的动作。undo traffic-limit命令用来取消全局或端口的流量监管配置。

缺省情况下,没有配置对全或端口的流量监管。

如果在设备上配置了广播风暴抑制、组播风暴抑制或端口接收报文限速功能,那么不能在该设备上配置流量监管功能。关于广播风暴抑制、组播风暴抑制的详细介绍请参见“端口基本配置”部分。

 

相关配置可参考命令display qos-interface traffic-limitreset traffic-limit

【举例】

# 在交换机端口Ethernet1/0/1上对匹配ACL 4000的规则的报文进行流量监管,限制速率为128kbps,丢弃超过此流量的数据包。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] acl number 4000

[Sysname-acl-ethernetframe-4000] rule permit source 200

[Sysname-acl-ethernetframe-4000] quit

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet1/0/1] traffic-limit inbound link-group 4000 128 exceed drop

1.1.29  traffic-limit vlan

【命令】

traffic-limit vlan vlan-id inbound acl-rule target-rate [ exceed exceed-action ] [ meter-statistic ]

undo traffic-limit vlan vlan-id inbound acl-rule [ meter-statistic ]

【视图】

系统视图

【参数】

vlan vlan-id:VLAN编号,取值范围为1~4094。

inbound:表示对接收到的数据包进行流量监管。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

target-rate:对报文限制的速率,单位为Kbps,取值范围为64~1000000。

速率限制的粒度为64Kbps,如果用户输入的数字在N*64~(N+1)*64之间(N为自然数),交换机将自动修改此值为(N+1)*64Kbps。

exceed exceed-action:设定报文流量超过设定流量时设备对超过部分的报文采取的动作,动作如下:

l              drop:丢弃报文。

l              forward:转发报文。

meter-statistic:流量监管的统计功能,统计在限制速率内的报文字节数和限制速率外的报文字节数。需要注意的是,针对同一条ACL规则,meter-statistic参数和流量统计功能在VLAN上不能同时配置。

【描述】

traffic-limit vlan命令用来在VLAN上引用ACL进行流识别,对匹配的报文进行流量监管,设定流量监管的参数,以及对流量范围内、外的报文分别采取不同的动作。undo traffic-limit vlan命令用来取消VLAN上的流量监管配置。

缺省情况下,没有配置VLAN上的流量监管。

l    在VLAN上配置的流量监管只能对带有802.1Q标签头的报文生效。

l    如果在设备上配置了广播风暴抑制、组播风暴抑制或端口接收报文限速功能,那么不能在该设备上配置流量监管功能。关于广播风暴抑制、组播风暴抑制的详细介绍请参见“端口基本配置”部分。

 

相关配置可参考命令display qos-vlanreset traffic-limit vlan

【举例】

# 在交换机VLAN 1上对匹配ACL 4000的规则的报文进行流量监管。限制速率为128Kbps,丢弃超过此流量的数据包。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] traffic-limit vlan 1 inbound link-group 4000 128 exceed drop

1.1.30  traffic-priority

【命令】

traffic-priority inbound acl-rule local-precedence pre-value

undo traffic-priority inbound acl-rule

【视图】

系统视图/以太网端口视图

【参数】

inbound:表示对接收到的数据包进行优先级重新标记。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

local-precedence pre-value:本地优先级,取值范围为0~3。

【描述】

traffic-priority命令用来在全局端口引用ACL进行流识别,为匹配的报文重新指定本地优先级。undo traffic-priority命令用来取消全局或端口的优先级重新标记配置。

缺省情况下,没有配置全局或端口的本地优先级重标记。

相关配置可参考命令display qos-interface traffic-priority

【举例】

# 在交换机端口Ethernet1/0/1上配置优先级重标记,将匹配ACL 4000规则的报文的本地优先级标记为1。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] acl number 4000

[Sysname-acl-ethernetframe-4000] rule permit cos 5

[Sysname-acl-ethernetframe-4000] quit

[Sysname] interface Ethernet1/0/1

[Sysname-Ethernet1/0/1] traffic-priority inbound link-group 4000 local-precedence 1

1.1.31  traffic-priority vlan

【命令】

traffic-priority vlan vlan-id inbound acl-rule local-precedence pre-value

undo traffic-priority vlan vlan-id inbound acl-rule

【视图】

系统视图

【参数】

vlan vlan-id:VLAN编号,取值范围为1~4094。

inbound :表示对接收到的数据包进行优先级重新标记。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

local-precedence pre-value:本地优先级,取值范围为0~3。

【描述】

traffic-priority vlan命令用来在VLAN上引用ACL进行流识别,为匹配的报文重新指定本地优先级。undo traffic-priority vlan命令用来取消VLAN上的优先级重新标记配置。

缺省情况下,没有配置VLAN上的本地优先级重标记。

相关配置可参考命令display qos-vlan

在VLAN上配置的优先级重标记只能对带有802.1Q标签头的报文生效。

 

【举例】

# 在交换机的VLAN 1上配置优先级重标记,将匹配ACL 4000规则的报文的本地优先级标记为1。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] acl number 4000

[Sysname-acl-ethernetframe-4000] rule permit cos 3 dest 000f-e200-1234 ffff-ffff-ffff

[Sysname] traffic-priority vlan 1 inbound link-group 4000 local-precedence 1

1.1.32  traffic-redirect

【命令】

traffic-redirect inbound acl-rule { cpu | interface interface-type interface-number }

undo traffic-redirect inbound acl-rule

【视图】

系统视图/以太网端口视图

【参数】

inbound:表示对接收到的数据包进行报文重定向。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

cpu:将报文重定向至CPU。

interface interface-type interface-number:将报文重定向至指定的端口,interface-type为端口类型,interface-number为端口编号。

【描述】

traffic-redirect命令用来在全局或端口引用ACL进行流识别,对匹配的报文重定向到指定的CPU或端口。undo traffic-redirect命令用来取消全局或端口的重定向配置。

缺省情况下,没有对全局或端口的配置优先级重标记。

相关配置可参考命令display qos-interface traffic-redirect

需要注意的是,针对匹配同一条ACL规则的数据流,重定向功能和流镜像功能在全局或端口上不能同时配置。

l    当报文被重定向到CPU后,将不能再正常转发。

l    如果重定向目的端口为处于Down状态的Combo端口,系统会把匹配的报文重定向到与此Combo端口相对应处于Up状态的普通端口。关于Combo端口的详细介绍请参见“端口基本配置”部分。

 

【举例】

# 在以太网交换机端口Ethernet1/0/1上对匹配ACL 2000规则的报文进行重定向,重定向至端口Ethernet1/0/7。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] acl number 2000

[Sysname-acl-basic-2000] rule permit source 1.1.1.0 0.0.0.255

[Sysname-acl-basic-2000] quit

[Sysname] interface Ethernet1/0/1

[Sysname-Ethernet1/0/1] traffic-redirect inbound ip-group 2000 interface Ethernet1/0/7

1.1.33  traffic-redirect vlan

【命令】

traffic-redirect vlan vlan-id inbound acl-rule { cpu | interface interface-type interface-number }

undo traffic-redirect vlan vlan-id inbound acl-rule

【视图】

系统视图

【参数】

vlan vlan-id:VLAN编号,取值范围为1~4094。

inbound:表示对接收到的数据包进行报文重定向。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

cpu:将报文重定向至CPU。

interface interface-type interface-number:将报文重定向至指定的以太网端口,interface-type为端口类型,interface-number为端口编号。

【描述】

traffic-redirect vlan命令用来在VLAN上引用ACL进行流识别,对匹配的报文重定向到CPU或指定的端口。undo traffic-redirect vlan命令用来取消VLAN上的重定向配置。

缺省情况下,没有配置VLAN上优先级重标记。

相关配置可参考命令display qos-vlan

需要注意的是,针对同一条ACL规则,重定向功能和流镜像功能在VLAN上不能同时配置。

l    在VLAN上配置的重定向只能对带有802.1Q标签头的报文生效。

l    当报文被重定向到CPU后,将不能再正常转发。

l    如果重定向目的端口为处于Down状态的Combo端口,系统会把匹配的报文重定向到与此Combo端口相对应处于Up状态的普通端口。关于Combo端口的详细介绍请参见“端口基本配置”部分。

 

【举例】

# 在交换机的VLAN 1上对匹配ACL 2000规则的报文进行重定向,重定向至端口Ethernet1/0/7。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] acl number 2000

[Sysname-acl-basic-2000] rule permit source 1.1.1.0 0.0.0.255

[Sysname-acl-basic-2000] quit

[Sysname] traffic-redirect vlan 1 inbound ip-group 2000 interface Ethernet1/0/7

1.1.34  traffic-statistic

【命令】

traffic-statistic inbound acl-rule

undo traffic-statistic inbound acl-rule

【视图】

系统视图/以太网端口视图

【参数】

inbound:表示对接收到的数据包进行统计。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

【描述】

traffic-statistic命令用来在全局或端口引用ACL进行流识别,对匹配的报文进行流量统计。undo traffic-statistic命令用来取消全局或端口的流量统计配置。

需要注意的是,针对同一条ACL规则,流量统计功能和流量监管中的meter-statistic参数在全局或端口上不能同时配置。

相关配置可参考命令display qos-interface traffic-statisticreset traffic-statistic

【举例】

# 在交换机端口Ethernet1/0/1上对匹配ACL 2000规则的报文进行流量统计。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] acl number 2000

[Sysname-acl-basic-2000] rule permit source 1.1.1.0 0.0.0.255

[Sysname-acl-basic-2000] quit

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet1/0/1] traffic-statistic inbound ip-group 2000

1.1.35  traffic-statistic vlan

【命令】

traffic-statistic vlan vlan-id inbound acl-rule

undo traffic-statistic vlan vlan-id inbound acl-rule

【视图】

系统视图

【参数】

vlan vlan-id:VLAN编号,取值范围为1~4094。

inbound:表示对接收到的数据包进行统计。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。需要注意的是,ACL规则中定义的动作必须为permit

【描述】

traffic-statistic vlan命令用来在VLAN上引用ACL进行流识别,对匹配的报文进行流量统计。undo traffic-statistic vlan命令用来取消VLAN上的流量统计配置。

需要注意的是,针对同一条ACL规则,流量统计功能和流量监管中的meter-statistic参数在VLAN上不能同时配置。

在VLAN上配置的流量统计只能对带有802.1Q标签头的报文生效。

 

相关配置可参考命令display qos-vlanreset traffic-statistic vlan

【举例】

# 在交换机的VLAN 1上对匹配ACL 2000规则的报文进行流量统计。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] acl number 2000

[Sysname-acl-basic-2000] rule permit source 1.1.1.0 0.0.0.255

[Sysname-acl-basic-2000] quit

[Sysname] traffic-statistic vlan 1 inbound ip-group 2000

 


2 QoS Profile命令

2.1  QoS Profile命令

2.1.1  apply qos-profile

【命令】

系统视图下的命令形式:

apply qos-profile profile-name interface interface-list

undo apply qos-profile profile-name interface interface-list

以太网端口视图下的命令形式:

apply qos-profile profile-name

undo apply qos-profile profile-name

【视图】

系统视图/以太网端口视图

【参数】

profile-name:QoS Profile的名称,以英文字母a~z或A~Z为起始字母的字符串(不区分大小写),取值范围为1~32个字符。

interface-list:以太网端口列表,表示多个以太网端口,表示方式为interface-listinterface-type interface-number [ to interface-type interface-number ]。其中nterface-typeinterface-number为端口类型和端口编号。

【描述】

apply qos-profile命令用来将QoS Profile的配置手工应用到指定端口上。undo apply qos-profile命令用来删除指定端口上应用的QoS Profile配置。

用户可以在端口视图下为当前端口应用QoS Profile,也可以在系统视图下为多个端口应用QoS Profile。

【举例】

# 将名字为a123的QoS Profile手工应用到端口Ethernet 1/0/1上。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet1/0/1] apply qos-profile a123

# 将名字为a123的QoS Profile手工应用到端口Ethernet 1/0/1至Ethernet 1/0/4上。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] apply qos-profile a123 interface Ethernet 1/0/1 to Ethernet 1/0/4

2.1.2  display qos-profile

【命令】

display qos-profile { all | name profile-name | interface interface-type interface-number | user user-name }

【视图】

任意视图

【参数】

all:显示所有的QoS Profile。

name profile-name::显示指定名称的QoS Profile,名称是以英文字母a~z或A~Z为起始字母的字符串(不区分大小写),取值范围为1~32个字符。

interface interface-type interface-number:端口类型和端口编号,显示指定端口下应用的QoS Profile。

user user-name:通过802.1X认证的用户的用户名,user-name样式为aa@cc,其中aa为用户名,cc为域名,取值范围为1~184个字符。

【描述】

display qos-profile命令用来显示QoS Profile的配置信息。

【举例】

# 显示名字为testQoS Profile的配置信息。

<Sysname> display qos-profile name test

qos-profile: test, 3 actions

 packet-filter inbound ip-group 2000 rule 0

 traffic-limit inbound ip-group 3000 rule 0 64

 traffic-priority inbound ip-group 4000 rule 0 cos controlled-load

# 显示为用户名为abc,域名为net的802.1x认证用户通过认证后指定的QoS Profile的配置信息。

<Sysname> display qos-profile user abc@net

User abc@net applied qos-profile: test, 3 actions

 packet-filter inbound ip-group 2000 rule 0

 traffic-limit inbound ip-group 3000 rule 0 64

 traffic-priority inbound ip-group 4000 rule 0 cos controlled-load

# 显示端口Ethernet 1/0/1上应用的QoS Profile的配置信息。端口Ethernet 1/0/1上QoS Profile的应用方式为手工应用。

<Sysname> display qos-profile interface Ethernet 1/0/1

User's qos-profile applied mode: user-based

 

Default applied qos-profile: test, 3 actions

 packet-filter inbound ip-group 2000 rule 0

 traffic-limit inbound ip-group 3000 rule 0 64

 traffic-priority inbound ip-group 4000 rule 0 cos controlled-load

# 显示端口Ethernet 1/0/2上应用的QoS Profile的配置信息。端口Ethernet 1/0/2上QoS Profile的应用方式为动态应用。

<Sysname> display qos-profile interface Ethernet 1/0/2

User's qos-profile applied mode: port-based

 

User abc@net applied qos-profile: test, 3 actions

 packet-filter inbound ip-group 2000 rule 0

 traffic-limit inbound ip-group 3000 rule 0 64

 traffic-priority inbound ip-group 4000 rule 0 cos controlled-load

表2-1 display qos-profile命令显示信息描述表

字段

描述

qos-profile: test, 3 actions

QoS Profile的名字以及包含的动作个数

packet-filter inbound ip-group 2000 rule 0

 对匹配基本ACL2000 rule 0的报文执行包过滤动作

traffic-limit inbound ip-group 3000 rule 0 64

给匹配高级ACL3000 rule 0的报文承诺的速率为64Kbps

traffic-priority inbound ip-group 4000 rule 0 cos controlled-load

对匹配二层ACL4000 rule 0的报文重标记CoS优先级为4,对应关键字为controlled-load

User abc@net applied qos-profile: test, 3 actions

用户名为acb,域名为net的802.1x认证用户对应的QoS Profile名称为test,包含三个动作

User's qos-profile applied mode

QoS Profile动态应用时的应用模式:

l      User-based模式

l      Port-based模式

关于这两种模式的介绍请参见操作手册

Default applied qos-profile: test, 3 actions

Default表示名称为test的QoS Profile在端口Ethernet 1/0/1为手工应用,包含三个QoS动作

User abc@net applied qos-profile: test, 3 actions

用户名为abc,域名为net的802.1x认证用户接入的端口Ethernet 1/0/2动态应用了名称为test,包含3个动作的QoS Profile

 

2.1.3  packet-filter

【命令】

packet-filter inbound acl-rule

undo packet-filter inbound acl-rule

【视图】

QoS Profile视图

【参数】

inbound:表示对端口接收到的数据包进行过滤。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示。

【描述】

packet-filter命令用来配置QoS Profile中的包过滤功能。undo packet-filter命令用来删除QoS Profile中包过滤功能。

关于包过滤的详细介绍请参见“ACL”部分。

需要注意的是,如果QoS Profile已经应用到端口上,则用户不能删除其中的包过滤功能。

【举例】

# 在名字为a123的QoS Profile中增加包过滤操作,对交换机接收的匹配二层ACL 4000的报文进行过滤,

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] qos-profile a123

[Sysname-qos-profile-a123] packet-filter inbound link-group 4000

2.1.4  qos-profile

【命令】

qos-profile profile-name

undo qos-profile profile-name

【视图】

系统视图

【参数】

profile-name:QoS Profile的名字,以英文字母a~z或A~Z为起始字母的字符串(不区分大小写),取值范围为1~32个字符。为避免混淆,QoS Profile的名字不能为all、interface、user、undo和name。

【描述】

qos-profile命令用来创建QoS Profile并进入相应的QoS Profile视图。undo qos-profile命令用来删除QoS Profile。

需要注意的是,用户不能修改或删除已经应用于端口的QoS Profile。如果想修改或删除已应用到端口的QoS Profile,需先取消应用。

l              对于通过手工方式应用到端口的QoS Profile,可通过undo apply qos-profile命令取消应用;

l              对于通过动态方式应用到端口的QoS Profile,可通过使对应用户强制下线来取消应用。

【举例】

# 创建名字为a123的QoS Profile。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] qos-profile a123

[Sysname-qos-profile-a123]

2.1.5  qos-profile port-based

【命令】

qos-profile port-based

undo qos-profile port-based

【视图】

以太网端口视图

【参数】

【描述】

qos-profile port-based命令用来配置QoS Profile在端口上的应用模式为基于端口的模式。undo qos-profile port-based命令用来恢复缺省情况。

缺省情况下,QoS Profile在端口上的应用模式为基于用户的模式。

需要注意的是:

l              如果802.1x配置为基于MAC地址认证,必须配置QoS Profile的应用模式为基于用户的模式;

l              如果802.1x配置为基于端口认证,必须配置QoS Profile的应用模式为基于端口的模式。

【举例】

# 在端口Ethernet 1/0/1上配置QoS Profile的应用模式为基于端口的模式。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet1/0/1] qos-profile port-based

2.1.6  traffic-limit

【命令】

traffic-limit inbound acl-rule target-rate [ exceed exceed-action ] [ meter-statistic ]

undo traffic-limit inbound acl-rule [ meter-statistic ]

【视图】

QoS Profile视图

【参数】

inbound:表示对接收到的数据包进行流量监管。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示,ACL规则用于进行流分类。需要注意的是,ACL规则中定义的动作必须为permit

target-rate:对报文限制的速率,单位为Kbps。取值范围为64~1000000。

速率限制的粒度为64Kbps,如果用户输入的数字在N*64~(N+1)*64之间(N为自然数),交换机将自动修改此值为(N+1)*64Kbps。

exceed exceed-action:设定报文流量超过设定流量时设备对超过部分的报文采取的动作,动作如下:

l              drop:丢弃报文。

l              forward:转发报文。

meter-statistic:流量监管的统计功能,统计在限制速率内的报文字节数和限制速率外的报文字节数。

【描述】

traffic-limit命令用来配置QoS Profile中的流量监管功能。undo traffic-limit命令用来删除QoS Profile中的流量监管功能。

需要注意的是,如果QoS Profile已经应用到端口上,则用户不能删除其中的流量监管功能。

【举例】

# 在名字为a123的QoS Profile中增加流量监管操作,对交换机接收的匹配基本ACL 2000的报文进行流量监管,限制速率为128Kbps,将超出的报文丢弃。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] qos-profile a123

[Sysname-qos-profile-a123] traffic-limit inbound  ip-group 2000 128 exceed drop

2.1.7  traffic-priority

【命令】

traffic-priority inbound acl-rule local-precedence pre-value

undo traffic-priority inbound acl-rule

【视图】

QoS Profile视图

【参数】

inbound:表示对接收到的数据包进行优先级重新标记。

acl-rule:应用的ACL规则,可以是多种ACL的组合。组合方式说明如表1-7表1-8所示,ACL规则用于进行流分类。需要注意的是,ACL规则中定义的动作必须为permit

local-precedence pre-value:本地优先级,取值范围为0~3。

【描述】

traffic-priority命令用来配置QoS Profile中的优先级标记功能。undo traffic-priority命令用来删除QoS Profile中的优先级标记功能。

需要注意的是,如果QoS Profile已经应用到端口上,则用户不能删除其中的优先级标记功能。

【举例】

# 在名字为a123的QoS Profile中增加优先级标记操作,将交换机接收的匹配二层ACL 4000的报文的本地优先级重新标记为1。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] qos-profile a123

[Sysname-qos-profile-a123] traffic-priority inbound link-group 4000 local-precedence 1

 

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

新华三官网
联系我们