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

AR500, AR510, and AR530 V200R007 Commands Reference

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 Commands

Traffic Policing Commands

bandwidth

Function

The bandwidth command sets the base value for the percentage of the CIR to the interface bandwidth in MQC-based traffic policing.

The undo bandwidth command cancels the base value for the percentage of the CIR to the interface bandwidth in MQC-based traffic policing.

By default, the base value for the percentage of the CIR to the interface bandwidth is not set in MQC-based traffic policing.

Format

bandwidth bandwidth-value [ kbps ]

undo bandwidth

Parameters

Parameter

Description

Value

bandwidth-value

Specifies the base value for the percentage of the CIR to the interface bandwidth in MQC-based traffic policing.

The value is an integer that ranges from 1 to 1000000, and the default unit is Mbit/s.

kbps

Indicates the unit of an interface bandwidth is kbit/s.

If kbps is not specified, the unit of an interface bandwidth is Mbit/s.

-

Views

Dialer interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In MQC-based traffic policing, you can specify the percentage of the CIR. By default, the actual interface bandwidth is used as the base value for the percentage of the CIR. You can run the bandwidth bandwidth-value command to set the base value for the percentage of the CIR. For example, when cir-percentage in the car cir pct cir-percentage command is set to 10 and bandwidth-value in the bandwidth bandwidth-value command is set to 20 Mbit/s, the rate limit is 2 Mbit/s (20 Mbit/s x 10%).

Example

# Set the base value for the percentage of the CIR to the interface bandwidth in MQC-based traffic policing to 20 Mbit/s.

<Huawei> system-view
[Huawei] interface dialer 0
[Huawei-Dialer0] bandwidth 20

car (traffic behavior view)

Function

The car command configures traffic policing in a traffic behavior.

The undo car command deletes traffic policing from a traffic behavior.

By default, traffic policing is not configured in a traffic behavior.

Format

car cir { cir-value | pct cir-percentage } [ pir { pir-value | pct pir-percentage } ] [ cbs cbs-value pbs pbs-value ] [ share ] [ mode { color-blind | color-aware } ] [ green { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value ] } ] [ yellow { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value ] } ] [ red { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value ] } ]

undo car

Parameters

Parameter

Description

Value

cir

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

-

cir-value

Specifies the absolute value of the CIR.

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

pct cir-percentage

Specifies the percentage of the CIR to the interface bandwidth.

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

pir

Specifies the peak information rate (PIR), which is the maximum rate of traffic that can pass through an interface.

-

pir-value

Specifies the absolute value of the PIR.

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.

pct pir-percentage

Specifies the percentage of the PIR to the interface bandwidth.

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

share

Indicates that all the rules in a traffic classifier bound to a traffic behavior share CAR parameters.

-

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 1500 to 4294967295, in bytes.

The default setting is as follows:
  • If the PIR is not set or the PIR and CIR are the same, the CBS is 188 times the CIR.
  • If the PIR is set and the PIR and CIR are different, the 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 1500 to 4294967295, in bytes.

The default setting is as follows:
  • If the PIR is not set or the PIR and CIR are the same, the PBS is 313 times the CIR.
  • If the PIR is set and the PIR and CIR are different, the PBS is 125 times the PIR.

mode

Indicates the color mode for a traffic behavior in the traffic policy. This parameter is valid for only the traffic behavior in the traffic policy.

-

color-blind

Indicates the color-blind mode. In color-blind mode, a traffic behavior in the sub traffic policy does not affect the traffic policing action.

-

color-aware

Indicates the color-aware mode. In color-aware mode, a traffic behavior in the sub traffic policy affects the traffic policing action. For details, see Table 15-9.

-

yellow

green

red

Specifies the packet color. By default, green packets and yellow packets are allowed to pass through, and red packets are discarded.

-

discard

Discards packets of a color.

-

pass

Permits packets of a color to pass through.

-

remark-dscp dscp-value

Re-marks the DSCP priority of packets of a color.

The value can be the DiffServ code, an integer ranging from 0 to 63; the value can also be the name of the DSCP service type, such as af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1-cs7, default, and ef.

The values corresponding to names of DSCP service types are as follows:

  • af11: 10
  • af12: 12
  • af13: 14
  • af21: 18
  • af22: 20
  • af23: 22
  • af31: 26
  • af32: 28
  • af33: 30
  • af41: 34
  • af42: 36
  • af43: 38
  • cs1: 8
  • cs2: 16
  • cs3: 24
  • cs4: 32
  • cs5: 40
  • cs6: 48
  • cs7: 56
  • default: 0
  • ef: 46

remark-8021p 8021p-value

Re-marks the 802.1p priorities of packets.

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

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.

Traffic policing actions include permit, deny, and forward based on the changed priority. By default, green packets and yellow packets are allowed to pass through, and red packets are discarded.
  • You can change the methods for processing packets in different colors received on WAN interfaces. For example, if you change the DSCP priority or 802.1p priority of green packets before forwarding them, the connected device can provide QoS services based on the changed priority.
  • The device cannot discard the green packets received on LAN interfaces or change priorities of these packets.
  • The device cannot discard the green or yellow packets sent from LAN interfaces.
Hierarchical traffic policing allows traffic policing to be configured in traffic behaviors of both the traffic policy and sub traffic policy. In color-aware mode, CAR in the sub traffic policy affects packet coloring by CAR in the traffic policy. In color-blind mode, CAR in the sub traffic policy does not affect packet coloring by CAR in the traffic policy. Hierarchical traffic policing achieves bandwidth sharing and ensures that high-priority packets are first forwarded. Table 15-9 describes packet coloring rules in color-aware mode.
Table 15-9  Packet coloring rules

Packet Color by CAR in the Sub Traffic Policy

Packet Color by CAR in the Traffic Policy

Final Packet Color

Green

Red

Red

Green

Yellow

Yellow

Green

Green

Green

Yellow

Red

Red

Yellow

Yellow

Yellow

Yellow

Green

Yellow

Red

Red

Red

Red

Yellow

Red

Red

Green

Red

Prerequisites

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

