No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

S1720, S2700, S5700, and S6720 V200R011C10

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.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Traffic Policing, Traffic Shaping, and Interface-based Rate Limiting Commands

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

Command Support

For details about command support, see the description of each command. If no command support information is provided, all switch models support the command by default.

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 [ aggregation ] cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] [ share ] [ green pass ] [ yellow { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ] [ red { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ] (S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, S6720S-SI)

NOTE:

Only the S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-SI support aggregation and share.

car cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] [ share ] [ green { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ] [ yellow { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ] [ red { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ](S5720EI, S6720EI, S6720S-EI)

car cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] [ share ] [ green { discard | pass } ] [ yellow { discard | pass } ] [ red { discard | pass } ] (S5720HI)

undo car

Parameters

Parameter

Description

Value

aggregation

Indicates aggregated CAR. Aggregated CAR can be applied to multiple interfaces, and traffic on the interfaces is restricted by aggregated CAR.

-

cir cir-value

Specifies the committed information rate (CIR), which is the allowed rate at which traffic can pass through.

The value is an integer that ranges from 8 to 4294967295, in kbit/s.

pir pir-value

Specifies the peak information rate (PIR), which is the maximum rate at which traffic can pass through.

The value is an integer that ranges from 8 to 4294967295, in kbit/s.

The PIR must be higher 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 4000 to 4294967295, in bytes. The default CBS is 125 times the CIR.

NOTE:

If the default CBS is smaller than 4000 because the CIR is small, the device uses the CBS of 4000.

If the default CBS is larger than 4294967295 because the CIR 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 4000 to 4294967295, in bytes. If the PIR is not set, the default PBS is 125 times the CIR. If the PIR is set, the default PBS is 125 times the PIR.

NOTE:

If the default PBS is smaller than 4000 because the CIR or PIR is small, the device uses the PBS of 4000.

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 is restricted by the level-1 aggregated CAR.

-

green

yellow

red

Specifies the packet color. The packet color is determined by cbs cbs-value and pbs pbs-value of this command. 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.

-

remark-8021p 8021p-value

Re-marks the 802.1p priorities of packets.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority.

remark-dscp dscp-value

Re-marks the DSCP priority of packets.

The value is an integer that ranges from 0 to 63.

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.

After traffic policing is configured, the device counts forwarded and discarded packets.

Prerequisites

A traffic behavior has been created using the traffic behavior command.

Precautions

When a traffic policy containing traffic policing actions is applied to an interface, you must use the undo traffic-policy command to unbind the traffic policy if you need to change traffic policing parameters.

For the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-SI, if a traffic behavior defines the car command with remark-8021p 8021p-value or remark-dscp dscp-value specified, a traffic policy containing this traffic behavior can only be applied in the inbound direction.

If aggregated CAR is configured by specifying the aggregation parameter on the S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-SI, the traffic policies containing this traffic behavior can only be applied in the inbound direction.

If a traffic behavior defines the car command with share specified, a traffic policy containing this traffic behavior can only be applied in the inbound direction.

The aggregation and share parameters cannot be specified simultaneously in one traffic behavior.

For the S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-SI, if a traffic policy defining aggregated CAR and traffic statistics is applied to multiple interfaces, the system collects traffic statistics on all these interfaces. Traffic statistics on any one of the interfaces are the sum traffic statistics of all these interfaces.

After traffic policing is configured on an interface, the number of packets that can be forwarded on the interface every second is relevant to the packet length calculation method. By default, the device calculates the 20-byte inter-frame gap and preamble. That is, the device calculates the actual packet length plus 20-byte inter-frame gap and preamble.

When you use a traffic policy for rate limiting and apply the traffic policy in the Eth-Trunk interface view, if the Eth-Trunk interface contains several member interfaces, these member interfaces share the bandwidth specified by the rate limit.

Example

# Configure traffic policing in the traffic behavior b1 as follows: Set the CIR to 1000 kbit/s, permit green and yellow packets to pass through, re-mark the 802.1p priority of green packets with 7, re-mark the DSCP priority of yellow packets with 20, and discard red packets.
<HUAWEI> system-view
[HUAWEI] traffic behavior b1
[HUAWEI-behavior-b1] car cir 1000 green pass remark-8021p 7 yellow pass remark-dscp 20 red discard

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 }

NOTE:

Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this command.

The S5720EI does not support inbound traffic policing. When the device configured with inbound traffic policing is upgraded from an earlier version (earlier than V200R007), the inbound traffic policing configuration fails to be restored.

The S6720EI and S6720S-EI do not support inbound traffic policing.

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 higher 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 4000 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 4000 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.

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

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.

NOTE:

Only the S5720EI and S5720HI 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 S5720EI, 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 first guarantees the sum of CIR values of each flow. As a result, traffic exceeds the CIR value for aggregated CAR. On the S5720HI, the system polices aggregated flows based on the CIR value for aggregated CAR. On the S5720EI, 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.

<HUAWEI> system-view
[HUAWEI] qos car qoscar1 cir 2000
[HUAWEI] traffic behavior tb1
[HUAWEI-behavior-tb1] car cir 1000 pir 123456
[HUAWEI-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 ]

NOTE:

Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this command.

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.

<HUAWEI> 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:         1                                                         
Remark8021p :         0                                                         
8021pValue  :         0                                                         
RemarkDscp  :         0                                                         
DscpValue   :         0                                                         
---------------------------------------------   
NOTE:

The display qos-profile command on the S5720EI, S6720EI, and S6720S-EI does not display IcarConfiged, IcarCir, IcarPir, IcarCbs, IcarPbs, Remark8021p, 8021pValue, RemarkDscp, or DscpValue.

Table 15-22  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

Whether DSCP priority re-marking is configured:
  • 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

Re-marked DSCP priority. To change the value, run the remark dscp (QoS profile view) command.

# Display the summary configurations of all QoS profiles.

<HUAWEI> display qos-profile
        index                    qos-profile name                               
-----------------------------------------------------------------               
        0                        huawei                                         
-----------------------------------------------------------------               
 Total   64     Used   1   
Table 15-23  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.

NOTE:

Only the S5720EI and S5720HI support this command.

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.

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

<HUAWEI> display qos car name car1
  ----------------------------------------------------------------              
   CAR Name     : car1                                                          
   CAR Index    : 2                                                             
    car cir 1000 (Kbps) cbs 188000 (byte)   
Table 15-24  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.

Related Topics

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 GE0/0/1 of the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, or S6720S-SI.
<HUAWEI> display qos configuration interface gigabitethernet 0/0/1
 interface GigabitEthernet0/0/1                                                 
 --------------------------------------------------------------------------     
 Trust flag                  | --                                               
 Port priority               | 0                                                
 Schedule-profile            | --                                               
 Tail-drop-profile           | --                                               
 Port lr                     | outbound, cir = --, cbs = --                     
 Port lr                     | inbound, cir = --, cbs = --                      
 --------------------------------------------------------------------------     
 queue-index | configuration |                                                  
 --------------------------------------------------------------------------     
 0           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
 --------------------------------------------------------------------------     
 1           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
 --------------------------------------------------------------------------     
 2           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
 --------------------------------------------------------------------------     
 3           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
 --------------------------------------------------------------------------     
 4           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
 --------------------------------------------------------------------------     
 5           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
 --------------------------------------------------------------------------     
 6           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
 --------------------------------------------------------------------------     
 7           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
 --------------------------------------------------------------------------   
# Display the QoS configuration on GE0/0/1 of the S5720EI, S6720EI, or S6720S-EI.
<HUAWEI> display qos configuration interface gigabitethernet 0/0/1
 interface GigabitEthernet0/0/1                                                 
 --------------------------------------------------------------------------     
 Trust flag                  | outer 8021p                                      
 DS name                     | --                                               
 DEI enable                  | disable                                          
 PHB marking                 | enable                                           
 Port priority               | 0                                                
 Port wred                   | --                                               
 Port lr                     | outbound, cir = --, cbs = --                     
 Port lr                     | inbound, cir = --, cbs = --                      
 --------------------------------------------------------------------------     
 queue-index | configuration |                                                  
 --------------------------------------------------------------------------     
 0           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
             | schedule      | wrr, weight = 1                                  
             | wred          | --                                               
             | length        | --                                               
 --------------------------------------------------------------------------     
 1           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
             | schedule      | wrr, weight = 1                                  
             | wred          | --                                               
             | length        | --                                               
 --------------------------------------------------------------------------     
 2           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
             | schedule      | wrr, weight = 1                                  
             | wred          | --                                               
             | length        | --                                               
 --------------------------------------------------------------------------     
 3           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
             | schedule      | wrr, weight = 1                                  
             | wred          | --                                               
             | length        | --                                               
 --------------------------------------------------------------------------     
 4           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
             | schedule      | wrr, weight = 1                                  
             | wred          | --                                               
             | length        | --                                               
 --------------------------------------------------------------------------     
 5           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
             | schedule      | wrr, weight = 1                                  
             | wred          | --                                               
             | length        | --                                               
 --------------------------------------------------------------------------     
 6           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
             | schedule      | wrr, weight = 1                                  
             | wred          | --                                               
             | length        | --                                               
 --------------------------------------------------------------------------     
 7           | shaping       | cir = --, cbs = --                               
             |               | pir = --, pbs = --                               
             | schedule      | wrr, weight = 1                                  
             | wred          | --                                               
             | length        | --                                               
 --------------------------------------------------------------------------  
# Display the QoS configuration on GE0/0/1 of the S5720HI.
<HUAWEI> display qos configuration interface gigabitethernet 0/0/1
 interface GigabitEthernet0/0/1
 --------------------------------------------------------------------------
 Trust flag                  | outer 8021p
 DS name                     | --
 DEI enable                  | disable
 Port priority               | 0
 PHB marking                 | enable
 Port wred                   | --
 Port lr                     | outbound, cir = --, cbs = --
 Port lr                     | inbound, cir = --, cbs = --
 TM enable                   | disable
 --------------------------------------------------------------------------
 queue-index | configuration |                                             
 --------------------------------------------------------------------------
 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 15-25  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.

Schedule-profile

Name of the scheduling profile applied to the interface. To apply a scheduling profile to an interface, run the qos schedule-profile (interface view) command.

Tail-drop-profile

Name of the tail drop profile applied to the interface. To apply a tail drop profile to an interface, run the qos tail-drop-profile (interface view) command.

Port lr

Traffic shaping rate on the interface. To configure traffic shaping rate on an interface, run the qos lr outbound or qos lr 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.

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.

weight

Scheduling weight of a queue. To set the scheduling weight of a queue, run the qos queue drr or qos queue wrr command.

length

Interface queue length. The switch does not support modifying the interface queue length, and this field is always displayed as --.

display qos lr

Function

The display qos lr command displays the rate limit configuration on an interface.

Format

display qos lr { inbound | outbound } interface interface-type interface-number

NOTE:

The S2750EI, S5700-10P-LI-AC, and S5700-10P-PWR-LI-AC that are enabled with Layer 3 hardware forwarding for IPv4 packets do not support inbound.

Parameters

Parameter

Description

Value

inbound

Displays the rate limit configuration in the inbound direction on an interface.

-

outbound

Displays the rate limit configuration in the outbound direction on an interface.

-

interface-type interface-number

Specifies the type and number of an interface.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display qos lr command displays the rate limit configuration on a specified interface. The command output helps you check the rate limit on an interface and locate faults.

Precautions

If you do not use the qos lr inbound or qos lr outbound command to configure the rate limit on an interface, no information is displayed after the display qos lr command is executed.

Example

# Set the CIR of data packets to be sent from the GE0/0/1 to 20000 kbit/s and the CBS to 375000 bytes.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] qos lr outbound cir 20000 cbs 375000
[HUAWEI-GigabitEthernet0/0/1] quit

# Display the rate limit configuration on the GE0/0/1.

<HUAWEI> display qos lr outbound interface gigabitethernet 0/0/1
GigabitEthernet0/0/1 lr outbound:
  cir: 20000 Kbps, cbs: 375000 Byte
Table 15-26  Description of the display qos lr command output

Item

Description

cir

Committed information rate (CIR). To set the CIR, run the qos lr inbound or qos lr outbound command.

cbs

Committed burst size (CBS). To set the CBS, run the qos lr inbound or qos lr outbound command.

display qos statistics

Function

The display qos statistics command displays traffic statistics on an interface where rate limiting is performed in the inbound direction.

Format

display qos statistics interface interface-type interface-number inbound

display qos statistics inbound all [ nonzero ]

Parameters

Parameter

Description

Value

interface interface-type interface-number

Displays traffic statistics on a specified interface where rate limiting is performed.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

inbound

Displays traffic statistics in the inbound direction.

-

all

Displays traffic statistics on all interfaces where rate limiting is performed.

-

nonzero

Displays traffic statistics on all interfaces where rate limiting is performed and the statistics are not 0.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

You can use the display qos statistics command to view statistics on forwarded and discarded packets and check whether rate limiting takes effect. The command output helps you locate faults.

Prerequisites

The qos lr inbound command has been executed to configure rate limiting in the inbound direction on an interface.

Precautions

If the qos lr inbound command is not used, the system displays the following message after the display qos statistics interface interface-type interface-number inbound command is executed:
Info: There is no rate limited configuration inbound in the interface.

Example

# Display traffic statistics on GE0/0/1 where rate limiting is performed in the inbound direction.

<HUAWEI> display qos statistics interface gigabitethernet 0/0/1 inbound
---------------------------------------------------------                       
  Item                                          Value                           
---------------------------------------------------------                       
  Passed packets                                    0                           
  Passed bytes                                      0                          
  Dropped packets                                   0                           
  Dropped bytes                                     0                          
---------------------------------------------------------  
Table 15-27  Description of the display qos statistics command output

Item

Description

Passed packets

Number of forwarded packets.

Passed bytes

Number of forwarded bytes.

Dropped packets

Number of discarded packets.

Dropped bytes

Number of discarded bytes.

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.

NOTE:

Only the S5720EI and S5720HI support this command.

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 higher 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 4000 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 4000 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.

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.

After traffic policing is configured on an interface, the number of packets that can be forwarded on the interface every second is relevant to the packet length calculation method. By default, the device calculates the 20-byte inter-frame gap and preamble. That is, the device calculates the actual packet length plus 20-byte inter-frame gap and preamble.

Example

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

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

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

<HUAWEI> system-view
[HUAWEI] 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.

NOTE:

Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this command.

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.

<HUAWEI> system-view
[HUAWEI] qos-profile name huawei
[HUAWEI-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 outbound 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

When the rate of the MultiGE interface on the S6720SI is 5 Gbit/s, the qos-shaping exclude-interframe command does not take effect.

Example

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

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

qos lr inbound

Function

The qos lr inbound command configures traffic policing in the inbound direction on an interface.

The undo qos lr inbound command cancels traffic policing in the inbound direction on an interface.

By default, traffic policing is not configured in the inbound direction on an interface.

NOTE:

The S2750EI, S5700-10P-LI-AC, and S5700-10P-PWR-LI-AC that are enabled with Layer 3 hardware forwarding for IPv4 packets do not support this command.

Format

qos lr inbound cir cir-value [ cbs cbs-value ]

undo qos lr inbound

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:
  • Ethernet: 64 to 100000
  • MultiGE: 64 to 2500000
  • GigabitEthernet: 64 to 1000000
  • XGigabitEthernet: 64 to 10000000
  • 40GigabitEthernet: 64 to 40000000
  • Port group: 64 to 10000000

cbs cbs-value

Specifies the committed burst size (CBS).

The value is an integer that ranges from 4000 to 4294967295, in bytes.

If this parameter is not specified, the default CBS is 125 times the CIR.

On the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-SI, the maximum value of the CBS is 65535 granularities. Each granularity depends on the CIR:

  • When the CIR is in the range of 64 kbit/s to 1023 kbit/s, each granularity is 1 byte.

  • When the CIR is in the range of 1024 kbit/s to 10230 kbit/s, each granularity is 8 bytes.

  • When the CIR is in the range of 10231 kbit/s to 102300 kbit/s, each granularity is 64 bytes.

  • When the CIR is in the range of 102301 kbit/s to 1023000 kbit/s, each granularity is 512 bytes.

  • When the CIR is in the range of 1023001 kbit/s to 10000000 kbit/s, each granularity is 4096 bytes.

Views

Ethernet interface view, MultiGE interface view, GE interface view, XGE interface view, 40GE interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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. In this case, the data traffic rate needs to be limited. After the traffic policing rate for incoming packets on an interface is set by using the qos lr inbound command, if the rate of packets received by the interface is larger than the traffic policing rate, the packets are discarded.

Precautions

When interface-based 802.1X authentication is configured and the RADIUS server delivers the rate limit, the interface does not support the rate limit.

If both the IPSG function and inbound interface-based rate limiting are configured on an interface of the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-SI, both IPSG and interface-based rate-limiting configurations take effect as long as the configurations do not conflict. Otherwise, only the IPSG configuration takes effect.

The traffic-limit (interface view) command limits the rate of packets matching an ACL, whereas the qos lr inbound command limits the rate of all packets on an interface. If both of them are configured,
  • On the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-SI, the qos lr inbound command takes effect.
  • On the S5720EI, S6720EI, and S6720S-EI, rate limiting is inaccurate.
  • On the S5720HI, the actual rate limit is the smaller CIR between CIR values configured by the two commands.

Configuring the qos lr inbound command occupies system resources. If system resources are insufficient, the configuration fails.

If you run the qos lr inbound command multiple times on the same interface, only the latest configuration takes effect.

If you need to set the same traffic policing rate on multiple interfaces, you can perform the configuration on a port group to reduce the workload.

Example

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

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] qos lr inbound cir 20000 cbs 375000
[HUAWEI-GigabitEthernet0/0/1] quit

qos lr outbound

Function

The qos lr outbound command configures traffic shaping in the outbound direction on an interface.

The undo qos lr outbound command cancels traffic shaping in the outbound direction on an interface.

By default, traffic shaping is not configured in the outbound direction on an interface.

Format

qos lr outbound cir cir-value [ cbs cbs-value ]

undo qos lr outbound

NOTE:

The S5720HI does 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:
  • Ethernet: 64 to 100000
  • MultiGE: 64 to 2500000
  • GigabitEthernet: 64 to 1000000
  • XGigabitEthernet: 64 to 10000000
  • 40GigabitEthernet: 64 to 40000000
  • Port group: 64 to 10000000

cbs cbs-value

Specifies the committed burst size (CBS).

The value is an integer that ranges from 4000 to 4294967295, in bytes.

If this parameter is not specified, the default CBS is 125 times the CIR.

Views

Ethernet interface view, MultiGE interface view, GE interface view, XGE interface view, 40GE interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a large number of data flows are sent from the upstream device to its downstream device, to prevent congestion or packet loss, run the qos lr outbound 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 policing 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

When interface-based 802.1X authentication is configured and the RADIUS server delivers the rate limit, the interface does not support the rate limit.

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.

Traffic shaping increases the delay because it uses the buffer mechanism.

If you run the qos lr outbound command multiple times on the same interface, only the latest configuration takes effect.

After traffic shaping is configured on an interface, the number of packets that can be forwarded on the interface every second is relevant to the packet length calculation method. By default, the device calculates the 20-byte inter-frame gap and preamble. That is, the device calculates the actual packet length plus 20-byte inter-frame gap and preamble.

When the rate of the MultiGE interface on the S6720SI is 5 Gbit/s, cbs cbs-value specified in the qos lr outbound command does not take effect.

Example

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

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

qos lr pps

Function

The qos lr pps command sets the rate limit on the management interface.

The undo qos lr pps command restores the default rate limit on the management interface.

By default, the rate limit on the management interface is 1000 pps.

NOTE:

Only the S1720X, S1720X-E, S5710-X-LI, S5720SI, S5720S-SI, S5720EI, S5720HI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S6720EI, and S6720S-EI support this command.

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.

The value is an integer that ranges from 1 to 2400, in pps.

Views

MEth 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 set the rate limit of packets on the management 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.

In a stack, only the management interface of the master switch can reach the value specified by the qos lr pps command.

Example

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

<HUAWEI> system-view
[HUAWEI] interface meth 0/0/1
[HUAWEI-MEth0/0/1] qos lr pps 100

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

NOTE:

The S5720HI does not support cir, cbs, and pbs.

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:
  • Ethernet: 0 to 100000
  • MultiGE: 0 to 2500000
  • GigabitEthernet: 0 to 1000000
  • 40GigabitEthernet: 0 to 40000000
  • XGigabitEthernet: 0 to 10000000
  • Port group: 0 to 10000000
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:
  • Ethernet: 64 to 100000
  • MultiGE: 64 to 2500000
  • GigabitEthernet: 64 to 1000000
  • XGigabitEthernet: 64 to 10000000
  • 40GigabitEthernet: 64 to 40000000
  • Port group: 64 to 10000000
The default value is the maximum bandwidth of an interface.

The PIR must be higher 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 4000 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 4000 to 4294967295, in bytes.

Views

Ethernet interface view, MultiGE interface view, GE interface view, XGE interface view, 40GE 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 outbound 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.

After traffic shaping is configured on an interface, the number of packets that can be forwarded on the interface every second is relevant to the packet length calculation method. By default, the device calculates the 20-byte inter-frame gap and preamble. That is, the device calculates the actual packet length plus 20-byte inter-frame gap and preamble.

When interface queue shaping is configured on the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5710-X-LI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-SI, only pir and pbs take effect, and the maximum value of pbs is 16380000.

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 GE0/0/1 to 10000 kbit/s and the PIR to 20000 kbit/s.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] qos queue 4 shaping cir 10000 pir 20000
[HUAWEI-GigabitEthernet0/0/1] quit
Related Topics

reset qos statistics

Function

The reset qos statistics command clears traffic statistics on an interface where rate limiting is performed in the inbound direction.

Format

reset qos statistics interface interface-type interface-number inbound

reset qos statistics inbound all

Parameters

Parameter

Description

Value

interface interface-type interface-number

Clears traffic statistics on a specified interface where rate limiting is performed.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

inbound

Clears traffic statistics in the inbound direction.

-

all

Clears traffic statistics on all interfaces where rate limiting is performed.

-

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Before recollecting traffic statistics on an interface where rate limiting is performed in the inbound direction, run the reset qos statistics command to clear existing traffic statistics. Then run the display qos statistics command to view the traffic statistics.

Prerequisites

The qos lr inbound command has been executed to configure rate limiting in the inbound direction on an interface.

Precautions

If the qos lr inbound command is not used, the system displays the following error message when you run the reset qos statistics interface interface-type interface-number inbound command:
Error: There is no rate limited configuration inbound in the interface.

The cleared statistics cannot be restored. Exercise caution when you use this command.

Example

# Clear traffic statistics on GE0/0/1 where rate limiting is performed in the inbound direction.

<HUAWEI> reset qos statistics interface gigabitethernet 0/0/1 inbound
Translation
Download
Updated: 2019-04-18

Document ID: EDOC1000178165

Views: 41947

Downloads: 1101

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next