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

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

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 and Traffic Shaping Commands

Traffic Policing and Traffic Shaping 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

For models excluding the CE6870EI:

car cir cir-value [ kbps | mbps | gbps ] [ pir pir-value [ kbps | mbps | gbps ] ] [ cbs cbs-value [ bytes | kbytes | mbytes ] pbs pbs-value [ bytes | kbytes | mbytes ] ] [ share ] [ mode { color-blind | color-aware } ] [ green pass [ service-class class color color-value ] | yellow { discard | pass [ service-class class color color-value ] } | red { discard | pass [ service-class class color color-value ] } ] *

undo car

For CE6870EI switches:

car cir cir-value [ kbps | mbps | gbps ] [ pir pir-value [ kbps | mbps | gbps ] ] [ cbs cbs-value [ bytes | kbytes | mbytes ] pbs pbs-value [ bytes | kbytes | mbytes ] ] [ share ] [ mode { color-blind | color-aware } ]

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. The value range differs depending on the rate unit. The default rate unit is kbit/s.
  • The value ranges from 8 to 100000000 when the rate unit is kbit/s.
  • The value ranges from 1 to 100000 when the rate unit is Mbit/s.
  • The value ranges from 1 to 100 when the rate unit is Gbit/s.
NOTE:
The minimum of the committed information rate (CIR) is 24 kbit/s on the CE6880EI.

kbps

Indicates that the rate unit is kbit/s.

-

mbps

Indicates that the rate unit is Mbit/s.

-

gbps

Indicates that the rate unit is Gbit/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. The value range differs depending on the rate unit. The default rate unit is kbit/s.
  • The value ranges from 8 to 100000000 when the rate unit is kbit/s.
  • The value ranges from 1 to 100000 when the rate unit is Mbit/s.
  • The value ranges from 1 to 100 when the rate unit is Gbit/s.
NOTE:
The minimum of the peak information rate (PIR) is 24 kbit/s on the CE6880EI.

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. The value range differs depending on the CBS unit. The default CBS is expressed in bytes.
  • The value ranges from 10000 to 536870912 when the CBS is expressed in bytes.
  • The value ranges from 10 to 524288 when the CBS is expressed in Kbytes.
  • The value ranges from 1 to 512 when the CBS is expressed in Mbytes.

The default CBS value is 8 times the CIR.

bytes

Indicates that the CBS is expressed in bytes.

-

kbytes

Indicates that the CBS is expressed in Kbytes.

-

mbytes

Indicates that the CBS is expressed in Mbytes.

-

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 differs depending on the PBS unit. The default PBS is expressed in bytes.
  • The value ranges from 10000 to 536870912 when the CBS is expressed in bytes.
  • The value ranges from 10 to 524288 when the CBS is expressed in Kbytes.
  • The value ranges from 1 to 512 when the CBS is expressed in Mbytes.

If the PIR is not set, the default PBS is equal to the CBS. If the PIR is set, the default PBS is 8 times the PIR.

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.

-

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.

-

pass

Allows packets to pass through.

-

discard

Discards packets.

-

service-class class

Specifies the class of service (CoS).

  • Assured Forwarding (AF): applies to key data services that require assured bandwidth and short delay. If the traffic rate is within the bandwidth limit, AF ensures forwarding quality. If the traffic rate exceeds the bandwidth limit, AF lowers the CoS, but does not discard the traffic before forwarding the traffic.
  • Best-Effort (BE): applies to best-effort services that require no strict QoS assurance. BE focuses on only reachability. For example, traditional IP packet transmission is in BE mode.
  • Expedited Forwarding (EF): indicates the highest QoS on a Diff-Serv network. EF applies to services that require the low packet loss ratio, short delay, and high bandwidth. In any case, EF traffic can achieve a rate equal to or larger than the configured rate.
  • Class Selector (CS): indicates the same CoS as the Precedence field.

The value can be af1, af2, af3, af4, be, cs6, cs7, or ef.