Precautions

  • When traffic policing is performed for the packets received on LAN interfaces, CAR is separately performed for packets forwarded to LAN and WAN interfaces. The configured rate limit may be twice the actual CAR value.
  • 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.
  • When the minimum granularity of traffic policing is larger than the maximum rate of an interface, traffic policing does not take effect on the interface. You need to set the CIR or PIR to be smaller than the maximum rate of the interface.
  • On the Layer 2 FE interface or Layer 2 GE interface of the device, when the traffic policing rate is in the range of 64 kbit/s to 1000 kbit/s, the traffic policing rate is a multiple of 64 kbit/s. When the traffic policing rate is in the range of 1000 kbit/s to 100000 kbit/s, the traffic policing rate is a multiple of 1000 kbit/s. On other LAN interfaces, the traffic policing rate is a multiple of 64 kbit/s. If the CIR is set to 64 x n kbit/s, the traffic policing rate is 64 x n kbit/s. If the CIR is larger than 64 x n kbit/s and is smaller than 64 x (n + 1) kbit/s, the traffic policing rate is 64 x n kbit/s.
  • Only WAN-side interfaces support the percentage of the CIR to the interface bandwidth and the percentage of the PIR to the interface bandwidth. You must use either absolute values of the CIR and PIR or the percentages of the CIR and PIR to the interface bandwidth.
  • When you use the bandwidth percentage for setting the CIR and PIR, the bandwidth varies depending on the interface type:
    • The bandwidth is the actual physical bandwidth of a physical interface.
    • The bandwidth of a tunnel interface is 1 Gbit/s.
    • The bandwidth of a logical interface such as the Eth-Trunk, that is bundled by multiple interfaces or sub-interfaces is the total bandwidth of all bundled interfaces or sub-interfaces.
    • The bandwidth of a dialer interface is the actual bandwidth of a physical interface bound to the dialer interface or the bandwidth sum of multiple physical interfaces.
    NOTE:

    When a virtual template interface is bound to L2TP services, the percentage of the CIR or PIR to the interface bandwidth cannot be set on the virtual template interface.

  • The traffic policing action in the traffic policy configured for outbound traffic on the LAN-side interface of the device is invalid for replicated multicast packets.

Example

# Configure traffic policing in the traffic behavior tb1: Set the CIR to 384 kbit/s and the PIR to 768 kbit/s, permit green packets to be sent, forward yellow packets after the DSCP priority of yellow packets is re-marked with 0, and discard red packets.
<Huawei> system-view
[Huawei] traffic behavior tb1
[Huawei-behavior-tb1] car cir 384 pir 768 green pass yellow pass remark-dscp 0 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 }

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 8 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 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 1500 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 1500 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 service scheme 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 huawei
[Huawei-qos-profile-huawei] car cir 10000 cbs 10240 pbs 10240 inbound 
Related Topics

display qos-profile

Function

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

Format

display qos-profile [ profile-name ]

Parameters

Parameter

Description

Value

profile-name

Specifies the name of a QoS profile.

The value must the name of an existing QoS profile.

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 summary configurations of all QoS profiles.

<Huawei> display qos-profile
qos-profile a1:                                                             
  car cir 1000 cbs 188000 pbs 313000 inbound                                    
                                                                                
qos-profile a2: 
  statistics enable                                                             
Table 15-10  Description of the display qos-profile command output

Item

Description

qos-profile a1

Name of the QoS profile.

car cir 1000 cbs 188000 pbs 313000 inbound

CAR in the inbound direction.

statistics enable

Whether the traffic statistics function is configured.

display qos adaptation-profile

Function

The display qos adaptation-profile command displays the adaptive traffic profile configuration.

Format

display qos adaptation-profile [ adaptation-profile-name ]

Parameters

Parameter

Description

Value

adaptation-profile-name

Specifies the name of an adaptive traffic 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.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

A maximum of 8 adaptive traffic profiles can be configured on the device.

You can use the display qos adaptation-profile command to view the number of configured adaptive traffic profiles and the detailed configuration of a specified adaptive traffic profile.

If the adaptive traffic profile name is not specified, the display qos adaptation-profile command displays the indexes and names of all the configured adaptive traffic profiles, maximum number of adaptive traffic profiles in the system, and number of configured adaptive traffic profiles. If the adaptive traffic profile name is specified, the display qos adaptation-profile command displays the detailed configuration of the adaptive traffic profile.

Example

# Display the indexes and names of all the configured adaptive traffic profiles.

<Huawei> display qos adaptation-profile
        Index                   Adaptation-profile name                         
-----------------------------------------------------------------               
        0                       gts1                                            
        1                       gts2                                            
-----------------------------------------------------------------               
 Total   256     Used   2                                                       

# Display the detailed configuration of the adaptive traffic profile gts1.

<Huawei> dis qos adaptation-profile gts1
Adaptation-profile: gts1                                                        
-----------------------------------------------------------------               
Rate lower threshold: 2048(Kbps)                                                
Rate upper threshold: 3072(Kbps)                                                
Low rate adjustment threshold on packet loss: 20(%)                             
High rate adjustment threshold on packet loss: 30(%)                            
Rate step: 128(Kbps)                                                            
Rate increase interval: 50(s)                                                   
NQA admin Name: admin                                                           
NQA test Name: jitter                                                           
-----------------------------------------------------------------    
Table 15-11  Description of the display qos adaptation-profile command output

Item

Description

Index

Adaptive traffic profile index.

Adaptation-profile name

Adaptive traffic profile name.

Total

Maximum number of adaptive traffic profiles in the system.

Used

Number of configured adaptive traffic profiles.

Adaptation-profile

Adaptive traffic profile name.

Rate lower threshold

Lower threshold for the traffic shaping rate. To set the lower threshold for the traffic shaping rate, run the rate-range command.

Rate upper threshold

Upper threshold for the traffic shaping rate. To set the upper threshold for the traffic shaping rate, run the rate-range command.

Low rate adjustment threshold on packet loss

Lower threshold for the packet loss ratio. To set the lower threshold for the packet loss ratio, run the rate-adjust loss command.

High rate adjustment threshold on packet loss

Upper threshold for the packet loss ratio. To set the upper threshold for the packet loss ratio, run the rate-adjust loss command.

Rate step

Traffic shaping rate adaptation step. To set the traffic shaping rate adaptation step, run the rate-adjust step command.

Rate increase interval

Interval at which the traffic shaping rate increases. To set the interval at which the traffic shaping rate increases, run the rate-adjust increase interval command.

NQA admin Name

Administrator name for the NQA test instance bound to the adaptive traffic profile. To set the administrator name for the NQA test instance bound to the adaptive traffic profile, run the track nqa command.

NQA test Name

Name of the NQA test instance bound to the adaptive traffic profile. To set the name of the NQA test instance bound to the adaptive traffic profile, run the track nqa command.

display qos adaptation-profile applied-record

Function

The display qos adaptation-profile applied-record command displays the record of a specified adaptive traffic profile.

Format

display qos adaptation-profile adaptation-profile-name [ interface interface-type interface-number ] applied-record

display qos adaptation-profile adaptation-profile-name interface virtual-template vt-number virtual-access va-number applied-record

Parameters

Parameter

Description

Value

adaptation-profile-name

Displays the record of a specified adaptive traffic profile.

The value is a string of 1 to 31 case-sensitive characters without spaces.

interface interface-type interface-number
Displays the record of a specified adaptive traffic profile on a specified interface:
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

