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

Traffic Policing, Traffic Shaping, and Interface-based Rate Limiting Commands

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.

Views

Traffic behavior view

Default Level

2: Configuration level

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.

The packet color is determined by the CBS and PBS:
  • 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 command configures traffic policing, and marks different colors and CoS values for packets at different rates:
  • 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.
If a Diff-Serv domain is bound to the inbound interface, traffic policing is configured, and the CBS and PBS are set, the packet color is determined as follows:
  • 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 colors

    Packet 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.

Use a traffic policy for rate limiting and apply the traffic policy in the VLAN view:
  • 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.

When you use a traffic policy for rate limiting and apply the traffic policy in the view of an Eth-Trunk that contains several member interfaces:
  • 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

# Configure traffic policing in the traffic behavior b1 as follows: Set the CIR to 200000 kbit/s and the PIR to 2500000 kbit/s, permit green packets to be sent, permit yellow packets to pass through, and discard red packets. Then apply the traffic policy p1 containing the traffic behavior to the GE1/0/1 in the inbound direction.
<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
# Configure level-1 aggregated CAR in the traffic behavior b2 as follows: Set the CIR to 100 kbit/s for two data flows with destination MAC addresses 1-1-1 and 2-2-2 in the inbound direction of GE1/0/1.
<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.

-

Views

QoS profile view

Default Level

2: Configuration level

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.

Example

# Create a QoS profile named huawei in which the CIR is set to 10000 kbit/s, the CBS is set to 10240 bytes, and the PBS is set to 10240 bytes.

<Quidway> system-view
[Quidway] qos-profile name huawei
[Quidway-qos-huawei] car cir 10000 cbs 10240 pbs 10240 inbound 

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.

Format

car car-name share

undo car [ car-name ] share

Parameters

Parameter

Description

Value

car-name

Specifies the name of a CAR profile.

The value must the name of an existing CAR profile.

Views

Traffic behavior view

Default Level

2: Configuration level

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.

Example

# Configure aggregated CAR in the traffic behavior tb1.

<Quidway> system-view
[Quidway] qos car qoscar1 cir 2000
[Quidway] traffic behavior tb1
[Quidway-behavior-tb1] car cir 1000 pir 123456
[Quidway-behavior-tb1] car qoscar1 share

display qos-profile

Function

The display qos-profile command displays the configured QoS profile information.

Format

display qos-profile [ name profile-name | all ]

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.

-

Views

All views

Default Level

1: Monitoring level

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                                                                                                     
---------------------------------------------   
Table 14-20 Description of the display qos-profile all command output

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:
  • 0: Inbound traffic policing is not configured.
  • 1: 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:
  • 0: Outbound traffic policing is not configured.
  • 1: 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:
  • 0: The traffic statistics function is not configured.
  • 1: 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:
  • 0: 802.1p priority re-marking is not configured.
  • 1: 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:
  • 0: DSCP priority re-marking is not configured.
  • 1: DSCP priority re-marking is configured.

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:
  • 0: DSCP priority re-marking is not configured.
  • 1: DSCP priority re-marking is configured.

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   
Table 14-21 Description of the display qos-profile command output

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

Function

The display qos car command displays the QoS CAR profile configuration.

Format

display qos car { all | name car-name }

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.

Views

All views

Default Level

1: Monitoring level

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)   
Table 14-22 Description of the display qos car command output

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.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

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.

-

Views

All views

Default Level

1: Monitoring level

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.

If the QoS CAR profile does not exist or has not been applied, the following information is displayed when you view statistics in a specified VLAN or in the inbound direction on a specified interface:
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
Table 14-23 Description of the display qos car statistics command output

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

Function

The display qos configuration command displays the QoS configuration on an interface.

Format

display qos configuration interface [ interface-type interface-number ]

Parameters

Parameter

Description

Value

interface [ interface-type interface-number ]

Displays the QoS configuration on a specified interface.
  • interface-type specifies the interface type.

  • interface-number specifies the interface number.

If no interface is specified, the QoS configurations on all the interfaces are displayed.

-

Views

All views

Default Level

1: Monitoring level

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

# Display the QoS configuration on GE1/0/1.
<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        |                                                                                                      
 -------------------------------------------------------------------------- 
Table 14-24 Description of the display qos configuration command output

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.
  • enable: The function is enabled.
  • disable: The function is disabled.

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.
  • enable: PHB mapping is enabled for outgoing packets on the interface.
  • disable: PHB mapping is disabled 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.
  • enable: The TM is enabled to buffer and schedule packets.
  • disable: The TM is disabled from buffering and scheduling 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.

Views

System view

Default Level

2: Configuration level

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.