color color-value

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 DiffServ 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 DiffServ domain.

  • In color-aware mode, the rules for defining packet colors by traffic policing and the DiffServ domain conflict. If the rules take effect for a packet, the packet color takes effect as follows.

    Table 17-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

  • On the CE5850EI, the traffic policy containing CAR cannot be applied to the outbound direction.
  • For CE6870EI switches, the traffic policy containing traffic policing actions can be applied only to the inbound direction of the system, an LPU, an interface, or a VLAN.
  • If the packet forwarding mode is set to Cut Through on a CE6800 switch (except the CE6856HI, CE6850HI, CE6850U-HI, CE6851HI, and CE6855HI), a traffic policy containing car cannot be applied to the outbound direction on the switch. To use such a traffic policy, run the assign forward mode store-and-forward command to change the packet forwarding mode to store-and-forward or apply the traffic policy to the inbound direction.
  • If the packet forwarding mode is set to Cut Through on a CE8860EI, CE8850EI, CE7855EI, CE7850EI, CE6860EI, CE6855HI, CE6856HI, CE6850U-HI, CE6851HI, or CE6850HI switch, the switch does not support a traffic policy defining car. To use such a traffic policy, run the assign forward mode store-and-forward command to change the packet forwarding mode to store-and-forward.
  • When a traffic policy containing traffic policing actions is applied to a VLAN, the system, or an interface, you must use the undo traffic-policy command to unbind the traffic policy if you need to change traffic policing parameters.
  • For CE6870EI switches, when the CIR exceeds 1 Mbit/s, the CAR error rate is as follows:
    • Within 3% for packets with more than 256 bytes
    • Within 3% for packets with less than 256 bytes in a non-stack scenario and is within 6% for packets with less than 256 bytes in a stack scenario
  • It is recommended that the CIR be larger than 2 Mbit/s.
  • If the CoS of a packet is re-marked as EF, BE, CS6, or CS7, the packet can be re-marked only in green.
  • When you run this command in the same traffic behavior view multiple times, only the latest configuration takes effect.
  • In this command, the following settings are recommended:
    • The PIR is larger than the CIR.
    • The CBS is larger than the CIR.
    • The PBS is larger than the PIR.
    • PBS >= CBS = CIR/8*(1-1.5)*1000

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 10GE1/0/1 in the inbound direction on models excluding the CE6870EI.
<HUAWEI> system-view
[~HUAWEI] traffic classifier c1 type and
[*HUAWEI-classifier-c1] if-match any
[*HUAWEI-classifier-c1] quit
[*HUAWEI] traffic behavior b1
[*HUAWEI-behavior-b1] car cir 200000 kbps pir 2500000 kbps green pass yellow pass red discard
[*HUAWEI-behavior-b1] quit
[*HUAWEI] traffic policy p1
[*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1
[*HUAWEI-trafficpolicy-p1] quit
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] traffic-policy p1 inbound
# Configure traffic policing in the traffic behavior b1 as follows: Set the CIR to 200000 kbit/s and the PIR to 2500000 kbit/s. Then apply the traffic policy p1 containing the traffic behavior to the 10GE1/0/1 in the inbound direction on the CE6870EI.
<HUAWEI> system-view
[~HUAWEI] traffic classifier c1 type and
[*HUAWEI-classifier-c1] if-match any
[*HUAWEI-classifier-c1] quit
[*HUAWEI] traffic behavior b1
[*HUAWEI-behavior-b1] car cir 200000 kbps pir 2500000 kbps
[*HUAWEI-behavior-b1] quit
[*HUAWEI] traffic policy p1
[*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1
[*HUAWEI-trafficpolicy-p1] quit
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] traffic-policy p1 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.

NOTE:

Only the CE5810EI, CE5850EI, CE5855EI, and CE6870EI support this command.

Format

car car-name share

undo car share

Parameters

Parameter

Description

Value

car-name

Specifies the name of a CAR profile.