virtual-template vt-number

Displays the queue-based traffic statistics on a specified virtual template interface. vt-number specifies the number of the virtual template interface.

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

virtual-access va-number

Displays the queue-based traffic statistics on a specified virtual access interface. va-number specifies the number of the virtual access interface.

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

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The display qos adaptation-profile applied-record command displays the record of a specified adaptive traffic profile, including information about the interface, traffic profile, and NQA test instance bound to the adaptive traffic profile, traffic shaping rate, and latest packet loss ratio detected by the NQA test instance. The command output helps you locate faults.

Example

# Display the record of the adaptive traffic profile gts1 on all interfaces.

<Huawei> display qos adaptation-profile gts1 applied-record
Interface: GigabitEthernet0/0/1                                                 
-----------------------------------------------------------------               
 Policy: p1
  Classifier: c1
   Behavior: b1
    gts adaptation-profile gts1
----------------------------------------------------------------- 

# Display the record of the adaptive traffic profile gts1 on the GE0/0/1.

<Huawei> display qos adaptation-profile gts1 interface gigabitethernet 0/0/1 applied-record
Interface: GigabitEthernet0/0/1                                                 
-----------------------------------------------------------------               
QoS gts adaptation-profile: gts1                                                
-----------------------------------------------------------------               
NQA admin Name: admin                                                           
NQA test Name: jitter                                                           
Current Rate: 3072(Kbps)                                                        
Last packet loss: 20(%)                                                         
The latest traffic shaping rate fails to be updated because the packet loss ratio is within the allowed range.
Table 15-12  Description of the display qos adaptation-profile applied-record command output

Item

Description

Interface: GigabitEthernet0/0/1

Interface to which the adaptive traffic profile is applied.

QoS gts adaptation-profile: gts1

Adaptive traffic profile that is applied to the interface. To bind an adaptive traffic profile to an interface, run the qos gts adaptation-profile command.

Policy: p1

Traffic policy p1 bound to the adaptive traffic profile.

Classifier: c1

Traffic classifier bound to the traffic policy.

Behavior: b1

Traffic behavior bound to the traffic policy.

gts adaptation-profile gts1

Adaptive traffic profile bound to the traffic behavior. To bind an adaptive traffic profile to a traffic behavior, run the gts adaptation-profile command.

NQA admin Name

Administrator name for the NQA test instance bound to the adaptive traffic profile. To set the administrator name for the NQA test instance bound to the adaptive traffic profile, run the track nqa command.

NQA test Name

Name of the NQA test instance bound to the adaptive traffic profile. To set the name of the NQA test instance bound to the adaptive traffic profile, run the track nqa command.

Current Rate

Current traffic shaping rate.

Last packet loss

Latest packet loss ratio detected by the NQA test instance.

The latest traffic shaping rate fails to be updated because the packet loss ratio is within the allowed range.

Result of the update on the latest traffic shaping. One of the following results may be displayed:
  • The latest traffic shaping rate is updated successfully.
  • The latest traffic shaping rate fails to be updated because the packet loss ratio is not greater than the upper threshold for three consecutive times.
  • The latest traffic shaping rate fails to be updated because the packet loss ratio is not smaller than the upper threshold for three consecutive times.
  • The latest traffic shaping rate fails to be updated because the packet loss ratio is within the allowed range.
  • The latest traffic shaping rate fails to be updated because NQA detection fails.
  • The latest traffic shaping rate fails to be updated because bandwidth is sufficient to carry traffic.
  • The latest traffic shaping rate fails to be updated because the traffic shaping rate reaches the rate limit.

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 | outbound }

display qos car statistics interface { virtual-template vt-number virtual-access va-number } { inbound | outbound }

Parameters

Parameter

Description

Value

interface interface-type interface-number

Displays statistics on forwarded and discarded packets on a specified interface.

-

virtual-template vt-number

Displays statistics on forwarded and discarded packets on a specified virtual template interface.

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

virtual-access va-number

Displays statistics on forwarded and discarded packets on a specified virtual access interface.

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

inbound

Displays statistics on forwarded and discarded packets and statistics on packets in different colors after traffic policing is performed in the inbound direction.

-

outbound

Displays statistics on forwarded and discarded packets and statistics on packets in different colors after traffic policing is performed in the outbound direction.

-

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 forwarded and discarded packets after traffic policing is performed in the outbound direction on the GE0/0/1.

<Huawei> display qos car statistics interface gigabitethernet 0/0/1 outbound
 Interface : GigabitEthernet0/0/1
 Direction : Outbound                                                           
---------------------------------------------------------------------------     
Type               Packets/Bytes                    Rate(pps/bps)               
---------------------------------------------------------------------------     
Drop                    0/0                             0/0                     
Pass                    0/0                             0/0                     
Green                   0/0                             0/0                     
Yellow                  0/0                             0/0                     
Red                     0/0                             0/0                     
Table 15-13  Description of the display qos car statistics command output

Item

Description

Interface

Number of the interface where traffic policing is configured.

Direction

Direction in which traffic policing is performed on the interface:
  • Inbound
  • Outbound

Drop

Number of discarded packets on the interface after traffic policing is applied.

Pass

Number of forwarded packets on the interface after traffic policing is applied.

Green

Number of green packets on the interface after traffic policing is applied.

Yellow

Number of yellow packets on the interface after traffic policing is applied.

Red

Number of red packets on the interface after traffic policing is applied.

Type

Packet processing mode after traffic policing is applied to an interface.

Packets/Bytes

Number of packets or bytes.

Rate(pps/bps)

Rates, in pps or bit/s.

Related Topics

gts (traffic behavior view)

Function

The gts command configures traffic shaping in a traffic behavior.

The undo gts command deletes traffic shaping from a traffic behavior.

By default, traffic shaping is not configured in a traffic behavior.

Format

gts cir { cir-value [ cbs cbs-value ] | pct pct-value } [ queue-length queue-length ]

undo gts

Parameters

Parameter

Description

Value

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.

cbs cbs-value

Specifies the committed burst size (CBS), which is the maximum volume of burst traffic that can pass through an interface.

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

By default, the CBS value is 25 times the CIR value. If the value 25 times the CIR value is smaller than 1500, the CBS value is 1500.

pct pct-value

Specifies the percentage of the available bandwidth.

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

NOTE:

After the PCT is configured, the CBS cannot be configured manually. The device automatically calculates the default CBS based on the configured PCT.

queue-length queue-length

Specifies the maximum number of packets buffered in a queue.

The value is an integer that ranges from 1 to 1024. The default value is 64.

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If the rate of the downstream device interface is smaller than the rate of the upstream device interface, congestion may occur on the downstream device interface. To prevent packet loss and congestion, configure traffic shaping for queues on the upstream device interface to control the rate of outgoing packets so that packets can be sent at an even rate.

