Command Reference
S9300 and S9300X V200R019C10
This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Traffic Policing, Traffic Shaping, and Interface-based Rate Limiting Commands
- Command Support
- car (traffic behavior view)
- car (QoS profile view)
- car share
- display qos-profile
- display qos car
- display qos car statistics
- display qos configuration
- qos car
- qos car inbound
- qos-car exclude-interframe
- qos-profile
- qos-shaping exclude-interframe
- qos lr
- qos lr pps
- qos mac-car
- qos queue shaping
- reset qos car statistics
Command Support
Commands provided in this section and all the parameters in the commands are supported by all switch models by default, unless otherwise specified. For details, see specific commands.
car (traffic behavior view)
Function
The car command configures traffic policing in a traffic behavior.
The undo car command deletes traffic policing from a traffic behavior.
By default, traffic policing is not configured in a traffic behavior.
Format
car cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] [ share ] [ mode { color-blind | color-aware } ] [ green { discard | pass [ service-class class color color ] } | yellow { discard | pass [ service-class class color color ] } | red { discard | pass [ service-class class color color ] } ]*
undo car
Parameters
Parameter |
Description |
Value |
---|---|---|
cir cir-value |
Specifies the committed information rate (CIR), which is the average rate of traffic that can pass through an interface. |
The value is an integer that ranges from 8 to 4294967295, in kbit/s.
NOTE:
On SA series cards, the minimum CIR is 64 kbit/s. |
pir pir-value |
Specifies the peak information rate (PIR), which is the maximum rate of traffic that can pass through an interface. |
The value is an integer that ranges from 8 to 4294967295, in kbit/s.
NOTE:
On SA series cards, the minimum PIR is 64 kbit/s. The PIR must be greater than or equal to the CIR. The default PIR is equal to the CIR. |
cbs cbs-value |
Specifies the committed burst size (CBS), which is the average volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 10000 to 4294967295, in bytes. If the PIR is not set, the default CBS is 188 times the CIR. If the PIR is set, the default CBS is 125 times the CIR. NOTE:
If the default CBS is smaller than 10000 because the CIR or PIR is small, the device uses the CBS of 10000. If the default CBS is larger than 4294967295 because the CIR or PIR is large, the device uses the CBS of 4294967295. |
pbs pbs-value |
Specifies the peak burst size (PBS), which is the maximum volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 10000 to 4294967295, in bytes. If the PIR is not set, the default PBS is 313 times the CIR. If the PIR is set, the default PBS is 125 times the PIR. NOTE:
If the default PBS is smaller than 10000 because the CIR or PIR is small, the device uses the PBS of 10000. If the default PBS is larger than 4294967295 because the CIR or PIR is large, the device uses the PBS of 4294967295. |
share |
Indicates level-1 aggregated CAR. If level-1 aggregated CAR is defined in a traffic behavior, and a traffic classifier defining multiple matching rules is bound to this traffic behavior, traffic matching the traffic classifier shares the CIR. |
- |
mode |
Specifies the color mode for traffic policing. |
- |
color-blind |
Specifies the color-blind mode. In color-blind mode, the original packet color does not affect the traffic policing action. |
- |
color-aware |
Specifies the color-aware mode. In color-aware mode, the original packet color affects the traffic policing action. |
- |
green yellow red |
Specifies the packet color. The packet color is determined by the CBS and PBS. By default, green packets and yellow packets are allowed to pass through, and red packets are discarded. |
- |
discard |
Discards packets. |
If the action specified for green packets is discard, the action specified for yellow and red packets must be discard. If the action specified for yellow packets is discard, the action specified for red packets must be discard. |
pass |
Allows packets to pass through. |
- |
service-class class |
Specifies the class of service (CoS). |
The value can be af1, af2, af3, af4, be, cs6, cs7, or ef. |
color color |
Specifies the color corresponding to the CoS. |
The value can be green, yellow, or red. |
Usage Guidelines
Usage Scenario
Flow-based traffic policing controls traffic that matches traffic classification rules and discards the excess traffic to limit traffic within a proper range and to protect network resources.
When data is sent from a high-speed link to a low-speed link, the bandwidth on the interface of the low-speed link is insufficient. As a result, a large number of packets are discarded. To solve this problem, configure traffic policing for outgoing traffic on the interface of the high-speed link. The interface then discards the packets whose rate exceeds the traffic policing rate so that the outgoing traffic rate is limited within a proper range. You can also configure traffic policing for incoming traffic on the interface of the low-speed link. The interface then discards the received packets whose rate exceeds the traffic policing rate.
Traffic policing based on traffic policies controls rates of packets of different types.
- When the size of a packet is smaller than the CBS, the packet is colored green.
- When the size of a packet is greater than or equal to the CBS but smaller than the PBS, the packet is colored yellow.
- When the size of a packet is greater than or equal to the PBS, the packet is colored red.
- Packet color: When the packet rate exceeds the limit, the device takes different drop policies for packets in different colors.
- CoS: When the packet rate exceeds the limit, the device determines the queues that packets enter based on the CoS.
In color-blind mode, the packet color is determined by traffic policing but not the Diff-Serv domain.
In color-aware mode, the rules for defining packet colors by traffic policing and the Diff-Serv domain conflict. If the rules take effect for a packet, the packet color takes effect as follows.
Table 14-19 Rules for determining packet colorsPacket Color Defined in the Diff-Serv Domain
Packet Color Defined in Traffic Policing
Final Packet Color
Green
Yellow
Yellow
Green
Red
Red
Yellow
Green
Yellow
Yellow
Red
Red
Red
Green
Red
Red
Yellow
Red
Prerequisites
A traffic behavior has been created using the traffic behavior command.
Precautions
When a traffic policy containing traffic policing actions is applied to a VLAN, the system, an LPU, or an interface, you must use the undo traffic-policy command to unbind the traffic policy if you need to change traffic policing parameters.
If interfaces in the VLAN reside on different cards, the interfaces on each card share the bandwidth specified by the rate limit.
If interfaces in the VLAN reside on the same card, these interfaces share the bandwidth specified by the rate limit.
If the member interfaces of the Eth-Trunk are on different cards, the rate limit applies to each card individually.
If the member interfaces of the Eth-Trunk are on the same card, the member interfaces share the bandwidth specified by the rate limit. The bandwidth is distributed on the member interfaces randomly.
Example
<Quidway> system-view [Quidway] traffic classifier c1 operator and [Quidway-classifier-c1] if-match any [Quidway-classifier-c1] quit [Quidway] traffic behavior b1 [Quidway-behavior-b1] car cir 200000 pir 2500000 green pass yellow pass red discard [Quidway-behavior-b1] quit [Quidway] traffic policy p1 [Quidway-trafficpolicy-p1] classifier c1 behavior b1 [Quidway-trafficpolicy-p1] quit [Quidway] interface gigabitethernet 1/0/1 [Quidway-GigabitEthernet1/0/1] traffic-policy p1 inbound
<Quidway> system-view [Quidway] acl number 4999 [Quidway-acl-L2-4999] rule 5 permit destination-mac 0001-0001-0001 [Quidway-acl-L2-4999] rule 10 permit destination-mac 0002-0002-0002 [Quidway-acl-L2-4999] quit [Quidway] traffic classifier c2 operator or [Quidway-classifier-c2] if-match acl 4999 [Quidway-classifier-c2] quit [Quidway] traffic behavior b2 [Quidway-behavior-b2] car cir 100 pir 100 cbs 18800 pbs 31300 share green pass yellow pass red discard [Quidway-behavior-b2] quit [Quidway] traffic policy p2 [Quidway-trafficpolicy-p2] classifier c2 behavior b2 [Quidway-trafficpolicy-p2] quit [Quidway] interface gigabitethernet 1/0/1 [Quidway-GigabitEthernet1/0/1] traffic-policy p2 inbound
car (QoS profile view)
Function
The car command configures traffic policing in a QoS profile.
The undo car command deletes the traffic policing configuration from the QoS profile.
By default, traffic policing is not configured in a QoS profile.
Format
car cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] { inbound | outbound }
undo car { inbound | outbound }
Parameters
Parameter |
Description |
Value |
---|---|---|
cir cir-value |
Specifies the committed information rate (CIR), which is the guaranteed average transmission rate. |
The value is an integer that ranges from 64 to 4294967295, in kbit/s. |
pir pir-value | Specifies the peak information rate (PIR), which is the maximum rate of traffic that can pass through an interface. |
The value is an integer that ranges from 64 to 4294967295, in kbit/s. The PIR must be greater than or equal to the CIR. The default PIR is equal to the CIR. |
cbs cbs-value |
Specifies the committed burst size (CBS), which is the average volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 10000 to 4294967295, in bytes. If the PIR is not set, the default CBS is 188 times the CIR. If the PIR is set, the default CBS is 125 times the CIR. |
pbs pbs-value |
Specifies the peak burst size (PBS), which is the maximum volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 10000 to 4294967295, in bytes. If the PIR is not set, the default PBS is 313 times the CIR. If the PIR is set, the default PBS is 125 times the PIR. |
inbound |
Indicates inbound traffic policing. |
- |
outbound |
Indicates outbound traffic policing. |
- |
Usage Guidelines
Usage Scenario
Traffic policing discards excess traffic to limit traffic within a proper range and to protect network resources.
The car command configures traffic policing in a QoS profile.
Follow-up Procedure
Apply the QoS profile in the AAA domain view.
Precautions
When the traffic policing rate is larger than the maximum bandwidth of an interface, traffic policing does not take effect on the interface. Set the CIR and PIR to be smaller than the rate of an interface.
When the CBS is smaller than the number of bytes in a packet, the device directly discards the packet.
car share
Function
The car share command configures aggregated CAR in a traffic behavior.
The undo car share command cancels aggregated CAR in a traffic behavior.
By default, aggregated CAR is not configured in a traffic behavior.
The LE2D2X48SEC0, FC series, SA series, and SC series cards do not support this command.
Parameters
Parameter |
Description |
Value |
---|---|---|
car-name |
Specifies the name of a CAR profile. |
The value must the name of an existing CAR profile. |
Usage Guidelines
Usage Scenario
When multiple traffic classifiers are defined in a traffic policy and traffic behaviors associated with the traffic classifiers define CAR (using the car cir command) and aggregated CAR, the system limits the rates of flows using the configured CAR, aggregates the flows, and limits the rate of the aggregated traffic using the aggregated CAR in sequence. This process is called hierarchical traffic policing.
Hierarchical traffic policing multiplexes traffic statistics and controls services in a fine-granular manner. For example, hierarchical traffic policing limits the service traffic of level-1 and level-2 users or traffic of level-1 and level-2 user groups.
Prerequisites
A QoS CAR profile has been configured using the qos car command.
Precautions
The traffic policy defining the aggregated CAR action can only be used in the inbound direction.
After aggregated CAR is configured, all the rules in the traffic classifiers bound to the same traffic behavior share the CAR index. The system aggregates all the flows matching these traffic classifiers and uses CAR to limit the rate of the flows. If the traffic classifiers define both Layer 2 and Layer 3 information, the aggregated CAR configuration is invalid.
A traffic policy limits the traffic rate using the aggregated CAR only in the current applied object. For example, when the traffic policy p1 defining the aggregated CAR is applied to interface1 and interface2, the aggregated CAR applies to traffic on interface1 and interface2 respectively, without affecting each other.
On the LE1D2S04SEC0, LE1D2X32SEC0, and LE1D2H02QEC0 cards, and X series cards, if the sum of CIR values of each aggregated flow is larger than the specified CIR value for aggregated CAR in configured traffic policing, the system polices aggregated flows based on the CIR value for aggregated CAR. On other series cards, the system first guarantees the sum of CIR values of each flow. As a result, on other series cards, traffic exceeds the CIR value for aggregated CAR. To ensure that traffic is policed based on the CIR value for aggregated CAR, the CIR value for aggregated CAR must be larger than the sum of CIR values of each aggregated flow.
display qos-profile
Parameters
Parameter |
Description |
Value |
---|---|---|
name profile-name |
Specifies the name of a QoS profile. |
The value must the name of an existing QoS profile. |
all |
Indicates all QoS profiles. |
- |
Usage Guidelines
Usage Scenario
The display qos-profile command displays the configuration of a specified QoS profile or all QoS profiles. The command output helps you check the QoS profile configuration and locate QoS faults.
Example
# Display the configurations of all QoS profiles.
<Quidway> display qos-profile all
Qos-profile[0]: huawei
---------------------------------------------
IcarConfiged : 0
IcarCir : 0
IcarPir : 0
IcarCbs : 0
IcarPbs : 0
EcarConfiged : 0
EcarCir : 0
EcarPir : 0
EcarCbs : 0
EcarPbs : 0
StatisiticEn : 0
Remark8021p : 0
8021pValue : 0
RemarkDscp inbound : 0
DscpValue inbound : 0
RemarkDscp outbound : 0
DscpValue outbound : 0
---------------------------------------------
Item |
Description |
---|---|
Qos-profile[0] |
Name of a QoS profile. The number in bracket is the index that the system assigns to the QoS profile. To create a QoS profile, run the qos-profile command. |
IcarConfiged |
Whether inbound traffic policing is configured:
To configure inbound traffic policing in a QoS profile, run the car (QoS profile view) command. |
IcarCir |
CIR in the inbound direction. To change the value, run the car (QoS profile view) command. |
IcarPir |
PIR in the inbound direction. To change the value, run the car (QoS profile view) command. |
IcarCbs |
CBS in the inbound direction. To change the value, run the car (QoS profile view) command. |
IcarPbs |
PBS in the inbound direction. To change the value, run the car (QoS profile view) command. |
EcarConfiged |
Whether outbound traffic policing is configured:
To configure outbound traffic policing in a QoS profile, run the car (QoS profile view) command. |
EcarCir |
CIR in the outbound direction. To change the value, run the car (QoS profile view) command. |
EcarPir |
PIR in the outbound direction. To change the value, run the car (QoS profile view) command. |
EcarCbs |
CBS in the outbound direction. To change the value, run the car (QoS profile view) command. |
EcarPbs |
PBS in the outbound direction. To change the value, run the car (QoS profile view) command. |
StatisiticEn |
Whether the traffic statistics function is configured:
To configure the traffic statistics function in a QoS profile, run the statistic enable (QoS profile view) command. |
Remark8021p |
Whether 802.1p priority re-marking is configured:
To configure 802.1p priority re-marking in a QoS profile, run the remark 8021p (QoS profile view) command. |
8021pValue |
Re-marked 802.1p priority. To change the value, run the remark 8021p (QoS profile view) command. |
RemarkDscp inbound |
Whether to re-mark the DSCP priority of incoming packets:
To configure DSCP priority re-marking in a QoS profile, run the remark dscp (QoS profile view) command. |
DscpValue inbound |
Re-marked DSCP priority of incoming packets. To change the value, run the remark dscp (QoS profile view) command. |
RemarkDscp outbound |
Whether to re-mark the DSCP priority of outgoing packets:
To configure DSCP priority re-marking in a QoS profile, run the remark dscp (QoS profile view) command. |
DscpValue outbound |
Re-marked DSCP priority of outgoing packets. To change the value, run the remark dscp (QoS profile view) command. |
# Display the summary configurations of all QoS profiles.
<Quidway> display qos-profile
index qos-profile name
-----------------------------------------------------------------
0 huawei
-----------------------------------------------------------------
Total 64 Used 1
Item |
Description |
---|---|
index |
Index that the system assigns to a QoS profile. |
qos-profile name |
Name of a QoS profile. |
Total |
Maximum number of QoS profiles that can be configured. |
Used |
Number of used QoS profiles. |
display qos car
Parameters
Parameter |
Description |
Value |
---|---|---|
all |
Displays the configurations of all QoS CAR profiles. |
- |
name car-name |
Displays the configuration of a specified QoS CAR profile. |
The value must the name of an existing QoS CAR profile. |
Usage Guidelines
Usage Scenario
The display qos car command displays the configurations of all QoS CAR profiles or a specified QoS CAR profile. The command output helps you check the QoS CAR profile configuration and locate QoS faults.
Precautions
If you do not use the qos car command to create a QoS CAR profile, no information is displayed after the display qos car command is executed.
Example
# Display the configurations of all QoS CAR profiles.
<Quidway> display qos car all
----------------------------------------------------------------
CAR Name : qoscar1
CAR Index : 0
car cir 8000 (Kbps) pir 10000 (Kbps) cbs 1000000 (byte) pbs 1250000 (byte)
----------------------------------------------------------------
CAR Name : qoscar2
CAR Index : 1
car cir 5000 (Kbps) pir 8000 (Kbps) cbs 625000 (byte) pbs 1000000 (byte)
----------------------------------------------------------------
CAR Name : car1
CAR Index : 2
car cir 1000 (Kbps) cbs 188000 (byte)
# Display the configuration of the QoS CAR profile named car1.
<Quidway> display qos car name car1
----------------------------------------------------------------
CAR Name : car1
CAR Index : 2
car cir 1000 (Kbps) cbs 188000 (byte)
Item |
Description |
---|---|
CAR Name |
QoS CAR profile name. To configure a QoS CAR profile, run the qos car command. |
CAR Index |
Index of the QoS CAR profile. |
car cir 8000 (Kbps) pir 10000 (Kbps) cbs 1000000 (byte) pbs 1250000 (byte) |
Parameters of the QoS CAR profile, including the CIR, PIR, CBS, and PBS. To set parameters in a QoS CAR profile, run the qos car command. |
display qos car statistics
Function
The display qos car statistics command displays statistics on forwarded and discarded packets in a VLAN and in the inbound direction of an interface where a QoS CAR profile is applied.
Format
display qos car statistics interface interface-type interface-number inbound
display qos car statistics vlan vlan-id { broadcast-suppression | multicast-suppression | unicast-suppression }
display qos car statistics all [ nonzero ]
Parameters
Parameter |
Description |
Value |
---|---|---|
interface interface-type interface-number |
Displays statistics on forwarded and discarded packets on
a specified interface.
|
- |
inbound |
Displays statistics on forwarded and discarded packets in the inbound direction on an interface. |
- |
vlan vlan-id |
Displays statistics on forwarded and discarded packets on a specified VLAN. |
The value is an integer that ranges from 1 to 4094. |
broadcast-suppression |
Displays statistics on forwarded and discarded broadcast packets in a VLAN. |
- |
multicast-suppression |
Displays statistics on forwarded and discarded multicast packets in a VLAN. |
- |
unicast-suppression |
Displays statistics on forwarded and discarded unicast packets with unknown MAC addresses in a VLAN. |
- |
all |
Displays statistics on forwarded and discarded packets in each VLAN and in the inbound direction on each interface where a QoS CAR profile is applied. |
- |
nonzero |
Displays statistics on forwarded and discarded packets in each VLAN and in the inbound direction on each interface where a QoS CAR profile is applied and the statistics are not 0. |
- |
Usage Guidelines
Usage Scenario
You can run the display qos car statistics command to check statistics on forwarded and discarded packets in a VLAN and in the inbound direction of an interface where a QoS CAR profile is applied. The command output helps you locate faults.
Precautions
SA series cards do not support statistics on bytes. A hyphen (-) is displayed after the command is executed on an S series card.
Info: QoS CAR has not been applied.
Example
# Display statistics on packets in the inbound direction on Eth-Trunk 127 to which a QoS CAR profile is applied.
<Quidway> display qos car statistics interface eth-trunk 127 inbound
Board : 1
Passed packets: 5724
Passed bytes: 0
Discard packets: 0
Discard bytes: 0
Board : 5
Passed packets: 0
Passed bytes: 0
Discard packets: 0
Discard bytes: 0
Board : 6
Passed packets: 0
Passed bytes: 0
Discard packets: 0
Discard bytes: 0
# Display statistics on packets whose rates are limited in VLAN 60 to which a QoS CAR profile is applied.
<Quidway> display qos car statistics vlan 60 broadcast-suppression
Board : 1
Passed packets: 0
Passed bytes: 0
Discard packets: 0
Discard bytes: 0
Board : 5
Passed packets: 0
Passed bytes: 0
Discard packets: 0
Discard bytes: 0
Board : 6
Passed packets: 0
Passed bytes: 0
Discard packets: 0
Discard bytes: 0
Item |
Description |
---|---|
Board |
Slot ID of the LPU to which a QoS CAR profile is applied. |
Passed packets |
Number of forwarded packets on the interface to which a QoS CAR profile is applied. |
Passed bytes |
Number of bytes in forwarded packets on the interface to which a QoS CAR profile is applied. |
Discard packets |
Number of discarded packets on the interface to which a QoS CAR profile is applied. |
Discard bytes |
Number of bytes in discarded packets on the interface to which a QoS CAR profile is applied. |
display qos configuration
Parameters
Parameter |
Description |
Value |
---|---|---|
interface [ interface-type interface-number ] |
Displays the QoS configuration on a specified interface.
If no interface is specified, the QoS configurations on all the interfaces are displayed. |
- |
Usage Guidelines
Usage Scenario
The display qos configuration command displays QoS configurations on a specified interface or all interfaces. The command output helps you check the QoS configuration and locate QoS faults.
Example
<Quidway> display qos configuration interface gigabitethernet 1/0/1 interface GigabitEthernet1/0/1 -------------------------------------------------------------------------- Trust flag | outer 8021p DS name | dfn DEI enable | disable Port priority | 0 PHB marking | enable Port WRED | Port lr | outbound, cir = 64, cbs = 20000 Port car name | car TM enable | enable -------------------------------------------------------------------------- queue-index | configuration | -------------------------------------------------------------------------- 0 | shaping | cir = , cbs = | | pir = , pbs = | schedule | pq | wred | | length | -------------------------------------------------------------------------- 1 | shaping | cir = , cbs = | | pir = , pbs = | schedule | pq | wred | | length | -------------------------------------------------------------------------- 2 | shaping | cir = , cbs = | | pir = , pbs = | schedule | pq | wred | | length | -------------------------------------------------------------------------- 3 | shaping | cir = , cbs = | | pir = , pbs = | schedule | pq | wred | | length | -------------------------------------------------------------------------- 4 | shaping | cir = , cbs = | | pir = , pbs = | schedule | pq | wred | | length | -------------------------------------------------------------------------- 5 | shaping | cir = , cbs = | | pir = , pbs = | schedule | pq | wred | | length | -------------------------------------------------------------------------- 6 | shaping | cir = , cbs = | | pir = , pbs = | schedule | pq | wred | | length | -------------------------------------------------------------------------- 7 | shaping | cir = , cbs = | | pir = , pbs = | schedule | pq | wred | | length | --------------------------------------------------------------------------
Item |
Description |
---|---|
Trust flag |
Type of the external priority (802.1p priority, DSCP priority, or IP precedence) mapped to the internal priority (DiffServ level and color). To change the value, run the trust command. |
DS name |
DiffServ domain name. To create a DiffServ domain, run the diffserv domain command. |
DEI enable |
Whether the function that DEI field in a VLAN tag is mapped to the drop priority is enabled.
To set the function that DEI field in a VLAN tag is mapped to the drop priority, run the dei enable command. |
PHB marking |
Whether PHB mapping is enabled for outgoing packets on the interface.
To set PHB mapping, run the qos phb marking enable command. |
Port priority |
Default 802.1p priority added to untagged packets by the interface. To change the value, run the port priority command. |
Port wred |
Name of the WRED drop profile applied to the interface. To apply a WRED drop profile to an interface, run the qos wred command. |
Port lr |
Traffic shaping rate on the interface. To configure traffic shaping rate on an interface, run the qos lr command. |
Port car name |
Name of the QoS CAR profile applied to the interface. To apply a QoS CAR profile to an interface, run the qos car inbound command. |
TM enable |
Whether the traffic manager (TM) is enabled to buffer and schedule packets.
To set enable or disable the TM, run the qos traffic-manage enable command. NOTE:
This field is displayed only when the QoS configuration of an interface on the LE1D2S04SEC0, LE1D2X32SEC0, and LE1D2H02QEC0 cards, and X series cards is queried. |
queue-index |
Interface queue index. |
configuration |
Interface queue configuration. |
shaping |
Traffic shaping configuration of the interface queue. To configure traffic shaping on an interface, run the qos queue shaping command. |
cir |
Committed information rate (CIR). To change the value, run the qos queue shaping command. |
cbs |
Committed burst size (CBS). To change the value, run the qos queue shaping command. |
pir |
Peak information rate (PIR). To change the value, run the qos queue shaping command. |
pbs |
Peak burst size (PBS). To change the value, run the qos queue shaping command. |
schedule |
Scheduling mode of the interface queue. To set the scheduling mode of interface queues, run the qos { pq | wrr | drr } command. |
wred |
WRED drop profile bound to an interface queue. To bind a WRED drop profile to an interface queue, run the qos queue wred command. |
length |
Interface queue length. To set the interface queue length, run the qos queue length command. |
qos car
Function
The qos car command creates a QoS CAR profile and sets parameters in the QoS CAR profile.
The undo qos car command deletes a QoS CAR profile.
By default, no QoS CAR profile is created.
Format
qos car car-name cir cir-value [ cbs cbs-value [ pbs pbs-value ] | pir pir-value [ cbs cbs-value pbs pbs-value ] ]
undo qos car car-name
Parameters
Parameter |
Description |
Value |
---|---|---|
car-name |
Specifies the name of a QoS CAR profile. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. The value cannot be c, ci, or cir. |
cir cir-value |
Specifies the committed information rate (CIR), which is the average rate of traffic that can pass through an interface. |
The value is an integer that ranges from 64 to 4294967295, in kbit/s. |
pir pir-value | Specifies the peak information rate (PIR), which is the maximum rate of traffic that can pass through an interface. |
The value is an integer that ranges from 64 to 4294967295, in kbit/s. The PIR must be greater than or equal to the CIR. The default PIR is equal to the CIR. |
cbs cbs-value |
Specifies the committed burst size (CBS), which is the average volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 10000 to 4294967295, in bytes. If the PIR is not set, the default CBS is 188 times the CIR. If the PIR is set, the default CBS is 125 times the CIR. |
pbs pbs-value |
Specifies the peak burst size (PBS), which is the maximum volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 10000 to 4294967295, in bytes. By default, the PBS is 125 times the PIR. |
Usage Guidelines
Usage Scenario
Traffic policing controls traffic by monitoring the rate of traffic, and discards excess traffic to limit traffic within a proper range and to protect network resources.
When data is sent from a high-speed link to a low-speed link, the bandwidth on the interface of the low-speed link is insufficient. As a result, a large number of packets are discarded. To solve this problem, configure traffic policing for outgoing traffic on the interface of the high-speed link. The interface then discards the packets whose rate exceeds the traffic policing rate so that the outgoing traffic rate is limited within a proper range. You can also configure traffic policing for incoming traffic on the interface of the low-speed link. The interface then discards the received packets whose rate exceeds the traffic policing rate.
- When the size of a packet is smaller than the CBS, the packet is colored green.
- When the size of a packet is greater than or equal to the CBS but smaller than the PBS, the packet is colored yellow.
- When the size of a packet is greater than or equal to the PBS, the packet is colored red.
- The car share command is used in the traffic behavior view to perform traffic policing for service flows of a specified type.
- The qos car inbound command is used in the interface view to perform traffic policing for all incoming packets.
- The QoS CAR profile is applied in the VLAN view:
- The storm suppression broadcast (VLAN view) command is used to perform traffic policing for incoming broadcast traffic in a VLAN.
- The storm suppression multicast (VLAN view) command is used to perform traffic policing for incoming multicast traffic in a VLAN.
- The unicast-suppression (VLAN view) command is used to perform traffic policing for incoming unknown unicast traffic in a VLAN.
Precautions
A maximum of 512 QoS CAR profiles can be created on the switch.
When the traffic shaping rate is greater than the maximum rate of an interface, traffic policing is not performed on the interface. You need to set the CIR or PIR to be smaller than the maximum rate of the interface.
When the CBS is smaller than the number of bytes in a packet, packets of this type are discarded.
To prevent a device failure to identify the packet color, you are advised to set the PBS to be larger than the CBS.
qos car inbound
Function
The qos car inbound command applies a QoS CAR profile to an interface in the inbound direction to police traffic entering the interface.
The undo qos car inbound command unbinds a QoS CAR profile from an interface in the inbound direction.
By default, no QoS CAR profile is applied to an interface.
Parameters
Parameter |
Description |
Value |
---|---|---|
car-name |
Specifies the name of a QoS CAR profile. |
The value must the name of an existing QoS CAR profile. |
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view
Usage Guidelines
Usage Scenario
After a QoS CAR profile is created, you must apply the QoS CAR profile to an interface or a VLAN to police user service traffic. The qos car inbound command applies a created QoS CAR profile to an interface in the inbound direction.
Prerequisites
A QoS CAR profile has been created using the qos car command.
Follow-up Procedure
After a QoS CAR profile is applied to an interface, the system collects statistics on forwarded and discarded packets. You can use the display qos car statistics command to view packet statistics on the interface.
Precautions
If a QoS CAR profile and a traffic policy containing the traffic policing action are applied to the same interface:
- On the LE1D2S04SEC0, LE1D2X32SEC0, and LE1D2H02QEC0 cards, and X series cards, the actual rate limit is the smaller CIR between CIR values configured through the QoS CAR profile and a traffic policy.
- On other cards, rate limiting is inaccurate.
If a QoS CAR profile is applied to a VLAN to police incoming broadcast traffic, multicast traffic, or unknown unicast traffic (see the broadcast-suppression (VLAN view), multicast-suppression (VLAN view), or unicast-suppression (VLAN view) command) and a QoS CAR profile is applied to the interface that allows packets from this VLAN, traffic suppression and rate limiting take effect in sequence on the LE1D2S04SEC0, LE1D2X32SEC0, and LE1D2H02QEC0 cards, and X series cards, but only QoS CAR parameters take effect on other cards.
When QoS CAR is configured in the Eth-Trunk interface view, each member interface that is located on a different card uses the respective rate limit. Each member interface that is located on the same card shares the rate limit, and the load balancing mode is random.
Configuring the qos car inbound command occupies system resources. If system resources are insufficient, the configuration fails.
To configure the same QoS CAR on multiple interfaces, perform the configuration on a port group to reduce the workload.
qos-car exclude-interframe
Function
The qos-car exclude-interframe command configures the device not to count the inter-frame gap and preamble of packets when the device calculates the traffic policing rate or rate limit.
The undo qos-car exclude-interframe command configures the device to count the inter-frame gap and preamble of packets when the device calculates the traffic policing rate or rate limit.
By default, the device calculates the inter-frame gap and preamble of packets when the device calculates the traffic policing rate or rate limit.
Usage Guidelines
Usage Scenario
When traffic policing or rate limiting is configured on an interface, the device calculates the inter-frame gap and preamble of packets for the traffic policing rate or rate limit. As a result, the rate is inaccurate. After the qos-car exclude-interframe command is used, the device does not count the inter-frame gap and preamble of packets for the traffic policing rate or rate limit.
The qos-car exclude-interframe command affects calculation of the traffic policing rate and inbound rate limit. When the car (traffic behavior view) and qos car inbound commands are used to configure traffic policing and inbound rate limiting, the device does not count the inter-frame gap and preamble for the traffic policing rate or rate limit.
Precautions
Before this command is used, the following formula is used to calculate the traffic policing rate or rate limit:
Traffic policing rate/Rate limit = (Original packet length + Inter-frame gap + Preamble) x Number of packets forwarded per second
The inter-frame gap and preamble occupy 20 bytes.
After this command is used, the following formula is used to calculate the traffic policing rate or rate limit:
Traffic policing rate/Rate limit = Original packet length x Number of packets forwarded per second
qos-profile
Function
The qos-profile command creates a QoS profile and displays its view, or directly displays the view of an existing QoS profile.
The undo qos-profile command deletes a QoS profile.
By default, no QoS profile is configured on the device.
Parameters
Parameter |
Description |
Value |
---|---|---|
name profile-name |
Specifies the name of a QoS profile. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. The value cannot be --. |
all |
Indicates all QoS profiles. |
- |
Usage Guidelines
Usage Scenario
You can define QoS configurations in a QoS profile to implement such functions as traffic policing, priority re-marking, and traffic statistics.
Follow-up Procedure
- Define parameters in the QoS profile, including parameters of traffic policing, priority re-marking, and traffic statistics.
- Apply the QoS profile in the specified view.
Precautions
The undo qos-profile all command only deletes the QoS profiles that are not applied.
The switch supports a maximum of 64 QoS profiles.
qos-shaping exclude-interframe
Function
The qos-shaping exclude-interframe command configures the device not to count the inter-frame gap and preamble of packets when the device calculates the traffic shaping rate.
The undo qos-shaping exclude-interframe command configures the device to count the inter-frame gap and preamble of packets when the device calculates the traffic shaping rate.
By default, the device counts the inter-frame gap and preamble of packets when the device calculates the traffic shaping rate.
Usage Guidelines
Usage Scenario
After traffic shaping is configured on an interface, the device counts the inter-frame gap and preamble of packets for the traffic shaping rate. As a result, the rate is inaccurate. After the qos-shaping exclude-interframe command is used, the device does not calculate the inter-frame gap and preamble of packets for the traffic shaping rate.
The qos-shaping exclude-interframe command affects calculation of the traffic shaping rate and outbound rate limit. When the qos queue shaping and qos lr commands are used to configure traffic shaping and outbound rate limiting, the device does not count the inter-frame gap and preamble for the traffic shaping rate.
Precautions
Before this command is used, the following formula is used to calculate the traffic shaping rate:
Traffic shaping rate = (Original packet length + Inter-frame gap + Preamble) x Number of packets forwarded per second
The inter-frame gap and preamble occupy 20 bytes.
After this command is used, the following formula is used to calculate the traffic shaping rate:
Traffic shaping rate = Original packet length x Number of packets forwarded per second
qos lr
Function
The qos lr command configures traffic shaping on an interface.
The undo qos lr command cancels traffic shaping on an interface.
By default, traffic shaping is not performed on an interface, and the traffic shaping rate is the maximum bandwidth of the interface. For example, the traffic shaping rate on an Ethernet interface is 100000 kbit/s and the traffic shaping rate on a GE interface is 1000000 kbit/s.
Format
qos lr cir cir-value [ cbs cbs-value ] [ outbound ]
undo qos lr [ outbound ]
The LE1D2S04SEC0 card, X1C series cards, X1L series cards, X5E series cards, X5H series cards, X6H series cards, and X1E series cards do not support cbs cbs-value.
Parameters
Parameter |
Description |
Value |
---|---|---|
cir cir-value |
Specifies the committed information rate (CIR). |
The value is an integer, in kbit/s. The value range differs depending on the interface type:
|
cbs cbs-value |
Specifies the committed burst size (CBS). |
The value is an integer that ranges from 10000 to 4294967295, in bytes. If this parameter is not specified, the default CBS is 125 times the CIR. |
outbound |
Limits the rate of outgoing packets. If this parameter is not specified, rate limiting only takes effect on outgoing packets. |
- |
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, port group view
Usage Guidelines
Usage Scenario
When a large amount of data flows are sent from the upstream device to its downstream device, to prevent congestion or packet loss, run the qos lr command to configure traffic shaping on the outbound interface of the device to limit the traffic and burst traffic transmitted over a connection so that packets are sent at an even rate.
Similar to traffic policing, traffic shaping limits the traffic rate. When traffic policing is used, the system directly discards the packets whose rate is larger than the traffic shaping rate. Traffic shaping, however, buffers the packets whose rate is larger than the traffic shaping rate. When there are sufficient tokens in the token bucket, the device forwards buffered packets at an even rate. Traffic shaping increases the delay, whereas traffic policing does not.
Precautions
If you need to set the same traffic shaping rate on multiple interfaces, you can perform the configuration on a port group to reduce the workload.
If both traffic shaping and queue shaping (configured by using the qos queue shaping command) are configured on an interface, the CIR of traffic shaping cannot be lower than the sum of CIR values of all the queues on the interface; otherwise, the traffic shaping result may be incorrect. For example, the queue with a lower priority may occupy the bandwidth of the queue with a higher priority.
On an MPLS TE tunnel, if the maximum link bandwidth and maximum reservable bandwidth of the MPLS TE tunnel are configured, the traffic shaping rate set by using the qos gts command on an interface must be larger than the maximum reservable bandwidth of the MPLS TE tunnel. Otherwise, the maximum reservable bandwidth of the MPLS TE tunnel cannot be guaranteed.
Traffic shaping increases the delay because it uses the buffer mechanism.
If you run the qos lr command multiple times on the same interface, only the latest configuration takes effect.
After the qos lr command is used on a Layer 3 outbound interface to set the CIR of traffic shaping, if the traffic rate on the inbound interface is larger than the CIR, the traffic rate on the outbound interface is larger than the CIR of traffic shaping instantly, and then is equal to the CIR after traffic shaping is restored.
qos lr pps
Function
The qos lr pps command rate-limits incoming traffic on a management network interface.
The undo qos lr pps command disables rate limiting for incoming traffic on a management network interface.
By default, the rate limit on the management interface is 3000 pps on switches equipped with the MPUE and 1000 pps on the other models.
Parameters
Parameter |
Description |
Value |
---|---|---|
packets |
Specifies the maximum number of packets that are allowed to pass per second. |
|
Usage Guidelines
Usage Scenario
If there is heavy traffic on the management interface caused by malicious attacks or network exceptions, the CPU is overloaded and services are interrupted. To prevent this problem, run the qos lr pps command to rate-limit incoming traffic on a management network interface.
Configuration Impact
If a small rate limit is used, FTP and Telnet functions may be affected.
If you run the qos lr pps command multiple times on the same interface, only the latest configuration takes effect.
qos mac-car
Function
The qos mac-car command applies a QoS CAR profile to the inbound or outbound direction of a VLAN to control the rate of incoming or outgoing packets for clients in the VLAN.
The undo qos mac-car command deletes the QoS CAR profile in the inbound or outbound direction of a VLAN.
By default, no QoS CAR profile is applied to a VLAN.
Parameters
Parameter |
Description |
Value |
---|---|---|
inbound |
Applies the QoS CAR profile to incoming packets for clients in a VLAN. |
- |
outbound |
Applies the QoS CAR profile to outgoing packets for clients in a VLAN. |
- |
car-name |
Specifies the name of a QoS CAR profile. |
The value must the name of an existing QoS CAR profile. |
Usage Guidelines
Usage Scenario
When a client obtains an IP address using DHCP, a DHCP snooping binding entry is generated for the client. After the qos mac-car command is configured on a device, the device uses the configuration in the QoS CAR profile to police packets of the client and discards excess packets whose rate exceeds the CAR.
Prerequisites
DHCP snooping has been enabled using the dhcp snooping enable command in the VLAN view.
A QoS CAR profile has been created using the qos car command.
Example
# Apply the QoS profile qoscar1 to the inbound direction in VLAN 100 to control the rate of traffic for clients in VLAN 100.
<Quidway> system-view [Quidway] dhcp enable [Quidway] dhcp snooping enable [Quidway] qos car qoscar1 cir 10000 cbs 102400 [Quidway] vlan 10 [Quidway-vlan10] dhcp snooping enable [Quidway-vlan10] qos mac-car inbound qoscar1
qos queue shaping
Function
The qos queue shaping command enables traffic shaping for a queue on a specified interface and sets traffic shaping parameters.
The undo qos queue shaping command restores the default scheduling parameters of each queue on an interface.
The following table describes the default scheduling parameters on an interface.
Format
qos queue queue-index shaping cir cir-value pir pir-value [ cbs cbs-value pbs pbs-value ]
undo qos queue queue-index shaping
For the LE1D2S04SEC0 card, X1C series cards, X1L series cards, X5E series cards, X5H series cards, X6H series cards, and X1E series cards, only pir pir-value takes effect.
Parameters
Parameter |
Description |
Value |
---|---|---|
queue-index |
Specifies the queue index. |
The value is an integer that ranges from 0 to 7. |
cir cir-value |
Specifies the committed information rate (CIR) of a queue. |
The value is an integer, in kbit/s. The value range differs depending on the interface type:
|
pir pir-value |
Specifies the peak information rate (PIR) of a queue. |
The value is an integer, in kbit/s. The value range differs depending on the interface type:
The PIR must be greater than or equal to the CIR. The default PIR is equal to the CIR. |
cbs cbs-value |
Specifies the committed burst size (CBS), which is the average volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 10000 to 4294967295, in bytes. |
pbs pbs-value |
Specifies the peak burst size (PBS), which is the maximum volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 10000 to 4294967295, in bytes. |
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, port group view
Usage Guidelines
Usage Scenario
When the traffic rate of an interface on a downstream device is lower than that of the connected interface on the upstream device, traffic congestion may occur on the interface of the downstream device. You can configure traffic shaping for queues on the outbound interface of the upstream device and adjust the transmit rate of the interface.
The qos queue shaping command configures traffic shaping on packets of a specific service on an interface.
Prerequisites
Priority mapping based on simple traffic classification has been configured to map packet priorities to PHBs and colors, or internal priority re-marking based on complex traffic classification has been configured so that packets of different services enter different queues.
Precautions
If traffic shaping is configured both on an interface queue and an interface (using the qos lr command), the CIR of the interface cannot be lower than the sum of CIR values of all the queues on the interface; otherwise, traffic shaping result may be incorrect. For example, the queue with a lower priority may occupy the bandwidth of the queue with a higher priority.
It is recommended that the CBS be 120 times the CIR.
If you run the qos queue shaping command multiple times on the same interface, only the latest configuration takes effect.
reset qos car statistics
Function
The reset qos car statistics command clears packet statistics on an interface or in a VLAN to which a QoS CAR profile is applied.
Format
reset qos car statistics interface interface-type interface-number inbound
reset qos car statistics vlan vlan-id { broadcast-suppression | multicast-suppression | unicast-suppression }
reset qos car statistics all
Parameters
Parameter |
Description |
Value |
---|---|---|
interface interface-type interface-number |
Clears packet statistics on a specified interface. |
- |
inbound |
Clears statistics in the inbound direction on an interface. |
- |
vlan vlan-id |
Clears packet statistics in a specified VLAN. vlan-id specifies the ID of the VLAN. |
The value is an integer that ranges from 1 to 4094. |
broadcast-suppression |
Clears statistics on broadcast packets in a VLAN. |
- |
multicast-suppression |
Clears statistics on multicast packets in a VLAN. |
- |
unicast-suppression |
Clears statistics on unicast packets with unknown MAC addresses in a VLAN. |
- |
all |
Clears statistics on in each VLAN and in the direction of each interface to which a QoS CAR profile is applied. |
- |
Usage Guidelines
Usage Scenario
Before re-collecting statistics on forwarded and discarded packets on an interface or in a VLAN to which a QoS CAR profile is applied, run the reset qos car statistics command to clear existing statistics. Then run the display qos car statistics command to view the packet statistics.
Precautions
Info: QoS CAR has not been applied.
The cleared statistics on forwarded and discarded packets on an interface or in a VLAN cannot be restored. Exercise caution when you use this command.
- Command Support
- car (traffic behavior view)
- car (QoS profile view)
- car share
- display qos-profile
- display qos car
- display qos car statistics
- display qos configuration
- qos car
- qos car inbound
- qos-car exclude-interframe
- qos-profile
- qos-shaping exclude-interframe
- qos lr
- qos lr pps
- qos mac-car
- qos queue shaping
- reset qos car statistics