The value is a string of 1 to 31 case-sensitive characters without spaces. It cannot start with an underline (_) and cannot contain the following special characters: | > $ * ^ . If the value contains the double quotation mark ("), the value must contain other characters.

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 in the system view. Only the committed information rate (CIR) is configured in the profile.

A QoS CAR profile has been configured using the car command in the traffic behavior view. The CIR of this CAR profile must be smaller than the CIR of the QoS CAR profile configured by 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.

Example

# Configure aggregated CAR in the traffic behavior tb1.

<HUAWEI> system-view
[~HUAWEI] qos car qoscar1 cir 2000 kbps
[*HUAWEI] traffic behavior tb1
[*HUAWEI-behavior-tb1] car cir 1000 kbps pir 123456 kbps
[*HUAWEI-behavior-tb1] car qoscar1 share

display qos car

Function

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

Format

display qos car [ car-name ]

Parameters

Parameter

Description

Value

car-name

Displays the configuration of a specified QoS CAR profile.

If this parameter is not specified, the configurations of all QoS CAR profiles are displayed.

The value is a string of 1 to 31 case-sensitive characters without spaces. It cannot start with an underline (_) and cannot contain the following special characters: | > $ * ^ . If the value contains the double quotation mark ("), the value must contain other characters.

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
   ----------------------------------------------------------------              
   CAR Name     : qoscar1                                                       
   CAR Index    : 0                                                             
    car cir 8000 Kbps pir 10000 Kbps cbs 1000000 Bytes pbs 1250000 Bytes  
   Applied number on behavior  : 1                                              
    b1                                                                         
   Applied number on interface inbound  : 1                                     
    10GE1/0/1                                                                   
   Applied number on trunk inbound  : 0 
  ----------------------------------------------------------------              
   CAR Name     : qoscar2                                                       
   CAR Index    : 1                                                             
    car cir 5000 Kbps pir 8000 Kbps cbs 625000 Bytes pbs 1000000 Bytes    
   Applied number on behavior  : 1                                              
    b2                                                                         
   Applied number on interface inbound  : 1                                     
    10GE1/0/2                                                                   
   Applied number on trunk inbound  : 0                                        

# Display the configuration of the QoS CAR profile named qoscar1.

<HUAWEI> display qos car qoscar1
  ----------------------------------------------------------------              
   CAR Name     : qoscar1                                                       
   CAR Index    : 0                                                             
    car cir 8000 Kbps pir 10000 Kbps cbs 1000000 Bytes pbs 1250000 Bytes  
   Applied number on behavior  : 1                                              
    b1                                                                         
   Applied number on interface inbound  : 1                                     
    10GE1/0/1                                                                   
   Applied number on trunk inbound  : 0                                  
Table 17-20  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 Bytes pbs 1250000 Bytes

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.

Applied number on behavior

Number of traffic behaviors to which the QoS CAR profile is applied.

Applied number on interface inbound

Number of inbound interfaces to which the QoS CAR profile is applied.

Applied number on trunk inbound

Number of inbound Eth-Trunk interfaces to which the QoS CAR profile is applied.

Related Topics

display qos car statistics

Function

The display qos car statistics command displays statistics on forwarded and discarded packets in the inbound direction to a specified interface where a QoS CAR profile is applied.

Format

display qos car statistics interface interface-type interface-number inbound

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.

-

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 the inbound direction of an interface where a QoS CAR profile is applied. The command output helps you locate faults.

Example

# Display statistics on packets in the inbound direction on the 10GE1/0/1 to which a QoS CAR profile is applied.

<HUAWEI> display qos car statistics interface 10ge 1/0/1 inbound
 Slot : 1                                                                                                                          
 Passed packets   :  5724                                                                                                              
 Passed bytes     :  0                                                                                                              
 Discarded packets:  0                                                                                                              
 Discarded bytes  :  0  
Table 17-21  Description of the display qos car statistics command output

Item

Description

Slot

The default value is 1 on an unstacked switch; the value specifies the stack ID on a stacked switch.

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 or in a VLAN.

Format

display qos configuration { interface [ interface-type interface-number ] | vlan [ vlan-id ] }

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.

-

vlan [ vlan-id ]

NOTE:

Only the CE6870EI supports this parameter.

Displays the QoS configuration in a specified VLAN.

If no VLAN is specified, the QoS configurations in all VLANs are displayed.

The value is an integer that ranges from 1 to 4094 excluding reserved VLAN IDs. To set reserved VLAN IDs, run the vlan reserved command.

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 or in a specified VLAN. The command output helps you check the QoS configuration and locate QoS faults.

Example

# Display the QoS configuration on the 10GE1/0/1. (CE switches excluding CE6870EI)

<HUAWEI> display qos configuration interface 10ge 1/0/1
 interface 10GE1/0/1                                                
 --------------------------------------------------------------------------                                                         
 trust flag        : outer 8021p                                                                                                      
 diffserv domain   : default                                                                                                          
 dei enable        : disable                                                                                                          
 port priority     : 0                                                                                                                
 phb marking 8021p : enable                                                                                                           
 phb marking dscp  : disable                                                                                                          
 port wred         : -                                                                                                                
 port lr           : outbound, cir = -, cbs = -                                                                                       
 port car name     : -                                                                                                                
 --------------------------------------------------------------------------                                                         
 queue          shaping       schedule     wred                                                                                     
             cir       pir                                                                                                          
             cbs       pbs                                                                                                          
 --------------------------------------------------------------------------                                                         
 0             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 1             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 2      50000000 100000000    pq           -                                                                                        
       536870912 536870912                                                                                                          
                                                                                                                                    
 3             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 4             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 5             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 6             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 7             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 --------------------------------------------------------------------------                                                         
 

# Display the QoS configuration on the 10GE1/0/1. (CE6870EI)

<HUAWEI> display qos configuration interface 10ge 1/0/1
 interface 10GE1/0/1
 --------------------------------------------------------------------------                                                         
 trust flag      : -                                                                                                                
 port priority   : 0                                                                                                                
 port lr         : outbound, cir = -, cbs = -                                                                                       
 port car name   : -                                                                                                                
 diffserv domain : default                                                                                                          
 --------------------------------------------------------------------------                                                         
 queue          shaping       schedule     wred                                                                                     
             cir       pir                                                                                                          
             cbs       pbs                                                                                                          
 --------------------------------------------------------------------------                                                         
 0             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 1             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 2           123      1545    pq           -                                                                                        
           15375    193125                                                                                                          
                                                                                                                                    
 3             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 4             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 5             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 6             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 7             -         -    pq           -                                                                                        
               -         -                                                                                                          
                                                                                                                                    
 --------------------------------------------------------------------------              
Table 17-22  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).

dei enable

Whether the DEI field in a VLAN tag is mapped to the drop priority.

phb marking 8021p

Whether the mapping from PHBs to 802.1p priorities is enabled for outgoing packets on the interface.

phb marking dscp

Whether the mapping from PHBs to DSCP priorities is enabled for outgoing packets on the interface.

trust flag Priority trusting mode on an interface.

port priority

Default 802.1p priority added to untagged packets by the interface.

port wred

Name of the WRED drop profile applied to the interface.

port lr

Traffic shaping rate on the interface.

port car name

Name of the QoS CAR profile applied to the interface.

diffserv domain

Name of the DiffServ domain applied to the interface or VLAN.

queue

Interface queue index.

shaping

Traffic shaping configuration of the interface queue.

cir

Committed information rate (CIR).

cbs

Committed burst size (CBS).

pir

Peak information rate (PIR).

pbs

Peak burst size (PBS).

schedule

Scheduling mode of the interface queue.

wred

WRED drop profile bound to an interface queue. To apply a WRED drop profile to an interface, run the qos wred command.

VLAN

VLAN to which the DiffServ domain is applied.

dei

Whether the device is enabled to map the DEI field in a VLAN tag to the drop priority.

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 { percent percent-value | cir cir-value [ kbps | mbps | gbps ] [ cbs cbs-value [ bytes | kbytes | mbytes ] [ pbs pbs-value [ bytes | kbytes | mbytes ] ] | pir pir-value [ kbps | mbps | gbps ] [ cbs cbs-value [ bytes | kbytes | mbytes ] pbs pbs-value [ bytes | kbytes | mbytes ] ] ] }

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 without spaces. It cannot start with an underline (_) and cannot contain the following special characters: | > $ * ^ . If the value contains the double quotation mark ("), the value must contain other characters.

percent percent-value

Specifies the percentage of the CIR to the interface bandwidth.

The value is an integer that ranges from 1 to 100.

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. The value range differs depending on the rate unit. The default rate unit is kbit/s.
  • The value ranges from 8 to 100000000 when the rate unit is kbit/s.
  • The value ranges from 1 to 100000 when the rate unit is Mbit/s.
  • The value ranges from 1 to 100 when the rate unit is Gbit/s.
NOTE:
The minimum of the committed information rate (CIR) is 24 kbit/s on the CE6880EI.

kbps

Indicates that the rate unit is kbit/s.

-

mbps

Indicates that the rate unit is Mbit/s.

-

gbps

Indicates that the rate unit is Gbit/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. The value range differs depending on the rate unit. The default rate unit is kbit/s.
  • The value ranges from 8 to 100000000 when the rate unit is kbit/s.
  • The value ranges from 1 to 100000 when the rate unit is Mbit/s.
  • The value ranges from 1 to 100 when the rate unit is Gbit/s.
NOTE:
The minimum of the peak information rate (PIR) is 24 kbit/s on the CE6880EI.

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 differs depending on the CBS unit. The default CBS unit is bytes.
  • The value ranges from 10000 to 536870912 when the CBS unit is bytes.
  • The value ranges from 10 to 524288 when the CBS unit is KB.
  • The value ranges from 1 to 512 when the CBS unit is MB.

By default, the CBS is 8 times the CIR.

bytes

Indicates that the CBS is expressed in bytes.

-

kbytes

Indicates that the CBS is expressed in Kbytes.

-

mbytes

Indicates that the CBS is expressed in Mbytes.

-

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. The value range differs depending on the PBS unit. The default PBS is expressed in bytes.
  • The value ranges from 10000 to 536870912 when the CBS is expressed in bytes.
  • The value ranges from 10 to 524288 when the CBS is expressed in Kbytes.
  • The value ranges from 1 to 512 when the CBS is expressed in Mbytes.

If the PIR is not set, the default PBS is equal to the CBS. If the PIR is set, the default PBS is 8 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:

Precautions

  • The QoS CAR profile with percent percent-value specified can be only applied to the physical interface.
  • A maximum of 512 QoS CAR profiles can be created on a device.
  • For CE6870EI switches, when the CIR exceeds 1 Mbit/s, the CAR error rate is as follows:
    • Within 3% for packets with more than 256 bytes
    • Within 3% for packets with less than 256 bytes in a non-stack scenario and is within 6% for packets with less than 256 bytes in a stack scenario
  • It is recommended that the CIR be larger than 2 Mbit/s.
  • 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.

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

qos car mode single-rate single-bucket

Function

The qos car mode single-rate single-bucket command switches new QoS CAR profiles from the two-rate-two-bucket mode to the single-rate-single-bucket mode.

The undo qos car mode single-rate single-bucket command restores the default configuration.

By default, the traffic measurement mode is selected based on parameter settings of a QoS CAR profile.

NOTE:
The CE6870EI and CE6880EI do not support this command.

Format

qos car mode single-rate single-bucket

undo qos car mode single-rate single-bucket

Parameters

None

Views

System 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 to implement traffic policing. When QoS CAR profiles are applied to many interfaces, meter resources may be incorrectly allocated.

You can run the qos car mode single-rate single-bucket command to switch new QoS CAR profiles from the two-rate-two-bucket mode to the single-rate-single-bucket mode, saving meter resources.

Precautions

  • The single-rate-single-bucket mode is used when MQC that occupies meter resources implements traffic policing, hierarchical traffic policing, and CPCAR.
  • After the two-rate-two-bucket mode is switched to the single-rate-single-bucket mode, the CIR, CBS, PIR, and PBS in the QoS CAR profile in two-rate-two-bucket mode are converted to values in single-rate-single-bucket mode and delivered to the chip.

Example

# Configure the device to switch new QoS CAR profiles from the two-rate-two-bucket mode to the single-rate-single-bucket mode.

<HUAWEI> system-view
[~HUAWEI] qos car mode single-rate single-bucket

qos car { yellow | red }

Function

The qos car { yellow | red } command configures global traffic policing and an action taken for yellow and red packets.

The undo qos car { yellow | red } command cancels traffic policing.

By default, yellow packets are allowed to pass through, and red packets are discarded.

NOTE:

Only the CE6870EI supports this command.

Format

qos car { yellow { discard | pass } | red { discard | pass } }*

undo qos car

Parameters

Parameter

Description

Value

discard

Discards packets.

-

pass

Permits packets to pass through.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To monitor the volume of the traffic that enters a network and limit the traffic within a proper range, configure a traffic policy. The qos car command configures global traffic policing and an action taken for yellow and red packets.

NOTE:

By default, green packets are allowed to pass through. You cannot configure an action taken for green packets.

Follow-up Procedure

Run the car command in the traffic behavior view.

Precautions

After a traffic policy containing CAR is applied, the system permits or discards packets of different colors based on the actions defined in the qos car command.

Example

# Configure traffic policing actions taken for packets of different colors: permit yellow packets and discard red packets.
<HUAWEI> system-view
[~HUAWEI] qos car yellow pass red discard 

qos car ifg disable

Function

The qos car ifg disable command configures the device not to count the inter-frame gap and preamble of packets when the device calculates the traffic policing rate or inbound rate limit of an interface.

The undo qos car ifg disable command restores the default configuration.

By default, the device counts the inter-frame gap and preamble of packets when the device calculates the traffic policing rate or inbound rate limit of an interface.

Format

qos car ifg disable

undo qos car ifg disable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The gap between Ethernet frames is called the inter-frame gap, which is of 12 bytes.

The Ethernet frame length is from the destination MAC address to the FCS. The 8-byte preamble is appended to an outgoing Ethernet frame and used for synchronization. When the receiver receives the preamble, it determines that the received one is an Ethernet frame.

After traffic policing or inbound rate limiting is configured on an interface, the device counts the inter-frame gap and preamble of packets when calculating the traffic policing rate or inbound rate limit. As a result, the rate is inaccurate. After the qos car ifg disable command is used, the device does not count the inter-frame gap and preamble of packets when calculating the traffic policing rate or inbound rate limit.

The qos car ifg disable command affects calculation of the traffic policing rate and inbound rate limit on an interface. When the car (traffic behavior view) and qos car inbound commands are used to configure traffic policing and inbound rate limiting on an interface, the device does not count the inter-frame gap and preamble when calculating the traffic policing rate or inbound rate limit of the interface.

Configuration Impact

Before this command is used, the following formula is used to calculate the traffic policing rate or inbound rate limit:

Traffic policing rate or inbound 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 inbound rate limit:

Traffic policing rate or inbound 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 or inbound rate limit of an interface.

<HUAWEI> system-view
[~HUAWEI] qos car ifg disable

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 is a string of 1 to 31 case-sensitive characters without spaces. It cannot start with an underline (_) and cannot contain the following special characters: | > $ * ^ . If the value contains the double quotation mark ("), the value must contain other characters.

Views

GE interface view, 10GE interface view, 25GE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view, tunnel interface view
NOTE:

Only CE6870EI supports the tunnel interface 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 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.

NOTE:

After a QoS CAR profile is applied to a tunnel interface, the display qos car statistics command cannot be used to view the packet statistics.

Precautions

To configure the same QoS CAR on multiple interfaces, perform the configuration on a port group to reduce the workload.

Configuring the qos car inbound command occupies system resources. If system resources are insufficient, the configuration may fail.

If a QoS CAR profile and a traffic policy containing the traffic policing action are applied to the same interface, QoS CAR parameters defined in the QoS CAR profile do not take effect. This is because the traffic policy takes precedence over the QoS CAR profile.

Example

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

<HUAWEI> system-view
[~HUAWEI] qos car qoscar1 cir 10000 kbps cbs 10240 bytes
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] qos car inbound qoscar1
[*HUAWEI-10GE1/0/1] quit
Related Topics

qos lr

Function

The qos lr command sets the traffic shaping rate to limit the rate of data packets sent by an interface.

The undo qos lr command cancels the traffic shaping rate.

By default, the traffic shaping rate is the maximum bandwidth of an interface.

Format

qos lr cir cir-value [ kbps | mbps | gbps ] [ cbs cbs-value [ bytes | kbytes | mbytes ] ] [ outbound ]

undo qos lr [ outbound ]

Parameters

Parameter

Description

Value

cir cir-value

Specifies the committed information rate (CIR).

The value is an integer. The value range differs depending on the rate unit. The default rate unit is kbit/s.
  • The value ranges from 64 to 100000000 when the rate unit is kbit/s.
  • The value ranges from 1 to 100000 when the rate unit is Mbit/s.
  • The value ranges from 1 to 100 when the rate unit is Gbit/s.

kbps

Indicates that the rate unit is kbit/s.

-

mbps

Indicates that the rate unit is Mbit/s.

-

gbps

Indicates that the rate unit is Gbit/s.

-

cbs cbs-value

Specifies the committed burst size (CBS).

The value is an integer. The value range differs depending on the CBS unit. The default CBS is expressed in bytes.
  • The value ranges from 10000 to 536870912 when the CBS is expressed in bytes.
  • The value ranges from 10 to 524288 when the CBS is expressed in Kbytes.
  • The value ranges from 1 to 512 when the CBS is expressed in Mbytes.

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

bytes

Indicates that the CBS is expressed in bytes.

-

kbytes

Indicates that the CBS is expressed in Kbytes.

-

mbytes

Indicates that the CBS is expressed in Mbytes.

-

outbound

Limits the rate of outgoing packets.

-

Views

GE interface view, 10GE 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

This command applies only to the outbound direction on an interface.

When the traffic rate in the outbound direction of an interface is larger than the alarm threshold for the rate limit in the outbound direction of an interface, an alarm is generated.

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 command multiple times on the same interface, only the latest configuration takes effect.

Example

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

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] qos lr cir 20000 kbps cbs 375000 bytes
[*HUAWEI-10GE1/0/1] quit
Related Topics

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 of the CE5850EI, CE6800, CE7800, and CE8800 is 3000 pps, and the rate limit on the management interface of the CE5810EI, CE5850HI, and CE5855EI is 800 pps.

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 100 to 10240, 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.

Example

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

<HUAWEI> system-view
[~HUAWEI] interface meth 0/0/0
[~HUAWEI-MEth0/0/0] 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 [ kbps | mbps | gbps ] [ cbs cbs-value [ bytes | kbytes | mbytes ] | pir pir-value [ kbps | mbps | gbps ] [ cbs cbs-value [ bytes | kbytes | mbytes ] pbs pbs-value [ bytes | kbytes | mbytes ] ] ]

undo qos queue queue-index shaping

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 absolute value of the committed information rate (CIR).

The value is an integer. The value range differs depending on the rate unit. The default value is the maximum bandwidth of an interface. The default rate unit is kbit/s.
  • The value ranges from 64 to 100000000 when the rate unit is kbit/s.
  • The value ranges from 1 to 100000 when the rate unit is Mbit/s.
  • The value ranges from 1 to 100 when the rate unit is Gbit/s.

kbps

Indicates that the rate unit is kbit/s.

-

mbps

Indicates that the rate unit is Mbit/s.

-

gbps

Indicates that the rate unit is Gbit/s.

-

pir pir-value

Specifies the absolute value of the peak information rate (PIR).

The value is an integer. The value range differs depending on the rate unit. The default rate unit is kbit/s.
  • The value ranges from 64 to 100000000 when the rate unit is kbit/s.
  • The value ranges from 1 to 100000 when the rate unit is Mbit/s.
  • The value ranges from 1 to 100 when the rate unit is Gbit/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 absolute value of the committed burst size (CBS), which is the volume of committed burst traffic that can pass through an interface.

The value is an integer. The value range differs depending on the CBS unit. The default CBS is related to the CIR. The default CBS is expressed in bytes.
  • The value ranges from 10000 to 536870912 when the CBS is expressed in bytes.
  • The value ranges from 10 to 524288 when the CBS is expressed in Kbytes.
  • The value ranges from 1 to 512 when the CBS is expressed in Mbytes.

The default CBS value is 8 times the CIR.

bytes

Indicates that the CBS is expressed in bytes.

-

kbytes

Indicates that the CBS is expressed in Kbytes.

-

mbytes

Indicates that the CBS is expressed in Mbytes.

-

pbs pbs-value

Specifies the absolute value of 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 differs depending on the CBS unit. The default PBS is related to the PIR. The default PBS is expressed in bytes.
  • The value ranges from 10000 to 536870912 when the CBS is expressed in bytes.
  • The value ranges from 10 to 524288 when the CBS is expressed in Kbytes.
  • The value ranges from 1 to 512 when the CBS is expressed in Mbytes.

If the PIR is not set, the default PBS is equal to the CBS. If the PIR is set, the default PBS is 8 times the PIR.

Views

GE interface view, 10GE 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.

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

Example

# Set absolute values of the CIR and PIR for queue 4 on the 10GE1/0/1 to 10000 kbit/s and 20000 kbit/s, respectively.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] qos queue 4 shaping cir 10000 kbps pir 20000 kbps
Related Topics

reset qos car statistics

Function

The reset qos car statistics command clears packet statistics on an interface to which a QoS CAR profile is applied.

Format

reset qos car statistics interface interface-type interface-number inbound

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.

-

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Before recollecting statistics on forwarded and discarded packets on an interface 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

The cleared statistics on forwarded and discarded packets on an interface cannot be restored. Exercise caution when you use this command.

Example

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

<HUAWEI> reset qos car statistics interface 10ge 1/0/1 inbound
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 50283

Downloads: 337

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