After configuring traffic shaping in a traffic behavior bound to a traffic policy, you can set different rates for packets matching different traffic classifiers on an interface so that differentiated services are implemented.

NOTE:
  • If gts (traffic behavior view) is configured in a traffic behavior of a traffic policy, the queue bandwidth of the sub traffic policy is the queue bandwidth of the traffic policy multiplied by pct-value.

  • If a traffic policy is applied to the interface where qos gts is configured, the queue bandwidth of the interface is the CIR multiplied by pct-value.

  • In other situations, the queue bandwidth is the interface bandwidth multiplied by pct-value.

Follow-up Procedure

Create a traffic classifier and a traffic policy, bind the traffic classifier to the traffic behavior in the traffic policy, and apply the traffic policy.

Precautions

You cannot configure gts (traffic behavior view) and gts adaptation-profile commands in the same traffic behavior.

Traffic shaping can only be configured in a traffic behavior of a traffic policy on the outbound WAN interface of the device.

If you run the gts command multiple times, only the latest configuration takes effect.

Example

# Configure traffic shaping in the traffic behavior tb1: Set the CIR to 38400 kbit/s, the CBS to 960000 bytes, and the maximum number of packets buffered in a queue to 100.

<Huawei> system-view
[Huawei] traffic behavior tb1
[Huawei-behavior-tb1] gts cir 38400 cbs 960000 queue-length 100

gts adaptation-profile

Function

The gts adaptation-profile command binds an adaptive traffic profile to a traffic behavior.

The undo gts command unbinds an adaptive traffic profile from a traffic behavior.

By default, no adaptive traffic profile is bound to a traffic behavior.

Format

gts adaptation-profile adaptation-profile-name

undo gts

Parameters

Parameter

Description

Value

adaptation-profile-name

Specifies the name of an adaptive traffic profile.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Traffic shaping solves the packet loss problem on the inbound interface of the downstream device when the rate of the inbound interface on the downstream device is smaller than the rate of the outbound interface on the upstream device. In some scenarios, the interface rate of the downstream device is variable, so the upstream device cannot determine the traffic shaping parameters.

Adaptive traffic shaping associates an NQA test instance with an adaptive traffic profile so that the upstream device can dynamically adjust traffic shaping parameters based on the packet loss ratio of the downstream device detected by the NQA test instance. The gts adaptation-profile command binds an adaptive traffic profile to a traffic behavior.

Follow-up Procedure

Create a traffic classifier and a traffic policy, bind the traffic classifier to the traffic behavior in the traffic policy, and apply the traffic policy.

Precautions

You cannot configure gts (traffic behavior view) and gts adaptation-profile in the same traffic behavior.

An adaptive traffic profile can only be bound to a traffic behavior in a traffic policy on the outbound WAN interface of the device.

If an adaptive traffic profile is used in the traffic behavior bound to a traffic policy, the traffic shaping rate in the adaptive traffic profile must be higher than the bandwidth defined in the sub traffic policy.

Example

# Bind the adaptive traffic profile gts1 to the traffic behavior tb1.

<Huawei> system-view
[Huawei] traffic behavior tb1
[Huawei-behavior-tb1] gts adaptation-profile gts1

port-schedule high

Function

The port-schedule high command sets the high priority for an interface.

The undo port-schedule high command restores the default priority of an interface to Normal.

By default, the interface priority is Normal.

Format

port-schedule high

undo port-schedule high

NOTE:

This command takes effect for only interfaces on the 4GEW-T and 4GEW-S cards.

Parameters

None

Views

GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If the total service traffic volume on four interfaces of the 4GEW-T or 4GEW-S card exceeds 1 Gbit/s, the device discards packets randomly. If important services are transmitted on an interface, the services cannot be preferentially forwarded. You can run this command to set a high priority for the interface so that packets on the interface can be preferentially forwarded.

For example, if the high priority is set for interface 1, traffic entering interface 1 is sent to the high-priority queue. Then the device preferentially forwards traffic on interface 1. Traffic entering interfaces 2, 3, and 4 preempts the remaining bandwidth. Here, the remaining bandwidth is calculated as follows:
  • Remaining bandwidth = 1 Gbit/s - Bandwidth used by interface 1
If the bandwidth is insufficient, the device randomly discards traffic on interfaces 2, 3, and 4. If the high priority is set for interfaces 1 and 2, the device preferentially forwards traffic on interfaces 1 and 2. If the sum of traffic on interfaces 1 and 2 exceeds 1 Gbit/s, the device randomly discards traffic on interfaces 1 and 2.

Precautions

If the high priority is set for the four interfaces and the sum of traffic on the four interfaces exceeds 1 Gbit/s, the device randomly discards traffic.

Example

# Set a high priority for GE1/0/1.

<Huawei> system-view
[Huawei] interface gigabitethernet 1/0/1
[Huawei-GigabitEthernet1/0/1] port-schedule high

qos adaptation-profile

Function

The qos adaptation-profile command creates an adaptive traffic profile and displays the adaptive traffic profile view.

The undo qos adaptation-profile command deletes an adaptive traffic profile.

By default, no adaptive traffic profile is created.

Format

qos adaptation-profile adaptation-profile-name

undo qos adaptation-profile adaptation-profile-name

Parameters

Parameter

Description

Value

adaptation-profile-name

Specifies the name of an adaptive traffic profile.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Traffic shaping solves the packet loss problem on the inbound interface of the downstream device when the rate of the inbound interface on the downstream device is smaller than the rate of the outbound interface on the upstream device. In some scenarios, the interface rate of the downstream device is variable, so the upstream device cannot determine the traffic shaping parameters.

Adaptive traffic shaping associates an NQA test instance with an adaptive traffic profile so that the upstream device can dynamically adjust traffic shaping parameters based on the packet loss ratio of the downstream device detected by the NQA test instance. The qos adaptation-profile command creates an adaptive traffic profile and displays the adaptive traffic profile view.

Follow-up Procedure

  1. Set parameters in the adaptive traffic profile.

    Run track nqa, rate-range, rate-adjust step, rate-adjust loss, or rate-adjust increase interval in the adaptive traffic profile view or manually set parameters.

  2. Apply the adaptive traffic profile.

    • Bind the adaptive traffic profile to an interface.

      Run the qos gts adaptation-profile command to bind the adaptive traffic profile to an interface.

    • Reference the adaptive traffic profile in a traffic policy.

      Run the gts adaptation-profile command to bind the adaptive traffic profile to a traffic behavior, bind the traffic behavior and traffic classifier to the traffic policy, and apply the traffic policy to an interface.

Precautions

A maximum of 8 adaptive traffic profiles can be configured on the device.

The traffic policy bound to an adaptive traffic profile can be configured only on WAN interfaces of the device.