The packet color is determined by cbs cbs-value and pbs pbs-value of this command:
  • 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 QoS CAR profile created using the qos car command can be applied to the following scenarios:
  • 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.

Example

# Create a QoS CAR profile named qoscar1, and set the CIR to 10000 kbit/s and the CBS to 10240 bytes.

<Quidway> system-view
[Quidway] qos car qoscar1 cir 10000 cbs 10240

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.

Format

qos car inbound car-name

undo qos car inbound

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

Default Level

2: Configuration level

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.

Example

# Apply the QoS CAR profile qoscar1 to the GE1/0/1 in the inbound direction.

<Quidway> system-view
[Quidway] qos car qoscar1 cir 10000 cbs 10240
[Quidway] interface gigabitethernet 1/0/1
[Quidway-GigabitEthernet1/0/1] qos car inbound qoscar1
[Quidway-GigabitEthernet1/0/1] quit

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.

Format

qos-car exclude-interframe

undo qos-car exclude-interframe

Parameters

None

Views

System view

Default Level

2: Configuration level

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

Example

# Configure the device not to count the inter-frame gap and preamble of packets when the device calculates the traffic policing rate.

<Quidway> system-view
[Quidway] qos-car exclude-interframe

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.

Format

qos-profile name profile-name

undo qos-profile { all | name profile-name }

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.

-

Views

System view

Default Level

2: Configuration level

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.

Example

# Create a QoS profile named huawei and enter the QoS profile view.

<Quidway> system-view
[Quidway] qos-profile name huawei
[Quidway-qos-huawei]

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.

Format

qos-shaping exclude-interframe

undo qos-shaping exclude-interframe

Parameters

None

Views

System view

Default Level

2: Configuration level

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

Example

# Configure the device not to count the inter-frame gap and preamble of packets when the device calculates the traffic shaping rate.

<Quidway> system-view
[Quidway] qos-shaping exclude-interframe

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:

  • Interfaces in a port group: 64 to 4294967295
  • Other interfaces: 64 to X (the actual maximum rate supported by such an interface)

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

Default Level

2: Configuration level

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.

Example

# Set the CIR of data packets sent by the GE1/0/1 to 20000 kbit/s and the CBS to 375000 bytes.

<Quidway> system-view
[Quidway] interface gigabitethernet 1/0/1
[Quidway-GigabitEthernet1/0/1] qos lr cir 20000 cbs 375000 outbound
[Quidway-GigabitEthernet1/0/1] quit

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.

Format

qos lr pps packets

undo qos lr

Parameters

Parameter

Description

Value

packets

Specifies the maximum number of packets that are allowed to pass per second.

  • Switches equipped with the MPUE: The value is an integer that ranges from 1 to 10240, in pps.
  • Other models: The value is an integer that ranges from 1 to 3000, in pps.

Views

Ethernet interface view

Default Level

2: Configuration level

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.

Example

# Set the rate limit of Ethernet0/0/0 to 100 pps.

<Quidway> system-view
[Quidway] interface ethernet 0/0/0
[Quidway-Ethernet0/0/0] qos lr pps 100

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.

Format

qos mac-car { inbound | outbound } car-name

undo qos mac-car { inbound | outbound }

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.

Views

VLAN view

Default Level

2: Configuration level

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:
  • Interfaces in a port group: 0 to 10000000
  • Other interfaces: 0 to X (the actual maximum rate supported by such an interface)
The default value is the maximum bandwidth of an interface.

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:
  • Interfaces in a port group: 64 to 10000000
  • Other interfaces: 64 to X (the actual maximum rate supported by such an interface)
The default value is the maximum bandwidth of an interface.

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

Default Level

2: Configuration level

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.

Example

# Set the CIR of queue 4 on the GE1/0/1 to 10000 kbit/s and the PIR to 20000 kbit/s.

<Quidway> system-view
[Quidway] interface gigabitethernet 1/0/1
[Quidway-GigabitEthernet1/0/1] qos queue 4 shaping cir 10000 pir 20000
[Quidway-GigabitEthernet1/0/1] quit

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.

-

Views

User view

Default Level

3: Management level

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

If QoS CAR is not configured on an interface in the inbound direction, the system displays the following error message when you run the reset qos car statistics command:
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.

Example

# Clear statistics in the inbound direction on the GE1/0/1.

<Quidway> reset qos car statistics interface gigabitethernet 1/0/1 inbound

# Clear statistics on broadcast packets in VLAN 10.

<Quidway> reset qos car statistics vlan 10 broadcast-suppression
Translation
Favorite
Download
Update Date:2022-05-25
Document ID:EDOC1100126824
Views:1026622
Downloads:121
Average rating:0.0Points

Digital Signature File

digtal sigature tool