26-QoS-QoS Profile命令
本章节下载 (253.89 KB)
目 录
1.1.1 display protocol-priority
1.1.2 display qos cos-local-precedence-map
1.1.3 display qos-interface all
1.1.4 display qos-interface line-rate
1.1.5 display qos-interface traffic-limit
1.1.6 display qos-interface traffic-priority
1.1.7 display qos-interface traffic-redirect
1.1.8 display qos-interface traffic-statistic
1.1.13 protocol-priority protocol-type
1.1.14 qos cos-local-precedence-map
1.1.16 reset traffic-statistic
【命令】
display protocol-priority
【视图】
任意视图
【参数】
无
【描述】
display protocol-priority命令用于显示协议报文的优先级。
【举例】
# 显示协议报文对应的优先级。
<H3C> display protocol-priority
Protocol: telnet
DSCP: be(0)
【命令】
display qos cos-local-precedence-map
【视图】
任意视图
【参数】
无
【描述】
display qos cos-local-precedence-map命令用来显示“COS—>Local-precedence”映射表。
【举例】
# 显示“COS—>Local -precedence”映射表。
<H3C> 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 1 2 3 4 5 6 7
【命令】
display qos-interface {interface-type interface-number | unit-id } all
【视图】
任意视图
【参数】
interface-type interface-number:交换机的端口。
unit-id:unit ID,表示显示某unit上的信息。
【描述】
display qos-interface all命令用来显示端口的所有QoS设置信息。如果不输入端口参数,本命令将显示交换机上所有端口的QoS参数设置,包括重标定优先级、队列调度、流量限速等配置信息;如果输入了端口参数,本命令将显示交换机上指定端口的QoS参数设置,包括重标定优先级、队列调度、流量限速等配置信息。
在有IRF功能的情况下,必须输入端口或unit ID。
【举例】
# 显示端口GigabitEthernet 1/0/1下的所有QoS参数配置。
<H3C> display qos-interface GigabitEthernet 1/0/1 all
GigabitEthernet1/0/1: traffic-limit
Inbound:
Matches: Acl 3001 rule 1 running
Target rate: 640 Kbps
Exceed action: remark-dscp 4
GigabitEthernet1/0/1: traffic-priority
Inbound:
Matches: Acl 2000 rule 0 running
Priority action: dscp ef
GigabitEthernet1/0/1: traffic-redirect
Inbound:
Matches: Acl 3000 rule 0 running
Redirected to: interface GigabitEthernet1/0/22
GigabitEthernet1/0/1: traffic-statistic
Inbound:
Matches: Acl 3000 rule 0 running
0 packet inprofile
0 packet outprofi
GigabitEthernet1/0/1: line-rate
Outbound: 1024 Kbps
GigabitEthernet1/0/1:
Queue scheduling mode: strict-priority
【命令】
display qos-interface { interface-type interface-number | unit-id } line-rate
【视图】
任意视图
【参数】
interface-type interface-number:交换机的端口。
unit-id:unit ID,表示显示某unit上的信息。
【描述】
display qos-interface line-rate命令用来显示端口流量限速的参数设置,包括端口及其限制的流量速率。如果不输入端口参数,本命令将显示所有端口流量限速的参数设置;如果输入了端口参数,本命令将显示交换机上指定端口的流量限速的参数设置。
【举例】
# 显示端口流量限制的参数配置。
<H3C> display qos-interface 1 line-rate
GigabitEthernet1/0/1: line-rate
Outbound: 128 kbps
【命令】
display qos-interface { interface-type interface-number | unit-id } traffic-limit
【视图】
任意视图
【参数】
interface-type interface-number:交换机的端口。
unit-id:unit ID,表示显示某unit上的信息。
【描述】
display qos-interface traffic-limit命令用来显示流量限速的参数设置。显示的内容包括需限速的流量的ACL、承诺平均速率、以及相关监管动作的设置等信息。
相关配置可参考命令traffic-limit。
【举例】
# 显示流量限制的参数配置。
<H3C> display qos-interface GigabitEthernet 1/0/1 traffic-limit
GigabitEthernet1/0/1: traffic-limit
Inbound:
Matches: Acl 3001 rule 1 running
Target rate: 640 Kbps
Exceed action: remark-dscp 4
【命令】
display qos-interface { interface-type interface-number | unit-id } traffic-priority
【视图】
任意视图
【参数】
interface-type interface-number:交换机的端口。
unit-id:unit ID,表示显示某unit上的信息。
【描述】
display qos-interface traffic-priority命令用来显示优先级标记的参数设置。显示的内容包括进行优先级标记的流量对应的ACL、进行优先级标记的类型和值等信息。
相关配置可参考命令traffic-priority。
【举例】
# 显示优先级标记的参数配置。
<H3C> display qos-interface GigabitEthernet 1/0/1 traffic-priority
GigabitEthernet1/0/1: traffic-priority
Inbound:
Matches: Acl 2000 rule 0 running
Priority action: dscp ef
【命令】
display qos-interface { interface-type interface-number | unit-id } traffic-redirect
【视图】
任意视图
【参数】
interface-type interface-number:交换机的端口。
unit-id:unit ID,表示显示某unit上的信息。
【描述】
display qos-interface traffic-redirect命令用来显示重定向的参数设置。显示的内容包括需进行重定向的流量对应的ACL、重定向的端口等信息。
相关配置可参考命令traffic-redirect。
【举例】
# 显示重定向的参数配置。
<H3C> display qos-interface GigabitEthernet 1/0/1 traffic-redirect
GigabitEthernet1/0/1: traffic-redirect
Inbound:
Matches: Acl 3000 rule 0 running
Redirected to: interface GigabitEthernet1/0/22
【命令】
display qos-interface { interface-type interface-number | unit-id } traffic-statistic
【视图】
任意视图
【参数】
interface-type interface-number:交换机的端口。
unit-id:unit ID,表示显示某unit上的信息。
【描述】
display qos-interface traffic-statistic命令用来显示流量统计信息。显示的内容包括需进行流量统计的流量对应的ACL、统计的报文数目等信息。
相关配置可参考命令traffic-statistic。
【举例】
# 显示流量统计信息。
<H3C> display qos-interface GigabitEthernet 1/0/1 traffic-statistic
GigabitEthernet1/0/1: traffic-statistic
Inbound:
Matches: Acl 2000 rule 2 running
0 packet inprofile
0 packet outprofile
【命令】
display queue-scheduler
【视图】
任意视图
【参数】
无
【描述】
display queue-scheduler命令用来显示全局配置的队列调度模式及参数。
相关配置可参考命令queue-scheduler。
【举例】
# 显示全局配置的队列调度模式及参数。
<H3C> display queue-scheduler
Queue scheduling mode: strict-priority
【命令】
line-rate outbound target-rate
undo line-rate outbound
【视图】
以太网端口视图
【参数】
outbound:对端口发送报文进行速率限制。
target-rate:对端口报文限制的总速率,单位Kbps,速率限制的粒度为64,如果用户输入的数字在N*64~(N+1)*64之间(N为自然数),交换机自动将该参数取值为(N+1)*64。端口的取值范围为64~1000000
【描述】
line-rate命令用来对端口报文的总速率进行限制。undo line-rate命令用来取消端口限速的配置。
速率限制的粒度为64Kbps。
【举例】
# 限制端口GigabitEthernet 1/0/1发送报文的速率为128Kbps。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] line-rate outbound 128
【命令】
priority priority-level
undo priority
【视图】
以太网端口视图
【参数】
priority-level:端口优先级的取值,范围为0~7。
【描述】
priority命令用来设置以太网端口的优先级。undo priority命令用来恢复优先级缺省配置。
缺省情况下,交换机使用端口优先级替换报文携带的802.1p优先级,端口优先级为0。
使用本命令配置之后,交换机将报文接收端口的优先级替换报文中携带的802.1p优先级。然后交换机就会根据替换后的报文优先级将报文放入相应的端口输出队列。
【举例】
# 设置GigabitEthernet 1/0/1端口的优先级为6。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] priority 6
【命令】
priority trust
undo priority
【视图】
以太网端口视图
【参数】
无
【描述】
priority trust命令用来设置交换机不使用端口优先级替换报文的802.1p优先级,而是信任报文自己带有的802.1p优先级。undo priority命令用来恢复交换机对端口优先级替换功能的缺省情况。
缺省情况下,交换机上端口接收的报文本身所带的优先级将被本端口的优先级所代替。
【举例】
# 设置信任端口GigabitEthernet 1/0/1接收报文自己带有的优先级。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] priority trust
【命令】
protocol-priority protocol-type protocol-type { ip-precedence ip-precedence | dscp dscp-value }
undo protocol-priority protocol-type protocol-type
【视图】
系统视图
【参数】
protocol-type protocol-type:表示协议类型,目前支持BGP、TELNET、SNMP、ICMP、OSPF。
ip-precedence ip-precedence:IP优先级,取值范围0~7。用户也可输入如表1-1所示的关键字。
关键字 |
IP Precedence值(十进制) |
IP Precedence值(二进制) |
routine |
0 |
000 |
priority |
1 |
001 |
immediate |
2 |
010 |
flash |
3 |
011 |
flash-override |
4 |
100 |
critical |
5 |
101 |
internet |
6 |
110 |
network |
7 |
111 |
dscp dscp-value:DSCP优先级,取值范围0~63。用户也可输入如表1-2所示的关键字。
表1-2 DSCP值说明
关键字 |
DSCP值(十进制) |
DSCP值(二进制) |
ef |
46 |
101110 |
af11 |
10 |
001010 |
af12 |
12 |
001100 |
af13 |
14 |
001110 |
af21 |
18 |
010010 |
af22 |
20 |
010100 |
af23 |
22 |
010110 |
af31 |
26 |
011010 |
af32 |
28 |
011100 |
af33 |
30 |
011110 |
af41 |
34 |
100010 |
af42 |
36 |
100100 |
af43 |
38 |
100110 |
cs1 |
8 |
001000 |
cs2 |
16 |
010000 |
cs3 |
24 |
011000 |
cs4 |
32 |
100000 |
cs5 |
40 |
101000 |
cs6 |
48 |
110000 |
cs7 |
56 |
111000 |
be (default) |
0 |
000000 |
【描述】
protocol-priority命令用于设置某个协议对应的全局优先级。undo protocol-priority命令用于取消协议优先级设置。
【举例】
# 设置SNMP协议的IP优先级为3。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] protocol-priority protocol-type snmp ip-precedence 3
【命令】
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到local-prec的映射值。取值范围0~7。
cos1-map-local-prec:表示COS 1到local-prec的映射值。取值范围0~7。
cos2-map-local-prec:表示COS 2到local-prec的映射值。取值范围0~7。
cos3-map-local-prec:表示COS 3到local-prec的映射值。取值范围0~7。
cos4-map-local-prec:表示COS 4到local-prec的映射值。取值范围0~7。
cos5-map-local-prec:表示COS 5到local-prec的映射值。取值范围0~7。
cos6-map-local-prec:表示COS 6到local-prec的映射值。取值范围0~7。
cos7-map-local-prec:表示COS 7到local-prec的映射值。取值范围0~7。
【描述】
qos cos-local-precedence-map命令用来配置“COS —>Local-precedence”映射表。undo qos cos-local-precedence-map命令用来将“COS —>Local-precedence”映射表恢复为缺省值。
缺省情况下,系统提供缺省的“COS —>Local-precedence”映射表。
表1-3 缺省的“COS —>Local-precedence”映射关系
COS Value |
Local Precedence |
0 |
2 |
1 |
0 |
2 |
1 |
3 |
3 |
4 |
4 |
5 |
5 |
6 |
6 |
7 |
7 |
【举例】
# 配置“COS —>Local-precedence”映射表。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] qos cos-local-precedence-map 0 1 2 3 4 5 6 7
则配置完毕后的“COS —>Local-precedence”映射表如下所示。
表1-4 “COS —>Local-precedence”映射表
COS Value |
Local Precedence |
0 |
0 |
1 |
1 |
2 |
2 |
3 |
3 |
4 |
4 |
5 |
5 |
6 |
6 |
7 |
7 |
【命令】
queue-scheduler { strict-priority | wrr queue0-weight queue1-weight queue2-weight queue3-weight queue4-weight queue5-weight queue6-weight queue7-weight }
undo queue-scheduler
queue-scheduler wrr queue0-weight queue1-weight queue2-weight queue3-weight queue4-weight queue5-weight queue6-weight queue7-weight
undo queue-scheduler
【视图】
系统视图/以太网端口视图
【参数】
strict-priority:表示队列实行严格优先级调度算法。
wrr:表明队列实行加权轮循调度算法。
queue0-weight queue1-weight queue2-weight queue3-weight queue4-weight queue5-weight queue6-weight queue7-weight:分别是队列0~7的权重。权重的取值范围0~15。如果取值为0,表示此队列使用实行严格优先级调度算法。
【描述】
queue-scheduler命令用来设置队列调度算法及参数。undo queue-scheduler命令用来恢复队列调度算法的缺省值。
在全局视图下用queue-scheduler命令定义的队列调度算法会在设备的所有端口上生效;在以太网端口视图下用queue-scheduler命令定义的队列调度算法只在当前端口生效。如果全局定义的WRR队列调度算法中各队列的权值不能满足某一端口的需求,用户可在此端口视图下修改其队列权值。在此端口上,新定义的队列权值会覆盖全局定义的队列权值。在端口视图下定义的队列权值不能用display queue-scheduler命令来显示。
交换机的端口支持8个输出队列,用户可以根据需要配置队列调度方法为SP或WRR。配置为WRR时,如果某一个或多个队列的权值设为0,则对于这个或这些队列实行严格优先级调度算法,其他队列仍然使用WRR调度算法。即可以通过设置,实现SP+WRR的功能。
缺省情况下,端口所有输出队列采用WRR队列调度方法,权重为1:2:3:4:5:9:13:15。
相关配置可参考命令display queue-scheduler。
【举例】
# 设置端口GigabitEthernet1/0/1的队列调度模式为SP+WRR,队列0、1使用SP调度模式;其它队列使用WRR调度模式,权重分别为3、4、5、6、7、8。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] queue-scheduler wrr 0 0 3 4 5 6 7 8
【命令】
reset traffic-statistic inbound acl-rule
【视图】
以太网端口视图
【参数】
inbound :表示清除端口接收到的数据包的统计信息。
acl-rule:下发的ACL,可以是多种ACL的组合。组合方式及相应参数说明如表1-5与表1-6。
表1-5 组合下发ACL的方式
组合方式 |
acl-rule的形式 |
单独下发一个IP型ACL中所有规则 |
ip-group acl-number |
单独下发一个IP型ACL中一条规则 |
ip-group acl-number rule rule-id |
单独下发一个Link型ACL中所有规则 |
link-group acl-number |
单独下发一个Link型ACL中一条规则 |
link-group acl-number rule rule-id |
单独下发一个用户自定义ACL中所有规则 |
user-group acl-number |
单独下发一个用户自定义ACL中一条规则 |
user-group acl-number rule rule-id |
同时下发IP型ACL中一条规则和一个Link型ACL的一条规则 |
ip-group acl-number rule rule-id link-group acl-number rule rule-id |
表1-6 ACL组合方式参数说明
参数 |
说明 |
ip-group acl-number |
基本或高级ACL序号,取值范围为2000~3999。 |
link-group acl-number |
二层ACL序号,取值范围为4000~4999。 |
user-group acl-number |
用户自定义的ACL序号,取值范围为5000~5999。 |
rule-id |
ACL规则序号,取值范围为0~65534。如果不指定则表示ACL中的所有规则。 |
【描述】
reset traffic-statistic命令用来清除流量统计信息,可以清除所有或指定流量的统计信息。
【举例】
# 清除GigabitEthernet1/0/1端口收到的匹配ACL 2000的流量统计信息。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] reset traffic-statistic inbound ip-group 2000
【命令】
traffic-limit inbound acl-rule target-rate [ exceed action ]
undo traffic-limit inbound acl-rule
【视图】
以太网端口视图
【参数】
inbound:表示对端口接收到的数据包进行流量监管。
acl-rule:下发的ACL,可以是多种ACL的组合,组合方式及相应参数说明分别参见表1-5与表1-6。
target-rate:对端口接收报文限制的总速率,单位Kbps,速率限制的粒度为64,如果用户输入的数字在N*64~(N+1)*64之间(N为自然数),交换机自动将该参数取值为(N+1)*64,端口的取值范围为64~1000000
exceed action:可选参数,为数据包的流量超过设定流量时采取的动作,有如下动作:
l drop:丢弃报文;
l remark-dscp value:设置新的DSCP值。
【描述】
traffic-limit命令用来启动ACL流识别,进行流量监管,流量范围内、外的报文分别采取不同的动作。undo traffic-limit命令用来取消流量监管。
流量监管的粒度为64Kbps。
本命令仅对ACL中动作为permit的规则有效。
【举例】
# 设置对GigabitEthernet1/0/1端口收到的匹配ACL 4000中permit规则的数据包进行流量监管。限制速率设为128Kbps,丢弃超过此流量的数据包。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] traffic-limit inbound link-group 4000 128 exceed drop
【命令】
traffic-priority inbound acl-rule { { dscp dscp-value | ip-precedence { pre-value | from-cos } } | cos { pre-value | from-ipprec } | local-precedence pre-value }*
undo traffic-priority inbound acl-rule
【视图】
以太网端口视图
【参数】
inbound :表示对端口接收到的数据包进行优先级重新标记。
acl-rule:下发的ACL,可以是多种ACL的组合,组合方式及相应参数说明分别参见表1-5与表1-6。
dscp dscp-value:设置DSCP优先级,取值范围为0~63。用户也可输入如表1-2所示的关键字。
ip-precedence { pre-value | from-cos }:设置IP优先级,pre-value为IP优先级,取值范围为0~7,用户也可输入如表1-1所示的关键字;from-cos表示将IP优先级设为与802.1p优先级相同,选用此参数后不能在同一命令中定义802.1p优先级。
cos { pre-value | from-ipprec }:设置802.1p优先级,pre-value为802.1p优先级,取值范围为0~7,用户也可输入如表1-7所示的关键字;from-ipprec表示将802.1p优先级设为与IP优先级相同,选用此参数后不能在同一命令中定义IP优先级。
表1-7 802.1p优先级值说明
关键字 |
802.1p优先级值(十进制) |
802.1p优先级值(二进制) |
best-effort |
0 |
000 |
background |
1 |
001 |
spare |
2 |
010 |
excellent-effort |
3 |
011 |
controlled-load |
4 |
100 |
video |
5 |
101 |
voice |
6 |
110 |
network-management |
7 |
111 |
local-precedence pre-value:设置本地优先级,取值范围为0~7。
【描述】
traffic-priority命令用来启动ACL进行流分类,为匹配的流重新指定优先级(仅对ACL中动作为permit的规则有效)。undo traffic-priority命令用来取消指定流的优先级重新标记功能。
& 说明:
交换机不支持COS优先级和local-precedence同时下发到硬件。
相关配置可参考命令display qos-interface traffic-priority。
【举例】
# 将GigabitEthernet1/0/1端口收到的匹配ACL 4000中permit规则的数据包的802.1p优先级标记为1。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] traffic-priority inbound link-group 4000 cos 1
【命令】
traffic-redirect inbound acl-rule { cpu | interface interface-type interface-number }
undo traffic-redirect inbound acl-rule
【视图】
以太网端口视图
【参数】
inbound:表示对接口接收到的数据包进行报文重定向。
acl-rule:下发的ACL,可以是多种ACL的组合,组合方式及相应参数说明分别参见表1-5与表1-6。
cpu:表示重定向至CPU。
interface interface-type interface-number:将报文重定向至指定的以太网端口。
【描述】
traffic-redirect命令用来启动ACL识别流,并进行重定向(仅对ACL中动作为permit的规则有效)。undo traffic-redirect命令用来取消重定向。
相关配置可参考命令display qos-interface traffic-redirect。
& 说明:
l 当报文被重定向到CPU后,将不再正常转发。
l 如果重定向目的端口为处于Down状态的Combo端口,系统会把匹配的报文重定向到与此Combo端口相对应处于Up状态的普通端口。
【举例】
# 对GigabitEthernet1/0/1端口收到的匹配ACL 2000中permit规则的数据包进行重定向,重定向至端口GigabitEthernet 1/0/7。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] traffic-redirect inbound ip-group 2000 interface GigabitEthernet 1/0/7
【命令】
traffic-statistic inbound acl-rule
undo traffic-statistic inbound acl-rule
【视图】
以太网端口视图
【参数】
inbound:表示对接口接收到的数据包进行统计。
acl-rule:下发的ACL,可以是多种ACL的组合,组合方式及相应参数说明分别参见表1-5与表1-6。
【描述】
traffic-statistic命令用来启动ACL识别流,并进行流量统计(仅对ACL中动作为permit的规则有效)。undo traffic-statistic命令用来取消流量统计。
traffic-statistic命令统计的信息包括数据包转发过程中的硬件匹配次数。使用命令display qos-interface traffic-statistic可以显示这些统计信息。
相关配置可参考命令display qos-interface traffic-statistic。
【举例】
# 对GigabitEthernet1/0/1端口收到的匹配ACL 2000中permit规则的数据包进行流量统计。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] traffic-statistic inbound ip-group 2000
【命令】
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的名字,为1~32个字符的字符串,以英文字母[a-z,A-Z]开始,并且不能为保留关键字all、interface、user、undo、user-based、port-based、name等。
interface-list:以太网端口列表,表示可以是多个以太网端口,表示方式为interface-list=interface-type interface-number [ to interface-type interface-number ]
【描述】
apply qos-profile命令用来将QoS profile的配置手动应用到指定端口上。undo apply qos-profile命令用来删除指定端口上的QoS profile配置。
如果QoS profile已经下发,交换机不允许用户删除该QoS profile,用户执行删除操作将不成功。
【举例】
# 将名字为a123的QoS profile手动应用到端口GigabitEthernet1/0/1上。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] apply qos-profile a123
# 将名字为a123的QoS profile手动应用到端口GigabitEthernet 1/0/1到GigabitEthernet 1/0/4上。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] apply qos-profile a123 interface GigabitEthernet 1/0/1 to GigabitEthernet 1/0/4
【命令】
display qos-profile { all | name profile-name | interface interface-type interface-number | user user-name }
【视图】
任意视图
【参数】
all:显示所有的QoS profile。
profile-name:显示指定名字的QoS profile,名字的取值范围为1~32个字符,并且不能为保留关键字all、interface、user、undo、user-based、port-based、name等。
interface interface-type interface-number:显示指定端口上下发的QoS profile。
user user-name:显示与指定用户对应的QoS profile。取值范围1~80个字符。
【描述】
display qos-profile命令用来显示QoS profile的配置信息。
【举例】
# 显示QoS profile。
<H3C> display qos-profile all
【命令】
packet-filter inbound acl-rule
undo packet-filter inbound acl-rule
【视图】
QoS profile视图
【参数】
inbound:表示对端口接收到的数据包进行过滤。
outbound:表示对端口发送的数据包进行过滤。
acl-rule:下发的ACL,可以是多种ACL的组合,组合方式及相应参数说明分别参见表1-5与表1-6。
【描述】
packet-filter命令用来向QoS profile添加包过滤功能。undo packet-filter命令用来从QoS profile中删除包过滤功能。
【举例】
# 在名字为a123的QoS profile中增加包过滤操作,操作的定义为:对接收的报文中匹配ACL 4000的数据包进行过滤,
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] qos-profile a123
[H3C-qos-profile-a123] packet-filter inbound link-group 4000
【命令】
qos-profile profile-name
undo qos-profile profile-name
【视图】
系统视图
【参数】
profile-name:QoS profile的名字,为1~32个字符的字符串,以英文字母[a-z,A-Z]开始,并且不能为保留关键字all、interface、user、undo、user-based、port-based、name等。
【描述】
qos-profile命令用来创建QoS profile并进入相应的qos-profile视图,如果该QoS profile已经存在,则qos-profile命令进入该QoS profile的视图。undo qos-profile命令用来删除QoS profile。
用户不能删除已经下发到端口的QoS profile。
【举例】
# 创建名字为a123的QoS profile。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] qos-profile a123
[H3C-qos-profile-a123]
【命令】
qos-profile port-based
undo qos-profile port-based
【视图】
以太网端口视图
【参数】
无
【描述】
qos-profile port-based命令用来配置QoS profile在端口上的应用模式是基于端口的模式。undo qos-profile port-based命令用来恢复QoS profile在端口上的缺省应用模式。
缺省情况下,QoS profile在端口上基于用户模式。
l 如果802.1x配置为基于MAC地址认证,必须配置QoS profile的应用模式为基于用户的模式;
l 如果802.1x配置为基于端口认证,必须配置QoS profile的应用模式为基于端口的模式。
在配置了QoS profile功能后,如果用户通过了认证,交换机将与之对应的QoS profile动态下发到用户接入的端口上。不同应用模式交换机的处理过程如下:
l user-based模式:如果QoS profile的流动作采用的流规则中定义了源信息(源MAC、源IP、源MAC+源IP),QoS profile将不能动态下发成功;如果没有源信息,交换机以原来的规则为模板,加入用户的源MAC信息和源IP信息,生成新的流规则,然后将QoS profile中所有的流动作应用到用户接入的端口。
l port-based模式:交换机直接将QoS profile中的动作应用到用户接入的端口上。使用本模式时,一个端口下接入的所有用户要使用相同的QoS profile。
【举例】
# 配置QoS profile在端口GigabitEthernet1/0/1上的应用模式是基于端口的模式。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] qos-profile port-based
【命令】
traffic-limit inbound acl-rule target-rate [ exceed exceed-action ]
undo traffic-limit inbound acl-rule
【视图】
QoS profile视图
【参数】
inbound :表示对接口接收到的数据包进行流量限制。
acl-rule:下发的ACL,可以是多种ACL的组合,组合方式及相应参数说明分别参见表1-5与表1-6。
target-rate:对端口接收报文限制的总速率,单位Kbps,速率限制的粒度为64,如果用户输入的数字在N*64~(N+1)*64之间(N为自然数),交换机自动将该参数取值为(N+1)*64,端口速率取值范围分别为64~1000000。
exceed action:可选参数,为数据包的流量超过设定流量时采取的动作,有如下动作:
l drop:丢弃报文;
l remark-dscp value:设置新的DSCP值。
【描述】
traffic-limit命令用来配置QoS profile中的流量监管功能。undo traffic-limit命令用来删除QoS profile中的流量监管功能。
用户不能删除已经下发到端口的流量监管功能。
【举例】
# 在名字为a123的QoS profile中增加流量监管操作,操作的定义为:对匹配ACL 2000的数据包进行流量限制,速率设为128Kbps,丢弃超过此流量的数据包。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] qos-profile a123
[H3C-qos-profile-a123] traffic-limit inbound ip-group 2000 128 exceed drop
【命令】
traffic-priority inbound acl-rule { { dscp dscp-value | ip-precedence { pre-value | from-cos } } | cos { pre-value | from-ipprec } | local-precedence pre-value }*
undo traffic-priority inbound acl-rule
【视图】
QoS profile视图
【参数】
inbound :表示对端口接收到的数据包进行优先级重新标记。
outbound :表示对端口发送的数据包进行优先级重新标记。
acl-rule:下发的ACL,可以是多种ACL的组合,组合方式及相应参数说明分别参见表1-5与表1-6。
dscp dscp-value:设置DSCP优先级,取值范围为0~63。用户也可输入如表1-2所示的关键字。
ip-precedence { pre-value | from-cos }:设置IP优先级,pre-value为IP优先级,取值范围为0~7,用户也可输入如表1-1所示的关键字;from-cos表示将IP优先级设为与802.1p优先级相同。
cos { pre-value | from-ipprec }:设置802.1p优先级,pre-value为802.1p优先级,取值范围为0~7,用户也可输入如表1-7所示的关键字;from-ipprec表示将802.1p优先级设为与IP优先级相同。
local-precedence pre-value:设置本地优先级,取值范围为0~7。
【描述】
traffic-priority命令用来启动ACL,进行优先级标记。undo traffic-priority命令用来取消优先级标记。
用户不能删除已经下发到端口的优先级标记功能。
& 说明:
交换机不支持COS优先级和local-precedence同时下发到硬件。
【举例】
# 在名字为a123的QoS profile中增加优先级标记操作,操作的定义为:对接收的数据包中匹配ACL 2000的数据包的本地优先级标记为0。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] qos-profile a123
[H3C-qos-profile-a123] traffic-priority inbound ip-group 2000 local-precedence 0
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!