Example

# Create an adaptive traffic profile named gts1.

<Huawei> system-view
[Huawei] qos adaptation-profile gts1
[Huawei-qos-adaptation-profile-gts1]

qos car

Function

The qos car command configures traffic policing.

The undo qos car command deletes traffic policing.

By default, traffic policing is not configured.

Format

On the WAN side:

qos car { inbound | outbound } [ acl acl-number | { destination-ip-address | source-ip-address } range start-ip-address to end-ip-address [ per-address ] [ time-range time-range-name ] ] cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value ] } ] [ yellow { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value ] } ] [ red { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value ] } ]

undo qos car { inbound | outbound } [ acl acl-number | { destination-ip-address | source-ip-address } range start-ip-address to end-ip-address ]

On the LAN side:
NOTE:
Traffic policing can be only configured on the LAN interface in the inbound direction.

qos car inbound cir cir-value

undo qos car inbound

NOTE:

LAN interfaces of the AR500 series do not support interface-based traffic policing.

qos car { inbound | outbound } { acl acl-number | { destination-ip-address | source-ip-address } range start-ip-address to end-ip-address [ per-address ] [ time-range time-range-name ] } cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value ] } ] [ yellow { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value ] } ] [ red { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value ] } ]

undo qos car { inbound | outbound } { acl acl-number | { destination-ip-address | source-ip-address } range start-ip-address to end-ip-address }

Parameters

Parameter

Description

Value

inbound

Performs traffic policing in the inbound direction on an interface.

-

outbound

Performs traffic policing in the outbound direction on an interface.

-

acl acl-number

Performs traffic policing for packets matching a specified ACL.

The value is an integer that ranges from 2000 to 3999.
  • The number of a basic ACL ranges from 2000 to 2999.
  • The number of an advanced ACL ranges from 3000 to 3999.

destination-ip-address

Performs traffic policing for packets whose destination IP addresses are in a specified range.

-

source-ip-address

Performs traffic policing for packets whose source IP addresses are in a specified range.

-

range start-ip-address to end-ip-address

Specifies an IP address range.

The value is in dotted decimal notation. A maximum 2048 IP addresses can be entered.

NOTE:

When the device applies QoS CAR to packets within the matched IP address range, one ACL resource is occupied for each IP address.

The preceding IP address range takes effective only when ACL resources are sufficient. You can run the display acl resource command to view information about ACL resources. The Remaining parameter indicates the number of remaining resources.

per-address

Performs traffic policing for packets from each IP address. If this parameter is not specified, the system aggregates all the flows and uses CAR to limit the flows.

-

time-range time-range-name

Specifies the time range during which CAR is performed for each IP address.

The time range must have been configured using the time-range command.

The value is a string of case-sensitive characters without spaces and must begin with a letter. The value ranges from 1 to 32.

cir cir-value

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

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

NOTE:

On LAN interfaces of the device, if the CIR is smaller than 64 kbit/s, the rate limit is 64 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 greater than or 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 1500 to 4294967295, in bytes.

The default setting is as follows:
  • If the PIR is not set or the PIR and CIR are the same, the CBS is 188 times the CIR.
  • If the PIR is set and the PIR and CIR are different, the 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 1500 to 4294967295, in bytes.

The default setting is as follows:
  • If the PIR is not set or the PIR and CIR are the same, the PBS is 313 times the CIR.
  • If the PIR is set and the PIR and CIR are different, the PBS is 125 times the PIR.

green

yellow

red

Specifies the packet color. By default, green packets and yellow packets are allowed to pass through, and red packets are discarded.

-

discard

Discards packets of a color.

-

pass

Permits packets of a color to pass through.

-

remark-dscp dscp-value

Re-marks the DSCP priority of packets when they are transmitted on a Layer 3 network.

The value can be the DiffServ code, an integer ranging from 0 to 63; the value can also be the name of the DSCP service type, such as af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1-cs7, default, and ef.

The values corresponding to names of DSCP service types are as follows:

  • af11: 10
  • af12: 12
  • af13: 14
  • af21: 18
  • af22: 20
  • af23: 22
  • af31: 26
  • af32: 28
  • af33: 30
  • af41: 34
  • af42: 36
  • af43: 38
  • cs1: 8
  • cs2: 16
  • cs3: 24
  • cs4: 32
  • cs5: 40
  • cs6: 48
  • cs7: 56
  • default: 0
  • ef: 46

remark-8021p 8021p-value

Re-marks the 802.1p priority of VLAN packets.

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

Views

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

Interface-based traffic policing provides the following functions:
  • Limits all the service traffic on an interface.
  • Limits the service traffic matching a specified ACL rule.
  • Limits the service traffic whose source and destination IP addresses are within a specified range.

Traffic policing actions include permit, deny, and forward after priority change. By default, green packets and yellow packets are allowed to pass through, and red packets are discarded.

Precautions

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.

On the Layer 2 FE interface or Layer 2 GE interface of the device, when the traffic policing rate is in the range of 64 kbit/s to 1000 kbit/s, the traffic policing rate is a multiple of 64 kbit/s. When the traffic policing rate is in the range of 1000 kbit/s to 100000 kbit/s, the traffic policing rate is a multiple of 1000 kbit/s.

The qos car command can be executed in the interface or sub-interface view. If the qos car command is used on the interface and its sub-interfaces simultaneously:
  • If a GE interface is used, data flows passing from its sub-interface are limited by the CAR on the sub-interface and the GE interface.

If the ACL number, destination IP address range, or source IP address range is configured in the qos car command on WAN interfaces, you can run the qos car command repeatedly on a WAN interface or sub-interface to configure at most 16 times.

Example

# Set the CIR for incoming traffic to 2000 kbit/s on Eth0/0/1.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] qos car inbound cir 2000

qos gts

Function

The qos gts command configures traffic shaping on an interface.

The undo qos gts command cancels traffic shaping on an interface.

By default, traffic shaping is not performed on an interface.

Format

qos gts cir cir-value [ cbs cbs-value ]

undo qos gts

NOTE:
  • Layer 2 FE interfaces and Layer 2 GE interfaces on the router do not support the qos gts command.

Parameters

Parameter

Description

Value

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.

NOTE:

On LAN interfaces of the device, if the CIR is smaller than 64 kbit/s, the rate limit is 64 kbit/s.

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 1500 to 4294967295, in bytes.

By default, the CBS is 25 times the CIR. If the value 25 times the CIR is smaller than 1500, the CBS is 1500.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If data traffic sent from the upstream device is heavy, the downstream network may be congested or a large number of packets are directly discarded. To prevent this problem, you can use the qos gts command to configure traffic shaping on the outbound interface of the upstream device to limit the traffic on a network connection so that packets can be transmitted at an even rate.

The differences between traffic policing and traffic shaping are as follows:
  • Traffic policing directly discards the packets whose rate exceeds the rate limit. 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 buffered packets are forwarded at an even rate.
  • Traffic shaping increases the delay, whereas traffic policing does not.

Precautions

If you run the qos gts command multiple times in the same interface view, only the latest configuration takes effect.

The qos gts and qos gts adaptation-profile commands cannot be configured on the same interface.

When the traffic shaping rate is larger than the maximum rate of an interface, traffic is not shaped on the interface. It is recommended that the CIR be smaller than the rate of an interface.

On LAN interfaces of devices:
  • On the Layer 2 FE interface or Layer 2 GE interface of the device, when the traffic policing rate is in the range of 64 kbit/s to 1000 kbit/s, the minimum granularity of traffic policing is a multiple of 64, in kbit/s. When the traffic policing rate is in the range of 1000 kbit/s to 100000 kbit/s, the minimum granularity of traffic policing is 1000 kbit/s.
  • On other LAN interfaces, the minimum granularity of traffic policing is a multiple of 64, in kbit/s. If the CIR is set to 64 x n kbit/s, the rate limit is 64 x n kbit/s. If the CIR is larger than 64 x n kbit/s and is smaller than 64 x (n + 1) kbit/s, the rate limit is 64 x n kbit/s.

The qos gts command shapes traffic of all queues on an interface, whereas the queue gts command shapes traffic of a specified queue on an interface. If both queue-based traffic shaping and interface-based traffic shaping are configured on an interface, the CIR of interface-based 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, packets in the queue with a higher priority may be not scheduled in a timely manner.

For logical interfaces (excluding Layer 2 Eth-Trunk interfaces), run the qos gts command on the interface to configure interface-based traffic shaping. It is recommended that the CIR be set to 90% of the logical interface bandwidth. The remaining 10% bandwidth is reserved for protocol packets. If the logical interface has sub-interfaces, run the qos gts command on the main interface.

Example

# Set the CIR of data packets to be sent from the Eth0/0/1 to 2000 kbit/s and CBS to 375000 byte.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] qos gts cir 2000 cbs 375000
Related Topics

qos gts adaptation-profile

Function

The qos gts adaptation-profile command binds an adaptive traffic profile to an interface.

The undo qos gts command unbinds an adaptive traffic profile from an interface.

By default, no adaptive traffic profile is bound to an interface.

Format

qos gts adaptation-profile adaptation-profile-name

undo qos gts

Parameters

Parameter

Description

Value

adaptation-profile-name

Specifies the name of an adaptive traffic profile.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Traffic shaping solves the packet loss problem on the inbound interface of the downstream device when the rate of the inbound interface on the downstream device is smaller than the rate of the outbound interface on the upstream device. In some scenarios, the interface rate of the downstream device is variable, so the upstream device cannot determine the traffic shaping parameters.

Adaptive traffic shaping associates an NQA test instance with an adaptive traffic profile so that the upstream device can dynamically adjust traffic shaping parameters based on the NQA result. The qos gts adaptation-profile command binds an adaptive traffic profile to an interface.

Precautions

The qos gts and qos gts adaptation-profile commands cannot be configured on the same interface.

An adaptive traffic profile can be bound to only a WAN interface on the device.

The traffic shaping rate configured using the qos gts adaptation-profile command applies to all queues on an interface, and the traffic shaping rate configured using the queue gts command applies to a specified queue on an interface. If both qos gts adaptation-profile and queue gts are used on an interface, the lower threshold for the traffic shaping rate in the adaptive traffic profile must be larger than or equal to the sum of traffic shaping rates of all the queues on the interface; otherwise, the traffic shaping result may be incorrect. For example, packets in queues with higher priorities are not scheduled in a timely manner.

If you run the qos gts adaptation-profile command multiple times in the same interface view, only the latest configuration takes effect.

Example

# Bind the adaptive traffic profile gts1 to GE0/0/1.

<Huawei> system-view
[Huawei] interface gigabitethernet0/0/1
[Huawei-GigabitEthernet0/0/1] qos gts adaptation-profile gts1

qos lr (interface view)

Function

The qos lr command sets the percentage of the rate for sending packets to the interface bandwidth.

The undo qos lr command restores the default percentage of the rate for sending packets to the interface bandwidth.

By default, the percentage of the rate for sending packets to the interface bandwidth is 100.

Format

qos lr pct pct-value [ cbs cbs-value ]

undo qos lr

Parameters

Parameter

Description

Value

pct pct-value

Specifies the percentage of the rate for sending packets to the interface bandwidth.

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

cbs cbs-value

Specifies the committed burst size (CBS).

The value is an integer that ranges from 1500 to 4294967295, in bytes. The default value is three times the interface bandwidth.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To limit the rate of sending packets on an interface, run the qos lr command to set the percentage of the rate for sending packets to the interface bandwidth.

Precautions

Only WAN-side physical interfaces support the qos lr command.

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

Rate limiting will not take effect until queue scheduling is configured.

Example

# On the GE0/0/1, set the percentage of the rate for sending packets to the interface bandwidth to 50% and CBS to 375000 bytes.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] qos lr pct 50 cbs 375000
[Huawei-GigabitEthernet0/0/1] quit
Related Topics

qos overhead

Function

The qos overhead command configures the mode for calculating the packet length during traffic policing or traffic shaping.

By default, physical-layer and link-layer compensation information is included in packet length calculation during traffic policing or traffic shaping.

Format

qos overhead layer { link | physics }

Parameters

Parameter

Description

Value

layer

Indicates whether physical-layer or link-layer compensation information is included in packet length calculation during traffic policing or traffic shaping.

-

link

Indicates that link-layer compensation information is included in packet length calculation during traffic policing or traffic shaping.

-

physics

Indicates that physical-layer and link-layer compensation information is included in packet length calculation during traffic policing or traffic shaping.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

During traffic policing or traffic shaping, run the qos overhead command to configure the mode for calculating the packet length. When the same CIR is used, the number of forwarded packets when the qos overhead layer link command is used is larger than that when the qos overhead layer physics command is used. The qos overhead command takes effect only when it is used with one of the following commands:

Precautions

Only Ethernet, PPP links support the qos overhead command.

Example

# Configure the device to use only link-layer compensation information in packet length calculation during traffic policing or traffic shaping.

<Huawei> system-view
[Huawei] qos overhead layer link

queue gts

Function

The queue gts command configures traffic shaping for queues.

The undo queue gts command cancels traffic shaping for queues.

By default, traffic shaping is not performed for queues.

Format

queue { start-queue-index [ to end-queue-index ] } &<1–10> gts cir cir-value [ cbs cbs-value ]

undo queue { start-queue-index [ to end-queue-index ] } &<1–10> gts

Parameters

Parameter

Description

Values

start-queue-index [ to end-queue-index ]

Specifies the indexes of the queues for which traffic shaping is configured.
  • start-queue-index specifies the index of the first queue for which traffic shaping is configured.
  • end-queue-index specifies the index of the last queue for which traffic shaping is configured.
If to end-queue-index is not specified, traffic shaping is configured for only the queue specified by start-queue-index.

The value of start-queue-index is an integer that ranges from 0 to 7.

The value of end-queue-index is an integer that ranges from 0 to 7.

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.

NOTE:

When you bind a queue profile to a LAN interface on the device and the CIR is smaller than 64 kbit/s, the rate limit is 64 kbit/s.

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 1500 to 4294967295, in bytes.

By default, the CBS is 25 times the CIR. If the value 25 times the CIR is smaller than 1500, the CBS is 1500.

Views

Queue profile view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If the rate of the downstream device interface is smaller than the rate of the upstream device interface, congestion may occur on the downstream device interface. To prevent packet loss and congestion, configure traffic shaping for queues on the upstream device interface to control the rate of outgoing packets so that packets can be sent at an even rate.

Service packets enter queues on an interface based on priorities. Different from interface-based traffic shaping, queue-based traffic shaping applies different rates to packets in queues with different priorities to implement differentiated services for queues.

Follow-up Procedure

Run the qos queue-profile (interface view) command to bind the queue profile to an interface.

Precautions

NOTE:
Layer 2 FE interfaces and Layer 2 GE interface on the device do not support the queue gts command.

When the traffic shaping rate is larger than the maximum rate of an interface, traffic in queues is not shaped. It is recommended that the CIR be lower than the rate of an interface.

On the device's LAN interface, the traffic shaping rate is a multiple of is 64 kbit/s. If the CIR is set to 64 x n kbit/s, the rate limit is 64 x n kbit/s. If the CIR is larger than 64 x n kbit/s and is smaller than 64 x (n + 1) kbit/s, the rate limit is 64 x n kbit/s.

If queue-based traffic shaping is configured on an interface, the traffic shaping rate on the interface must be larger than the bandwidth required by all queues on the interface; otherwise, the traffic shaping result may be incorrect. For example, packets in queues with higher priorities are not scheduled in a timely manner.

If you run the queue gts command multiple times in the same queue profile view, only the latest configuration takes effect.

When you change the queue shaping configuration in the view of the queue profile bound to an interface, the device synchronizes the change to the interface that supports queue gts. If the interface does not support queue gts, the system displays a configuration failure message.

Example

# Create a queue profile named hello-world and set the CIR and CBS of queue 0 to queue 3 to 2000 kbit/s and 375000 bytes respectively.

<Huawei> system-view
[Huawei] qos queue-profile hello-world
[Huawei-qos-queue-profile-hello-world] queue 0 to 3 gts cir 2000 cbs 375000

qos-profile

Function

The qos-profile command creates a QoS profile and displays its view, or directly displays the view of an existing QoS profile.

The undo qos-profile command deletes a QoS profile.

By default, no QoS profile is configured on the device.

Format

qos-profile profile-name

undo qos-profile profile-name

Parameters

Parameter

Description

Value

profile-name

Specifies the name of a QoS profile.

The value is a string of 1 to 31 case-sensitive characters without spaces.

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 and traffic statistics.

Follow-up Procedure

  • Define parameters in the QoS profile, including parameters of traffic policing and traffic statistics.
  • Apply the QoS profile in the specified view.

Example

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

<Huawei> system-view
[Huawei] qos-profile huawei
[Huawei-qos-profile-huawei]

rate-adjust increase interval

Function

The rate-adjust increase interval command sets the interval at which the traffic shaping rate increases.

The undo rate-adjust increase interval command restores the default interval at which the traffic shaping rate increases.

By default, the traffic shaping rate increases at intervals of 30s.

Format

rate-adjust increase interval interval-value

undo rate-adjust increase interval

Parameters

Parameter

Description

Value

interval-value

Specifies the interval at which the traffic shaping rate increases.

The value is an integer that ranges from 10 to 65535, in seconds.

Views

Adaptive traffic profile view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Adaptive traffic shaping associates an NQA test instance with an adaptive traffic profile so that the upstream device can dynamically adjust traffic shaping parameters based on the packet loss ratio of the downstream device detected by the NQA test instance. The upstream device increases the traffic shaping rate when the NQA test instance detects that the packet loss ratio is smaller than the lower threshold for the packet loss ratio in the adaptive traffic profile for three consecutive times and congestion occurs on the outbound interface of the upstream device. You can run this command to set the interval to prevent frequent traffic shaping rate change.

Precautions

If you run the rate-adjust increase interval command multiple times in the same adaptive traffic profile view, only the latest configuration takes effect.

Example

# Set the interval at which the traffic shaping rate increases in the adaptive traffic profile gts1 to 50s.

<Huawei> system-view
[Huawei] qos adaptation-profile gts1
[Huawei-qos-adaptation-profile-gts1] rate-adjust increase interval 50

rate-adjust loss

Function

The rate-adjust loss command sets the packet loss ratio range in an adaptive traffic profile.

The undo rate-adjust loss command restores the default packet loss ratio range in an adaptive traffic profile.

By default, the packet loss ratio ranges from 10% to 20%.

Format

rate-adjust loss low-threshold low-threshold-percentage high-threshold high-threshold-percentage

undo rate-adjust loss

Parameters

Parameter

Description

Value

low-threshold low-threshold-percentage

Specifies the lower threshold for the packet loss ratio.

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

high-threshold high-threshold-percentage

Specifies the upper threshold for the packet loss ratio.

The value is an integer that ranges from 0 to 100. The value of high-threshold-percentage cannot be smaller than the value of low-threshold-percentage.

Views

Adaptive traffic profile view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Adaptive traffic shaping associates an NQA test instance with an adaptive traffic profile so that the upstream device can dynamically adjust traffic shaping parameters based on the packet loss ratio of the downstream device detected by the NQA test instance. The rate-adjust loss command sets the packet loss ratio range in an adaptive traffic profile:
  • The upstream device reduces the traffic shaping rate when the NQA test instance detects that the packet loss ratio is larger than the upper threshold in the adaptive traffic profile.
  • The upstream device increases the traffic shaping rate when all the following conditions are met:
    • The NQA test instance detects that the packet loss ratio is lower than the lower threshold in the adaptive traffic profile.
    • Congestion occurs on the outbound interface of the upstream device.
    • The interval at which the traffic shaping rate increases is reached.
  • The upstream device retains the traffic shaping rate in one of the following scenarios:
    • The NQA test instance detects that the packet loss ratio is smaller than the lower threshold in the adaptive traffic profile and no congestion occurs on the outbound interface of the upstream device.
    • The detected packet loss ratio is within the packet loss ratio range in the adaptive traffic profile.
  • The upstream device uses the upper threshold for the traffic shaping rate in the adaptive traffic profile when the NQA test fails.
  • The upstream device uses the upper threshold for the traffic shaping rate in the adaptive traffic profile when the adaptive traffic profile is not bound to the NQA test instance.

Precautions

If you run the rate-adjust loss command multiple times in the same adaptive traffic profile view, only the latest configuration takes effect.

Example

# Set the packet loss ratio range in the adaptive traffic profile gts1 to 20% to 30%.

<Huawei> system-view
[Huawei] qos adaptation-profile gts1
[Huawei-qos-adaptation-profile-gts1] rate-adjust loss low-threshold 20 high-threshold 30

rate-adjust step

Function

The rate-adjust step command sets the traffic shaping rate adaptation step in an adaptive traffic profile.

The undo rate-adjust step command restores the default traffic shaping rate adaptation step in an adaptive traffic profile.

By default, the traffic shaping rate adaptation step is 64 kbit/s.

Format

rate-adjust step step

undo rate-adjust step

Parameters

Parameter

Description

Value

step

Specifies the traffic shaping rate adaptation step.

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

Views

Adaptive traffic profile view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Adaptive traffic shaping associates an NQA test instance with an adaptive traffic profile so that the upstream device can dynamically adjust traffic shaping parameters based on the packet loss ratio of the downstream device detected by the NQA test instance. The rate-adjust step command sets the traffic shaping rate adaptation step in an adaptive traffic profile.

Precautions

If you run the rate-adjust step command multiple times in the same adaptive traffic profile view, only the latest configuration takes effect.

Example

# Set the traffic shaping rate adaptation step in an adaptive traffic profile gts1 to 32 kbit/s.

<Huawei> system-view
[Huawei] qos adaptation-profile gts1
[Huawei-qos-adaptation-profile-gts1] rate-adjust step 32

rate-range

Function

The rate-range command sets the traffic shaping rate range in an adaptive traffic profile.

Format

rate-range low-threshold low-threshold-value high-threshold high-threshold-value

Parameters

Parameter

Description

Value

low-threshold low-threshold-value

Specifies the lower threshold for the traffic shaping rate.

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

high-threshold high-threshold-value

Specifies the upper threshold for the traffic shaping rate.

The value is an integer that ranges from 8 to 4294967295, in kbit/s. The value of high-threshold-value cannot be smaller than the value of low-threshold-value.

Views

Adaptive traffic profile view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Adaptive traffic shaping adjusts the traffic shaping rate based on the packet loss ratio of the downstream device detected by the NQA test instance. The rate-range command sets the traffic shaping rate range in an adaptive traffic profile.

Precautions

If an adaptive traffic profile is used in the traffic behavior bound to a traffic policy, the traffic shaping rate in the adaptive traffic profile must be larger than the bandwidth defined in the sub traffic policy.

If both an adaptive traffic profile and queue-based traffic shaping are configured on the same interface, the traffic shaping rate in the adaptive traffic profile must be larger than the bandwidth required by queues on the interface.

If you run the rate-range command multiple times in the same adaptive traffic profile view, only the latest configuration takes effect.

Example

# Set the traffic shaping rate range in the adaptive traffic profile gts1 to 500 kbit/s to 800 kbit/s.

<Huawei> system-view
[Huawei] qos adaptation-profile gts1
[Huawei-qos-adaptation-profile-gts1] rate-range low-threshold 500 high-threshold 800

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 | outbound }

reset qos car statistics interface virtual-template vt-number virtual-access va-number { inbound | outbound }

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.

-

outbound

Clears statistics in the outbound direction on an interface.

-

virtual-template vt-number

Displays queue-based traffic statistics on a specified virtual template interface. vt-number specifies the number of the virtual template interface.

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

virtual-access va-number

Displays queue-based traffic statistics on a specified virtual access interface. va-number specifies the number of the virtual access interface. You can run the display virtual-access command to display the state of the virtual access interface status.

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

Views

User view

Default Level

2: Configuration 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 Eth0/0/1.

<Huawei> reset qos car statistics interface ethernet 0/0/1 inbound

track nqa

Function

The track nqa command binds an NQA test instance to an adaptive traffic profile.

The undo track nqa command unbinds an NQA test instance from an adaptive traffic profile.

By default, no NQA test instance is bound an adaptive traffic profile.

Format

track nqa admin-name test-name

undo track nqa

Parameters

Parameter

Description

Value

admin-name

Specifies the administrator name for an NQA test instance.

The value is a string of 1 to 32 case-sensitive characters without spaces.

test-name

Specifies the name of an NQA test instance.

The value is a string of 1 to 32 case-sensitive characters without spaces.

Views

Adaptive traffic profile view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Adaptive traffic shaping associates an NQA test instance with an adaptive traffic profile so that the upstream device can dynamically adjust traffic shaping parameters based on the packet loss ratio of the downstream device detected by the NQA test instance. The track nqa command binds an NQA test instance to an adaptive traffic profile.
  • The upstream device reduces the traffic shaping rate when the NQA test instance detects that the packet loss ratio is larger than the upper threshold in the adaptive traffic profile.
  • The upstream device increases the traffic shaping rate when all the following conditions are met:
    • The NQA test instance detects that the packet loss ratio is lower than the lower threshold in the adaptive traffic profile.
    • Congestion occurs on the outbound interface of the upstream device.
    • The interval at which the traffic shaping rate increases is reached.
  • The upstream device retains the traffic shaping rate in one of the following scenarios:
    • The NQA test instance detects that the packet loss ratio is smaller than the lower threshold in the adaptive traffic profile and no congestion occurs on the outbound interface of the upstream device.
    • The detected packet loss ratio is within the packet loss ratio range in the adaptive traffic profile.
  • The upstream device uses the upper threshold for the traffic shaping rate in the adaptive traffic profile when the NQA test fails.
  • The upstream device uses the upper threshold for the traffic shaping rate in the adaptive traffic profile when the adaptive traffic profile is not bound to the NQA test instance.

Precautions

If you run the track nqa command multiple times in the same adaptive traffic profile view, only the latest configuration takes effect.

After the undo track nqa command is used, the traffic shaping rate is restored to the upper threshold for the traffic shaping rate in the adaptive traffic profile by the rate range command.

Example

# Bind the NQA test instance jitter1 with the administration name admin to the adaptive traffic profile gts1.

<Huawei> system-view
[Huawei] qos adaptation-profile gts1
[Huawei-qos-adaptation-profile-gts1] track nqa admin jitter1
Translation
Download
Updated: 2019-05-29

Document ID: EDOC1000097293

Views: 90162

Downloads: 124

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