12-ACL and QoS Command Reference

HomeSupportReference GuidesCommand ReferencesH3C S9825 & S9855 Switch Series Command References-R932x-6W10012-ACL and QoS Command Reference
02-QoS commands
Title Size Download
02-QoS commands 663.59 KB

Contents

QoS policy commands· 1

Traffic class commands· 1

description· 1

display traffic classifier 1

if-match· 2

traffic classifier 8

Traffic behavior commands· 9

accounting· 9

car 10

display traffic behavior 11

filter 12

redirect 13

remark dot1p· 14

remark dscp· 14

remark ip-precedence· 15

remark local-precedence· 16

remark qos-local-id· 17

remark tunnel-dscp· 17

traffic behavior 18

QoS policy commands· 19

classifier behavior 19

control-plane· 20

display qos policy· 21

display qos policy control-plane· 23

display qos policy control-plane pre-defined· 24

display qos policy global 25

display qos policy interface· 28

display qos policy l2vpn-ac· 32

display qos vlan-policy· 33

qos apply policy (Ethernet service instance view, interface view, control plane view) 35

qos apply policy global 36

qos policy· 37

qos vlan-policy· 39

reset qos policy control-plane· 39

reset qos policy global 40

reset qos vlan-policy· 40

QoS and ACL resource usage displaying commands· 41

display qos-acl resource· 41

Priority mapping commands· 45

Priority map commands· 45

display qos map-table· 45

import (priority map view) 46

qos map-table· 46

Priority trust mode commands· 47

display qos trust interface· 47

qos trust 48

qos trust (system view) 49

Port priority commands· 49

qos priority· 49

Global priority commands· 50

qos mirroring local-precedence· 50

Traffic policing, GTS, and rate limit commands· 52

Traffic policing commands· 52

display qos overhead compensation-length· 52

qos overhead compensation-length· 52

GTS commands· 54

display qos gts interface· 54

qos gts· 54

Rate limit commands· 55

display qos lr interface· 55

qos lr 56

Congestion management commands· 58

SP commands· 58

display qos queue sp interface· 58

qos sp· 58

WRR commands· 59

display qos queue wrr interface· 59

qos wrr 60

qos wrr  { byte-count | weight } 61

qos wrr group sp· 62

WFQ commands· 63

display qos queue wfq interface· 63

qos bandwidth queue· 64

qos wfq· 64

qos wfq { byte-count | weight } 65

qos wfq group sp· 66

Queue scheduling profile commands· 67

bandwidth queue· 67

display qos qmprofile configuration· 68

display qos qmprofile interface· 69

qos apply qmprofile· 69

qos qmprofile· 70

queue· 71

Congestion avoidance commands· 73

WRED commands· 73

ai-ecn· 73

ai ai-ecn enable· 73

ai-service· 74

display qos wred ecn interface· 74

display qos wred interface· 76

display qos wred table· 77

qos wred apply· 78

qos wred queue· 79

qos wred queue ecn· 80

qos wred queue table· 81

qos wred queue weighting-constant 82

queue (AI ECN view) 82

queue (WRED table view) 83

queue ecn· 84

queue weighting-constant 85

Traffic Matrix commands· 87

display traffic-matrix· 87

ip source destination· 89

ipv6 source destination· 90

traffic-matrix· 91

Elephant and mice flows distinguishing commands· 93

elephant-flow action· 93

elephant-flow rate· 93

agile-buffer enable· 94

qos mice-elephant-flow· 96

Queue-based accounting commands· 97

display qos queue-statistics interface outbound· 97

reset qos queue-statistics interface outbound· 98


QoS policy commands

Traffic class commands

description

Use description to configure a description for a traffic class.

Use undo description to delete the description of a traffic class.

Syntax

description text

undo description

Default

No description is configured for a traffic class.

Views

Traffic class view

Predefined user roles

network-admin

Parameters

text: Specifies a description, a case-sensitive string of 1 to 127 characters.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure the description as classifier for traffic class class1.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] description classifier

display traffic classifier

Use display traffic classifier to display traffic classes.

Syntax

display traffic classifier user-defined [ classifier-name ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

user-defined: Specifies user-defined traffic classes.

classifier-name: Specifies a traffic class by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a traffic class, this command displays all traffic classes.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Display all user-defined traffic classes.

<Sysname> display traffic classifier user-defined

 

  User-defined classifier information:

 

   Classifier: 1 (ID 100)

     Operator: AND

     Rule(s) :

      If-match acl 2000

 

   Classifier: 2 (ID 101)

     Operator: AND

     Rule(s) :

      If-match protocol ipv6

 

   Classifier: 3 (ID 102)

     Operator: AND

     Rule(s) :

      -none-

Table 1 Command output

Field

Description

Classifier

Traffic class name and its match criteria.

Operator

Match operator you set for the traffic class. If the operator is AND, the traffic class matches the packets that match all its match criteria. If the operator is OR, the traffic class matches the packets that match any of its match criteria.

Rule(s)

Match criteria.

if-match

Use if-match to define a match criterion.

Use undo if-match to delete a match criterion.

Syntax

if-match match-criteria

undo if-match match-criteria

Default

No match criterion is configured.

Views

Traffic class view

Predefined user roles

network-admin

Parameters

match-criteria: Specifies a match criterion. Table 2 shows the available match criteria.

Table 2 Available match criteria

Option

Description

acl [ ipv6 | mac | user-defined ] { acl-number | name acl-name } [ inner ]

Matches an ACL.

The value range for the acl-number argument is as follows:

·     2000 to 3999 for IPv4 ACLs.

·     2000 to 3999 for IPv6 ACLs.

·     4000 to 4999 for Layer 2 MAC ACLs.

·     5000 to 5999 for user-defined ACLs.

The acl-name argument is a case-insensitive string of 1 to 63 characters, which must start with an English letter. To avoid confusion, make sure the argument is not all.

If you use the rule [ rule-id ] { deny | permit } command to match packets, the inner keyword matches the inner header information of VXLAN packets. If you do not specify this keyword, the ACL matches the header information of non-encapsulated packets or the outer header information of VXLAN packets.

If you use the rule [ rule-id ] { deny | permit } vxlan command to match inner header information of VXLAN packets, you cannot specify the inner keyword in the if-match acl command.

On the S9855 switch series, to successfully match VXLAN packets by inner IPv6 address, make sure the prefix length is not greater than 120.

If you do not specify a VPN instance, whether the rule applies to VPN packets varies by feature. See the description for the feature that uses ACLs.

any

Matches all packets.

control-plane protocol protocol-name&<1-8>

Matches control plane protocols.

The protocol-name&<1-8> argument specifies a space-separated list of up to eight system-defined control plane protocols. For available system-defined control plane protocols, see Table 3.

control-plane protocol-group protocol-group-name

Matches a control plane protocol group.

The protocol-group-name argument can be critical, exception, important, management, monitor, normal, or redirect.

customer-dot1p dot1p-value

Matches 802.1p priority values in inner VLAN tags of double-tagged packets.

The value range for the dot1p-value argument is 0 to 7.

customer-vlan-id vlan-id-list

Matches VLAN IDs in inner VLAN tags of double-tagged packets.

The vlan-id-list argument specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN or a range of VLANs in the form of vlan-id1 to vlan-id2. The value for vlan-id2 must be greater than or equal to the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094.

Only the S9855 switch series supports this option in the inbound direction.

destination-mac mac-address

Matches a destination MAC address.

This option takes effect only on Ethernet interfaces.

dscp dscp-value

Matches DSCP values.

The value range for the dscp-value argument is 0 to 63 or keywords shown in Table 5.

forwarding-layer route

Matches Layer 3 forwarded packets.

inbound-interface interface-type interface-number

Matches an input interface specified by its type and number.

This option is supported only when a QoS policy is applied to the control plane.

The following interface types are supported:

·     Physical interfaces.

·     Layer 3 Ethernet interfaces and subinterfaces.

·     Layer 2 aggregate interfaces.

·     Layer 3 aggregate interfaces and subinterfaces.

ip-precedence ip-precedence-value

Matches IP precedence values.

The value range for the ip-precedence-value argument is 0 to 7.

protocol protocol-name

Matches a protocol.

The protocol-name argument can be ip or ipv6.

qos-local-id local-id-value

Matches a local QoS ID in the range of 1 to 1000.

rocev2 { opcode opcode-value | dst-qpair dst-qpair-value | src-qpair src-qpair-value | nack nack-value } *

Matches an RoCEv2 protocol:

·     opcode opcode-value: Matches the OpCode field in the BTH header. The opcode-value argument specifies an OpCode value in the range of 0 to 255.

·     dst-qpair dst-qpair-value: Matches the Destination QP field in the BTH header. The dst-qpair-value argument specifies a destination QP value in the range of 0 to 16777215.

·     src-qpair src-qpair-value: Matches the Source QP field in the DETH header. The src-qpair-value argument specifies a source QP value in the range of 0 to 16777215.

·     nack nack-value: Matches the lowest five bits in the Syndrome field in the NACK packets. The nack-value argument specifies a value for the lowest five bits in the Syndrome field, in the range of 0 to 31.

service-dot1p dot1p-value

Matches 802.1p priority values in outer VLAN tags.

The value range for the dot1p-value argument is 0 to 7.

service-vlan-id vlan-id-list

Matches VLAN IDs in outer VLAN tags.

The vlan-id-list argument specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN or a range of VLANs in the form of vlan-id1 to vlan-id2. The value for vlan-id2 must be greater than or equal to the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094.

You can use this option to match single-tagged packets.

source-mac mac-address

Matches a source MAC address.

This option takes effect only on Ethernet interfaces.

tunnel-id tunnel-id

Matches a VXLAN tunnel ID. For the traffic class to take effect, the tunnel must be a VXLAN tunnel.

vxlan { any | vxlan-id }

This option is supported only in the inbound direction.

Table 3 Available system-defined control plane protocols

Protocol

Description

arp

ARP packets

arp-snooping

ARP snooping packets

bfd

BFD packets

bgp

BGP packets

bgp4+

IPv6 BGP packets

bpdu-tunnel

BPDU tunnel packets

cdp

CDP packets

cfd

CFD packets

dhcp

DHCP packets

dhcp-snooping

DHCP snooping packets

dhcp6

IPv6 DHCP packets

dldp

DLDP packets

dot1x

802.1X packets

icmp

ICMP packets

icmp6

ICMPv6 packets

igmp

IGMP packets

ip-option

IPv4 packets with the Options field

ipv6-option

IPv6 packets with the Options field

isis

IS-IS packets

lacp

LACP packets

lldp

LLDP packets

mvrp

MVRP packets (including GVRP packets)

oam

OAM packets

ospf-multicast

OSPF multicast packets

ospf-unicast

OSPF unicast packets

ospf3-multicast

OSPFv3 multicast packets

ospf3-unicast

OSPFv3 unicast packets

pvst

PVST packets

snmp

SNMP packets

ssh

SSH packets

stp

STP packets

telnet

Telnet packets

vrrp

VRRP packets

vrrp6

IPv6 VRRP packets

Usage guidelines

In a traffic class with the logical OR operator, you can configure multiple if-match commands for any of the available match criteria.

When you configure a match criterion that can have multiple values in one if-match command, follow these restrictions and guidelines:

·     You can specify up to eight values for any of the following match criteria in one if-match command:

¡     802.1p priority.

¡     DSCP.

¡     IP precedence.

¡     VLAN ID.

·     If a packet matches one of the specified values, it matches the if-match command.

·     To delete a criterion that has multiple values, the specified values in the undo if-match command must be the same as those specified in the if-match command. The order of the values can be different.

To use an ACL match criterion, the ACL must already exist.

The ACL is used for classification only and the permit/deny actions in ACL rules are ignored. Actions taken on matching packets are defined in traffic behaviors.

To match outgoing IPv6 packets in a QoS policy on an S9825 series switch, you must additionally configure the traffic class to match the IPv6 protocol.

The S9825 switch series does not support match the information after the Layer 2 header of packets with double VLAN tags.

Examples

# Define a match criterion for traffic class class1 to match the packets with a destination MAC address of 0050-ba27-bed3.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match destination-mac 0050-ba27-bed3

# Define a match criterion for traffic class class2 to match the packets with a source MAC address of 0050-ba27-bed2.

<Sysname> system-view

[Sysname] traffic classifier class2

[Sysname-classifier-class2] if-match source-mac 0050-ba27-bed2

# Define a match criterion for traffic class class1 to match the double-tagged packets with 802.1p priority 3 in the inner VLAN tag.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match customer-dot1p 3

# Define a match criterion for traffic class class1 to match the packets with 802.1p priority 5 in the outer VLAN tag.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match service-dot1p 5

# Define a match criterion for traffic class class1 to match advanced ACL 3101.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match acl 3101

# Define a match criterion for traffic class class1 to match the ACL named flow.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match acl name flow

# Define a match criterion for traffic class class1 to match advanced IPv6 ACL 3101.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match acl ipv6 3101

# Define a match criterion for traffic class class1 to match the IPv6 ACL named flow.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match acl ipv6 name flow

# Define a match criterion for traffic class class1 to match all packets.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match any

# Define a match criterion for traffic class class1 to match the packets with a DSCP value of 6.

<Sysname> system-view

[Sysname] traffic classifier class1 operator or

[Sysname-classifier-class1] if-match dscp 6

# Define a match criterion for traffic class class1 to match the packets with an IP precedence value of 6.

<Sysname> system-view

[Sysname] traffic classifier class1 operator or

[Sysname-classifier-class1] if-match ip-precedence 6

# Define a match criterion for traffic class class1 to match IP packets.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match protocol ip

# Define a match criterion for traffic class class1 to match double-tagged packets with VLAN ID 6 in the inner VLAN tag.

<Sysname> system-view

[Sysname] traffic classifier class1 operator or

[Sysname-classifier-class1] if-match customer-vlan-id 6

# Define a match criterion for traffic class class1 to match the packets with VLAN ID 7 in the outer VLAN tag.

<Sysname> system-view

[Sysname] traffic classifier class1 operator or

[Sysname-classifier-class1] if-match service-vlan-id 7

# Define a match criterion for traffic class class1 to match the packets of the application 3link.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match application 3link

# Define a match criterion for traffic class class1 to match the VXLAN packets with tunnel ID 2.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match tunnel-id 2

# Define a match criterion for traffic class class1 to match the packets with VXLAN 10.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match vxlan 10

traffic classifier

Use traffic classifier to create a traffic class and enter its view, or enter the view of an existing traffic class.

Use undo traffic classifier to delete a traffic class.

Syntax

traffic classifier classifier-name [ operator { and | or } ]

undo traffic classifier classifier-name

Default

No traffic classes exist.

Views

System view

Predefined user roles

network-admin

Parameters

classifier-name: Specifies a name for the traffic class, a case-sensitive string of 1 to 31 characters.

operator: Sets the operator to logic AND (the default) or OR for the traffic class.

and: Specifies the logic AND operator. The traffic class matches the packets that match all its criteria.

or: Specifies the logic OR operator. The traffic class matches the packets that match any of its criteria.

Examples

# Create a traffic class named class1.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1]

Related commands

display traffic classifier

Traffic behavior commands

accounting

Use accounting to configure a traffic accounting action in a traffic behavior.

Use undo accounting to restore the default.

Syntax

accounting [ byte | packet ] *

undo accounting

Default

No traffic accounting action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

byte: Counts traffic in bytes.

packet: Counts traffic in packets.

Usage guidelines

If you do not specify the byte or packet keyword, traffic is counted in both packets and bytes.

The accounting action does not take effect if the QoS policy is applied globally.

In the outbound direction of an interface on an S9855 switch, if both Layer 3 packet statistics collection and class-based accounting are configured, only Layer 3 packets are counted. For more information about Layer 3 packet statistics collection, see IP performance optimization in Layer 3—IP Services Configuration Guide.

Examples

# Configure a traffic accounting action in traffic behavior database to count traffic in bytes.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] accounting byte

car

Use car to configure a CAR action in absolute value in a traffic behavior.

Use undo car to restore the default.

Syntax

car cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ green action | red action | yellow action ] *

car cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ green action | red action | yellow action ] *

undo car

Default

No CAR action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

cir committed-information-rate: Specifies the committed information rate (CIR) in the range of 8 to 4294967288 kbps, in increments of 8.

cbs committed-burst-size: Specifies the committed burst size (CBS) in bytes. The value range for committed-burst-size is 512 to 256000000, in increments of 512. The default value for this argument is the product of 62.5 and the CIR and must be an integral multiple of 512. When the product is not an integral multiple of 512, it is rounded up to the nearest integral multiple of 512 that is greater than the product. A default value greater than 256000000 is converted to 256000000.

ebs excess-burst-size: Specifies the excess burst size (EBS) in bytes. The value range for excess-burst-size is 0 to 256000000, in increments of 512. If the PIR is configured, the default EBS is the product of 62.5 and the PIR and must be an integral multiple of 512. When the product is not an integral multiple of 512, it is rounded up to the nearest integral multiple of 512. A default value greater than 256000000 is converted to 256000000.

pir peak-information-rate: Specifies the peak information rate (PIR) in the range of 8 to 4294967288 kbps, in increments of 8.

green action: Specifies the action to take on packets that conform to the CIR. The default setting is pass.

red action: Specifies the action to take on packets that conform to neither CIR nor PIR. The default setting is discard.

yellow action: Specifies the action to take on packets that conform to the PIR but not to the CIR. The default setting is pass.

action: Specifies the action to take on the packet:

·     discard: Drops the packet.

·     pass: Permits the packet to pass through.

Usage guidelines

To use two rates for traffic policing, configure the car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the car command without the pir peak-information-rate option.

If you execute the car command multiple times in the same traffic behavior, the most recent configuration takes effect.

Examples

# Configure a CAR action in traffic behavior database: Set the CIR to 200 kbps and CBS to 51200 bytes.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] car cir 200 cbs 51200

display traffic behavior

Use display traffic behavior to display traffic behaviors.

Syntax

display traffic behavior user-defined [ behavior-name ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

user-defined: Specifies user-defined traffic behaviors.

behavior-name: Specifies a behavior by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a traffic behavior, this command displays all traffic behaviors.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Display all user-defined traffic behaviors.

<Sysname> display traffic behavior user-defined

 

  User-defined behavior information:

 

    Behavior: 1 (ID 100)

      Marking:

        Remark dscp 3

      Committed Access Rate:

        CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

 

    Behavior: 2 (ID 101)

      Accounting enable: Packet

      Filter enable: Permit

      Redirecting:

        Redirect to the CPU

 

    Behavior: 3 (ID 102)

      -none-

Table 4 Command output

Field

Description

Behavior

Name and contents of a traffic behavior.

Marking

Information about priority marking.

Remark dscp

Action of setting the DSCP value for packets.

Committed Access Rate

Information about the CAR action.

Green action

Action to take on green packets.

Yellow action

Action to take on yellow packets.

Red action

Action to take on red packets.

Accounting enable

Class-based accounting action.

Filter enable

Traffic filtering action.

Redirecting

Information about traffic redirecting.

Mirroring

Information about traffic mirroring.

none

No other traffic behavior is configured.

filter

Use filter to configure a traffic filtering action in a traffic behavior.

Use undo filter to restore the default.

Syntax

filter { deny  | permit }

undo filter

Default

No traffic filtering action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

deny: Drops packets.

permit: Transmits packets.

Usage guidelines

The keywords in the command have different meanings:

·     deny—If a packet matches a traffic class, it is directly dropped and will no longer be affected by actions from lower-priority features.

·     permit—If a packet matches a traffic class, the QoS policy does not affect the packet. If the packet is processed by other lower-priority features, whether it is dropped will depend on the actions of those lower-priority features.

Examples

# Configure a traffic filtering action as deny in traffic behavior database.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] filter deny

redirect

Use redirect to configure a traffic redirecting action in a traffic behavior.

Use undo redirect to restore the default.

Syntax

redirect { cpu | interface interface-type interface-number }

undo redirect { cpu | interface interface-type interface-number }

Default

No traffic redirecting action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

cpu: Redirects traffic to the CPU.

interface interface-type interface-number: Redirects traffic to an interface specified by its type and number.

sr-policy endpoint color: Redirects traffic to an SR-MPLS TE policy. The endpoint argument represents the endpoint IPv4 or IPv6 address of the SR-MPLS TE policy. The color argument represents the color attribute value of the SR-MPLS TE policy, in the range of 0 to 4294967295.

Usage guidelines

If you execute the redirect command multiple times in the same traffic behavior, the most recent configuration takes effect.

The S9855 switch series does not support redirecting traffic to an aggregate interface.

Examples

# Configure redirecting traffic to HundredGigE 1/0/1 in traffic behavior database.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] redirect interface hundredgige 1/0/1

Related commands

classifier behavior

qos policy

traffic behavior

remark dot1p

Use remark dot1p to configure an 802.1p priority marking action in a traffic behavior.

Use undo remark dot1p to restore the default.

Syntax

remark dot1p dot1p-value

undo remark dot1p

Default

No 802.1p priority marking action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

dot1p-value: Specifies the 802.1p priority to be marked for packets, in the range of 0 to 7.

Usage guidelines

The S9855 switch series does not support marking the 802.1p priority in the outbound direction.

If you do not specify a color, packets of all colors are marked.

Examples

# Configure traffic behavior database to mark matching traffic with 802.1p 2.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark dot1p 2

remark dscp

Use remark dscp to configure a DSCP marking action in a traffic behavior.

Use undo remark dscp to delete the action.

Syntax

remark dscp dscp-value

undo remark dscp

Default

No DSCP marking action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

dscp-value: Specifies a DSCP value, which can be a number from 0 to 63 or a keyword in Table 5.

Table 5 DSCP keywords and values

Keyword

DSCP value (binary)

DSCP value (decimal)

af11

001010

10

af12

001100

12

af13

001110

14

af21

010010

18

af22

010100

20

af23

010110

22

af31

011010

26

af32

011100

28

af33

011110

30

af41

100010

34

af42

100100

36

af43

100110

38

cs1

001000

8

cs2

010000

16

cs3

011000

24

cs4

100000

32

cs5

101000

40

cs6

110000

48

cs7

111000

56

default

000000

0

ef

101110

46

Examples

# Configure traffic behavior database to mark matching traffic with DSCP 6.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark dscp 6

remark ip-precedence

Use remark ip-precedence to configure an IP precedence marking action in a traffic behavior.

Use undo remark ip-precedence to delete the action.

Syntax

remark ip-precedence ip-precedence-value

undo remark ip-precedence

Default

No IP precedence marking action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

ip-precedence-value: Specifies the IP precedence value to be marked for packets, in the range of 0 to 7.

Usage guidelines

When the device marks the IP precedence of packets, it also sets the last three bits of the DSCP field as 000.

Examples

# Set the IP precedence to 6 for packets.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark ip-precedence 6

remark local-precedence

Use remark local-precedence to configure a local precedence marking action in a traffic behavior.

Use undo remark local-precedence to delete the action.

Syntax

remark local-precedence local-precedence-value

undo remark local-precedence

Default

No local precedence marking action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

local-precedence-value: Specifies the local precedence to be marked for packets, in the range of 0 to 7.

Examples

# Configure traffic behavior database to mark matching traffic with local precedence 2.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark local-precedence 2

remark qos-local-id

Use remark qos-local-id to configure a local QoS ID marking action in a traffic behavior.

Use undo remark qos-local-id to restore the default.

Syntax

remark qos-local-id [ egress-active ] local-id-value

undo remark qos-local-id [ egress-active ]

Default

No local QoS ID marking action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

egress-active: Specifies that the local QoS ID marking action takes effect only in the outbound direction.

local-id-value: Specifies the local QoS ID to be marked for packets, in the range of 1 to 1000. If the egress-active keyword is specified, the value range is 1 to 128.

Usage guidelines

You can use one QoS policy to mark the local QoS ID for packets in the inbound direction. Then, you can use another QoS policy to apply other QoS features in the outbound direction based on the marked local QoS ID.

A local QoS ID marking action applied to the inbound direction takes effect only in the inbound direction. For such a local QoS ID marking action to also take effect only in the outbound direction, specify the egress-active keyword.

If you execute the remark qos-local-id command multiple times in the same traffic behavior, the most recent configuration takes effect.

To match the outer DSCP in the VXLAN decapsulation direction after the remark qos-local-id command is executed, you must also match the IPv4 or IPv6 protocol or use an ACL to match it.

Examples

# Configure the action of marking packets with local QoS ID 2.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark qos-local-id 2

remark tunnel-dscp

Use remark tunnel-dscp to configure an outer DSCP marking action in a traffic behavior.

Use undo remark tunnel-dscp to restore the default.

Syntax

remark tunnel-dscp dscp-value

undo remark tunnel-dscp

 

NOTE:

The S9825 switch series does not support this command.

Default

No outer DSCP marking action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

Parameters

dscp-value: Specifies the DSCP value to be set for the outer IP header of tunneled packets. The DSCP value can be a number from 0 to 63 or a keyword in Table 5.

Usage guidelines

This command takes effect on the following packets:

·     GRE packets.

·     VXLAN packets.

·     IPv4 over IPv4 tunneled packets.

·     IPv6 over IPv4 tunneled packets.

·     IPv6 tunneled packets.

·     MPLS TE tunneled packets.

The outer DSCP value marking action takes effect only when the QoS policy is applied to an interface.

The remark tunnel-dscp command is mutually exclusive with the remark dscp or remark ip-precedence command in one traffic behavior.

If you execute the remark tunnel-dscp command multiple times in the same traffic behavior, the most recent configuration takes effect.

Examples

# Configure traffic behavior data to mark matching packets with DSCP value 2 in the outer IP header of tunneled packets.

<Sysname> system-view

[Sysname] traffic behavior data

[Sysname-behavior-data] remark tunnel-dscp 2

traffic behavior

Use traffic behavior to create a traffic behavior and enter its view, or enter the view of an existing traffic behavior.

Use undo traffic behavior to delete a traffic behavior.

Syntax

traffic behavior behavior-name

undo traffic behavior behavior-name

Default

No traffic behaviors exist.

Views

System view

Predefined user roles

network-admin

Parameters

behavior-name: Specifies a name for the traffic behavior, a case-sensitive string of 1 to 31 characters.

Examples

# Create a traffic behavior named behavior1.

<Sysname> system-view

[Sysname] traffic behavior behavior1

[Sysname-behavior-behavior1]

Related commands

display traffic behavior

QoS policy commands

classifier behavior

Use classifier behavior to associate a traffic behavior with a traffic class in a QoS policy.

Use undo classifier to delete a class-behavior association from a QoS policy.

Syntax

classifier classifier-name behavior behavior-name [ mode { dcbx | loose } | insert-before before-classifier-name ] *

undo classifier classifier-name

Default

No traffic behavior is associated with a traffic class.

Views

QoS policy view

Predefined user roles

network-admin

Parameters

classifier-name: Specifies a traffic class by its name, a case-sensitive string of 1 to 31 characters.

behavior-name: Specifies a traffic behavior by its name, a case-sensitive string of 1 to 31 characters.

mode dcbx: Specifies that the class-behavior association applies only to the DCBX. For more information about DCBX, see Layer 2—LAN Switching Configuration Guide.

mode loose: Specifies that a class-behavior association applies only to a QoS policy applied to a control plane.

insert-before before-classifier-name: Inserts the new traffic class before an existing traffic class in the QoS policy. The before-classifier-name argument specifies an existing traffic class by its name, a case-sensitive string of 1 to 31 characters. If you do not specify the insert-before before-classifier-name option, the new traffic class is placed at the end of the QoS policy.

Usage guidelines

A traffic class can be associated only with one traffic behavior in a QoS policy.

A QoS policy can contain multiple class-behavior associations. The device matches a packet against the class-behavior associations in their configuration order. When a match is found, the device stops the match process and takes the actions in the matching class-behavior association.

If the specified traffic class or traffic behavior does not exist, the system defines a null traffic class or traffic behavior.

Use a class-behavior association in loose mode (with the mode loose keyword specified) to rate-limit packets of the specified protocol received on the specified interface and sent to a control plane as follows:

1.     Create an ACL, and configure an ACL rule to match packets of the specified protocol in the ACL.

2.     Create a traffic class with the operator AND, and configure the if-match acl and if-match inbound-interface match criteria in the traffic class.

3.     Create a traffic behavior, and configure actions in the traffic behavior.

4.     Create a QoS policy, and associate the traffic class with the traffic behavior with the mode loose keyword specified.

5.     Apply the QoS policy to a control plane.

When packets of the specified protocol are received on the other interface and sent to the control plane, the packets are rate-limited by the protocol packet rate limiting action applied to the control plane.

Examples

# Associate traffic class database with traffic behavior test in QoS policy user1.

<Sysname> system-view

[Sysname] qos policy user1

[Sysname-qospolicy-user1] classifier database behavior test

# Associate traffic class database with traffic behavior test in QoS policy user1, and insert traffic class database before an existing traffic class named class-a.

<Sysname> system-view

[Sysname] qos policy user1

[Sysname-qospolicy-user1] classifier database behavior test insert-before class-a

Related commands

qos policy

control-plane

Use control-plane to enter control plane view.

Syntax

control-plane slot slot-number

Views

System view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Enter the control plane view of slot 3.

<Sysname> system-view

[Sysname] control-plane slot 1

[Sysname-cp-slot1]

display qos policy

Use display qos policy to display QoS policies.

Syntax

display qos policy user-defined [ accounting | mirroring | remarking ] [ policy-name [ classifier classifier-name ] ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

user-defined: Specifies user-defined QoS policies.

accounting: Specifies accounting-type QoS policies.

mirroring: Specifies mirroring-type QoS policies.

remarking: Specifies marking-type QoS policies.

policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a QoS policy, this command displays all user-defined QoS policies.

classifier classifier-name: Specifies a traffic class by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a traffic class, this command displays all traffic classes.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Usage guidelines

If you do not specify the accounting, mirroring, or remarking keyword, this command displays generic QoS policies.

Examples

# Display all user-defined generic QoS policies.

<Sysname> display qos policy user-defined

 

  User-defined QoS policy information:

 

  Policy: 1 (ID 100)

   Classifier: 1 (ID 100)

     Behavior: 1

      Marking:

        Remark dscp 3

      Committed Access Rate:

        CIR 112 (kbps), CBS 51200 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

   Classifier: 2 (ID 101)

     Behavior: 2

      Accounting enable: Packet

      Filter enable: Permit

      Marking:

        Remark dot1p 4

   Classifier: 3 (ID 102)

     Behavior: 3

      -none-

# Display user-defined accounting-type QoS policies.

<Sysname> display qos policy user-defined accounting

 

  User-defined QoS policy information:

 

  Accounting policy: 1 (ID 100)

   Classifier: 1 (ID 100)

     Behavior: 1

      Accounting enable: Packet

# Display user-defined mirroring-type QoS policies.

<Sysname> display qos policy user-defined mirroring

 

  User-defined QoS policy information:

 

  Mirroring policy: 1 (ID 100)

   Classifier: 1 (ID 100)

     Behavior: 1

      Mirroring:

        Mirror to the CPU

# Display user-defined marking-type QoS policies.

<Sysname> display qos policy user-defined remarking

 

  User-defined QoS policy information:

 

  Marking policy: 1 (ID 100)

   Classifier: 1 (ID 100)

     Behavior: 1

      Marking:

        Remark dscp 3

Table 6 Command output

Field

Description

User-defined QoS policy information

Information about a user-defined QoS policy.

System-defined QoS policy information

Information about a system-defined QoS policy.

Policy

User-defined generic QoS policy name or system-defined QoS policy name.

Accounting policy

User-defined accounting-type QoS policy name.

Mirroring policy

User-defined mirroring-type QoS policy name.

Marking policy

User-defined marking-type QoS policy name.

For the output description, see Table 1 and Table 4.

display qos policy control-plane

Use display qos policy control-plane to display QoS policies applied to a control plane.

Syntax

display qos policy control-plane slot slot-number

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Display the QoS policy applied to the control plane of slot 1.

<Sysname> display qos policy control-plane slot 1

 

Control plane slot 1

 

  Direction: Inbound

 

  Policy: 1

   Classifier: 1

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Marking:

        Remark dscp 3

      Committed Access Rate:

        CIR 112 (kbps), CBS 51200 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

        Green packets : 0 (Packets) 0 (Bytes)

        Yellow packets: 0 (Packets) 0 (Bytes)

        Red packets   : 0 (Packets) 0 (Bytes)

   Classifier: 2

     Operator: AND

     Rule(s) :

      If-match protocol ipv6

     Behavior: 2

      Accounting enable:

        0 (Packets)

      Filter enable: Permit

      Marking:

        Remark dscp 3

   Classifier: 3

     Operator: AND

     Rule(s) :

      -none-

     Behavior: 3

      -none-

Table 7 Command output

Field

Description

Direction

Direction in which the QoS policy is applied.

For the description of other fields, see Table 1 and Table 4.

display qos policy control-plane pre-defined

Use display qos policy control-plane pre-defined to display predefined control plane QoS policies.

Syntax

display qos policy control-plane pre-defined [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Display the predefined control plane QoS policy of slot 1.

<Sysname> display qos policy control-plane pre-defined slot 1

Pre-defined policy information slot 1

  Protocol          Priority   Bandwidth          Group

  ARP               15         2560 (kbps)        normal

  ARP Snooping      15         256 (kbps)         redirect

  BGP               35         256 (pps)          critical

  BGPv6             35         256 (pps)          critical

  DHCP              23         1536 (kbps)        normal

  DHCP Snooping     23         1536 (kbps)        redirect

  DHCPv6            23         1536 (kbps)        normal

  DLDP              41         64 (kbps)          critical

  802.1x            18         128 (kbps)         important

  MVRP              41         256 (kbps)         critical

  ICMP              22         512 (pps)          monitor

  ICMPv6            22         512 (pps)          monitor

  IGMP              30         512 (pps)          important

  IS-IS             37         12000 (kbps)       critical

  LACP              42         64 (kbps)          critical

  LLDP              41         64 (kbps)          important

  OSPF Multicast    36         2048 (kbps)        critical

  OSPF Unicast      36         2048 (kbps)        critical

  OSPFv3 Multicast  36         2048 (kbps)        critical

  OSPFv3 Unicast    36         2048 (kbps)        critical

  PVST              43         2560 (kbps)        critical

  SNMP              26         512 (kbps)         N/A

  STP               43         256 (kbps)         critical

  VRRP              38         512 (kbps)         important

  VRRPv6            38         512 (kbps)         important

  IPOPTION          16         384 (kbps)         normal

  IPOPTIONv6        16         64 (kbps)          normal

  SSH               27         512 (kbps)         management

  TELNET            27         512 (kbps)         management

  BFD               32         12800 (kbps)       critical

Table 8 Command output

Field

Description

Pre-defined control plane policy

Contents of the predefined control plane QoS policy.

Group

Protocol group of the protocol.

For descriptions of other fields, see Table 3.

display qos policy global

Use display qos policy global to display QoS policies applied globally.

Syntax

display qos [ accounting | mirroring | remarking ] policy global [ slot slot-number ] [ inbound | outbound ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

accounting: Specifies accounting-type QoS policies.

mirroring: Specifies mirroring-type QoS policies.

remarking: Specifies marking-type QoS policies.

inbound: Specifies the QoS policy applied in the inbound direction.

outbound: Specifies the QoS policy applied in the outbound direction.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Usage guidelines

If you do not specify the accounting, mirroring, or remarking keyword, this command displays information about generic QoS policies.

If you do not specify a direction, this command displays both inbound and outbound global QoS policies.

Examples

# Display generic QoS policies applied globally.

<Sysname> display qos policy global

  Direction: Inbound

  Policy: 1

   Classifier: 1

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Marking:

        Remark dscp 3

      Committed Access Rate:

        CIR 112 (kbps), CBS 51200 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

        Green packets : 0 (Packets) 0 (Bytes)

        Yellow packets: 0 (Packets) 0 (Bytes)

        Red packets   : 0 (Packets) 0 (Bytes)

   Classifier: 2

     Operator: AND

     Rule(s) :

      If-match protocol ipv6

     Behavior: 2

      Accounting enable:

        0 (Packets)

      Filter enable: Permit

      Marking:

        Remark dscp 3

   Classifier: 3

     Operator: AND

     Rule(s) :

      -none-

     Behavior: 3

      -none-

# Display information about accounting-type QoS policies applied globally.

<Sysname> display qos accounting policy global

  Direction: Inbound

  Accounting policy: 1

   Classifier: 1

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Accounting enable: Packet

# Display information about mirroring-type QoS policies applied globally.

<Sysname> display qos mirroring policy global

  Direction: Inbound

  Mirroring policy: 1

   Classifier: 1

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Mirroring:

        Mirror to the CPU

# Display information about marking-type QoS policies applied globally.

<Sysname> display qos remarking policy global

  Direction: Inbound

  Marking policy: 1

   Classifier: 1

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Marking:

        Remark dscp 3

Table 9 Command output

Field

Description

Direction

Direction in which the QoS policy is applied.

Accounting policy

User-defined accounting-type QoS policy name.

Mirroring policy

User-defined mirroring-type QoS policy name.

Marking policy

User-defined marking-type QoS policy name.

Green packets

Statistics about green packets.

Yellow packets

Statistics about yellow packets.

Red packets

Statistics about red packets.

For the description of other fields, see Table 1 and Table 4.

display qos policy interface

Use display qos policy interface to display the QoS policies applied to interfaces.

Syntax

display qos [ accounting | mirroring | remarking ] policy interface [ interface-type interface-number ] [ slot slot-number ] [ inbound | outbound ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

accounting: Specifies accounting-type QoS policies.

mirroring: Specifies mirroring-type QoS policies.

remarking: Specifies marking-type QoS policies.

interface-type interface-number: Specifies an interface by its type and number.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

inbound: Specifies the QoS policy applied to incoming traffic.

outbound: Specifies the QoS policy applied to outgoing traffic.

Usage guidelines

If you do not specify the accounting, mirroring, or remarking keyword, this command displays generic QoS policies applied.

If you do not specify a direction, this command displays the QoS policy applied to incoming traffic and the QoS policy applied to outgoing traffic.

Examples

# Display the generic QoS policy applied to the incoming traffic of HundredGigE 1/0/1.

<Sysname> display qos policy interface hundredgige 1/0/1 inbound

Interface: HundredGigE1/0/1

  Direction: Inbound

  Policy: 1

   Classifier: 1

     Matched : 0 (Packets) 0 (Bytes)

     5-minute statistics:

      Forwarded: 0/0 (pps/bps)

      Dropped  : 0/0 (pps/bps)

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Marking:

        Remark dscp 3

      Committed Access Rate:

        CIR 112 (kbps), CBS 51200 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

        Green packets : 0 (Packets) 0 (Bytes)

        Yellow packets: 0 (Packets) 0 (Bytes)

        Red packets   : 0 (Packets) 0 (Bytes)

   Classifier: 2

     Matched : 0 (Packets) 0 (Bytes)

     5-minute statistics:

      Forwarded: 0/0 (pps/bps)

      Dropped  : 0/0 (pps/bps)

     Operator: AND

     Rule(s) :

      If-match protocol ipv6

     Behavior: 2

      Accounting enable:

        0 (Packets)

      Filter enable: Permit

      Marking:

        Remark dscp 3

   Classifier: 3

     Matched : 0 (Packets) 0 (Bytes)

     5-minute statistics:

      Forwarded: 0/0 (pps/bps)

      Dropped  : 0/0 (pps/bps)

     Operator: AND

     Rule(s) :

      -none-

     Behavior: 3

      -none-

# Display information about the accounting-type QoS policy applied to the incoming traffic of HundredGigE 1/0/1.

<Sysname> display qos accounting policy interface hundredgige 1/0/1 inbound

Interface: HundredGigE1/0/1

  Direction: Inbound

  Accounting Policy: 1

   Classifier: 1

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Accounting enable:

        0 (Packets)

# Display information about the mirroring-type QoS policy applied to the incoming traffic of HundredGigE 1/0/1.

<Sysname> display qos mirroring policy interface hundredgige 1/0/1 inbound

Interface: HundredGigE1/0/1

  Direction: Inbound

  Mirroring policy: 1

   Classifier: 1

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Mirroring:

        Mirror to the CPU

# Display information about the marking-type QoS policy applied to the incoming traffic of HundredGigE 1/0/1.

<Sysname> display qos remarking policy interface hundredgige 1/0/1 inbound

Interface: HundredGigE1/0/1

  Direction: Inbound

  Marking policy: 1

   Classifier: 1

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Marking:

        Remark dscp 3

# Display the QoS policies applied to all interfaces.

<Sysname> display qos policy interface

Interface: HundredGigE1/0/1

  Direction: Inbound

  Policy: a

   Classifier: a

     Operator: AND

     Rule(s) :

      If-match any

     Behavior: a

      Mirroring:

        Mirror to the interface: HundredGigE1/0/2

      Committed Access Rate:

        CIR 112 (kbps), CBS 51200 (Bytes), EBS 0 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

        Green packets : 0 (Packets)

        Red packets   : 0 (Packets)

 

Interface: HundredGigE1/0/3

  Direction: Inbound

  Policy: b

   Classifier: b

     Operator: AND

     Rule(s) :

      If-match any

     Behavior: b

      Committed Access Rate:

        CIR 112 (kbps), CBS 51200 (Bytes), EBS 0 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

        Green packets : 0(Packets)

        Red packets   : 0 (Packets)

 

Interface: HundredGigE1/0/3

  Direction: Inbound

  Policy: a

   Classifier: a

     Operator: AND

     Rule(s) :

      If-match any

     Behavior: a

      Mirroring:

        Mirror to the interface: HundredGigE1/0/4

      Committed Access Rate:

        CIR 112 (kbps), CBS 51200 (Bytes), EBS 0 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

        Green packets : 0 (Packets)

        Red packets   : 0 (Packets)

Table 10 Command output

Field

Description

Direction

Direction in which the QoS policy is applied.

Accounting policy

User-defined accounting-type QoS policy name.

Mirroring policy

User-defined mirroring-type QoS policy name.

Marking policy

User-defined marking-type QoS policy name.

Matched

Number of matching packets.

Forwarded

Average rate of successfully forwarded matching packets in a statistics collection period.

Dropped

Average rate of dropped matching packets in a statistics collection period.

Green packets

Traffic statistics for green packets.

Yellow packets

Traffic statistics for yellow packets.

Red packets

Traffic statistics for red packets.

For the description of other fields, see Table 1 and Table 4.

display qos policy l2vpn-ac

Use display qos policy l2vpn-ac to display the QoS policies applied to Ethernet service instances.

Syntax

display qos policy l2vpn-ac [ interface interface-type interface-number [ service-instance instance-id ] [ slot slot-number ] ] [ inbound | outbound ]

 Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays QoS policies applied to Ethernet service instances on all interfaces.

service-instance instance-id: Specifies an Ethernet service instance by its ID in the range of 1 to 4096. If you do not specify an Ethernet service instance, this command displays QoS policies applied to all Ethernet service instances on an interface.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

inbound: Specifies the QoS policies applied to incoming traffic.

outbound: Specifies the QoS policies applied to outgoing traffic.

Usage guidelines

If you do not specify a direction, this command displays both QoS policies applied in the inbound direction and QoS policies applied in the outbound direction.

Examples

# Display the QoS policy applied to the incoming traffic of Ethernet service instance 1 on HundredGigE 1/0/1.

<Sysname> display qos policy l2vpn-ac interface hundredgige 1/0/1 service-instance 1 inbound

Interface: HundredGigE1/0/1    Service instance ID: 1

  Direction: Inbound

  Policy: p

   Classifier: c

     Operator: AND

     Rule(s) :

      If-match any

     Behavior: b

      Committed Access Rate:

        CIR 88 (kbps), CBS 5632 (Bytes), EBS 0 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

        Green packets : 0 (Packets)

        Red packets   : 0 (Packets)

For the description of fields, see Table 1 and Table 4.

display qos vlan-policy

Use display qos vlan-policy to display QoS policies applied to VLANs.

Syntax

display qos vlan-policy { name policy-name | vlan [ vlan-id ] } [ slot slot-number ] [ inbound | outbound ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

name policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.

vlan vlan-id: Specifies a VLAN by its ID in the range of 1 to 4094.

inbound: Displays QoS policies applied to incoming traffic.

outbound: Displays QoS policies applied to outgoing traffic.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Usage guidelines

If you do not specify a direction, this command displays QoS policies applied to VLANs in both the inbound and outbound directions.

Examples

# Display QoS policies applied to VLAN 2.

<Sysname> display qos vlan-policy vlan 2

Vlan 2

  Direction: Inbound

  Policy: 1

   Classifier: 1

     Operator: AND

     Rule(s) :

      If-match acl 2000

     Behavior: 1

      Marking:

        Remark dscp 3

      Committed Access Rate:

        CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

        Green packets : 0 (Packets) 0 (Bytes)

        Yellow packets: 0 (Packets) 0 (Bytes)

        Red packets   : 0 (Packets) 0 (Bytes)

   Classifier: 2

     Operator: AND

     Rule(s) :

      If-match protocol ipv6

     Behavior: 2

      Accounting enable:

        0 (Packets)

      Filter enable: Permit

      Marking:

        Remark dscp 3

   Classifier: 3

     Operator: AND

     Rule(s) :

      -none-

     Behavior: 3

      -none-

Table 11 Command output

Field

Description

Direction

Direction in which the QoS policy is applied.

Green packets

Statistics about green packets.

Yellow packets

Statistics about yellow packets.

Red packets

Statistics about red packets.

For the description of other fields, see Table 1 and Table 4.

qos apply policy (Ethernet service instance view, interface view, control plane view)

Use qos apply policy to apply a QoS policy to an Ethernet service instance, interface, or control plane.

Use undo qos apply policy to remove an applied QoS policy.

Syntax

qos apply [ accounting | mirroring | remarking ] policy policy-name { inbound | outbound } [ share-mode ]

undo qos apply [ accounting | mirroring | remarking ] policy policy-name { inbound | outbound }

Default

No QoS policy is applied.

Views

Control plane view

Interface view

Ethernet service instance view

Predefined user roles

network-admin

Parameters

accounting: Specifies an accounting-type QoS policy. This keyword is supported only in interface view.

mirroring: Specifies a mirroring-type QoS policy. This keyword is supported only in interface view.

remarking: Specifies a marking-type QoS policy. This keyword is supported only in interface view.

policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.

inbound: Applies the QoS policy to incoming traffic.

outbound: Applies the QoS policy to outgoing traffic. This keyword is not supported in control plane view.

share-mode: Applies the QoS policy in sharing mode to a Layer 2 or Layer 3 Ethernet interface. In this mode, all interfaces on the device with the same QoS policy applied in one direction share one QoS and ACL resource.

Usage guidelines

The display qos policy interface command output for an interface also contains packet statistics for all interfaces that share the QoS and ACL resource with the interface.

A maximum of four QoS policies (one generic, one accounting-type, one mirroring-type, and one marking-type) can be applied to one direction of an interface. Different actions can be taken on the same traffic class if QoS policies of different types are applied to an interface.

If you specify the share-mode keyword when applying a QoS policy to an interface, follow these restrictions and guidelines:

·     All interfaces on an interface module with the QoS policy applied in one direction share one QoS and ACL resource.

If the share-mode keyword is not specified, each interface uses one QoS and ACL resource in one direction.

·     You cannot specify the share-mode keyword when applying an ACL to the same direction of the interface. For more information about applying an ACL to an interface, see the packet-filter (interface view) command in ACL commands.

The display qos policy interface command output for an interface also contains packet statistics for all interfaces that share the QoS and ACL resource with the interface.

You cannot change the sharing mode dynamically after a QoS policy is applied to an interface. To change the sharing mode for an applied QoS policy, perform the following tasks:

1.     Remove the QoS policy from the interface.

2.     Reapply the QoS policy with or without the share-mode keyword specified.

To apply a QoS policy to the control plane to limit the rate of protocol packets, match the traffic class against control plane protocol type instead of protocol packet information as a best practice.

Only the S9855 switch series supports applying a QoS policy to a VSI interface.

Examples

# Apply generic QoS policy USER1 to the outgoing traffic of HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos apply policy USER1 outbound

# Apply accounting-type QoS policy USER2 to the outgoing traffic of HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos apply accounting policy USER2 outbound

# Apply mirroring-type QoS policy USER3 to the outgoing traffic of HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos apply mirroring policy USER3 outbound

# Apply marking-type QoS policy USER4 to the outgoing traffic of HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos apply remarking policy USER4 outbound

# Apply generic QoS policy USER5 to the incoming traffic of the control plane of slot 3.

<Sysname> system-view

[Sysname] control-plane slot 1

[Sysname-cp-slot1] qos apply policy USER5 inbound

# Apply generic QoS policy TEST9 to the incoming traffic of Ethernet service instance 200.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] service-instance 200

[Sysname-HundredGigE1/0/1-srv200] qos apply policy TEST9 inbound

qos apply policy global

Use qos apply policy global to apply a QoS policy globally.

Use undo qos apply policy global to remove a globally applied QoS policy.

Syntax

qos apply [ accounting | mirroring | remarking ] policy policy-name global { inbound | outbound }

undo qos apply [ accounting | mirroring | remarking ] policy policy-name global { inbound | outbound }

Default

No QoS policy is applied globally.

Views

System view

Predefined user roles

network-admin

Parameters

accounting: Specifies an accounting-type QoS policy.

mirroring: Specifies a mirroring-type QoS policy.

remarking: Specifies a marking-type QoS policy.

policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.

inbound: Applies the QoS policy to the incoming packets on all interfaces.

outbound: Applies the QoS policy to the outgoing packets on all interfaces.

Usage guidelines

A global QoS policy takes effect on all incoming or outgoing traffic depending on the direction in which the QoS policy is applied.

A maximum of four QoS policies (one generic, one accounting-type, one mirroring-type, and one marking-type) can be applied to one direction globally.

If you do not specify the accounting, mirroring, or remarking keyword, this command applies a generic QoS policy globally.

Examples

# Globally apply generic QoS policy user1 to the incoming traffic.

<Sysname> system-view

[Sysname] qos apply policy user1 global inbound

# Globally apply mirroring-type QoS policy user2 to the incoming traffic.

<Sysname> system-view

[Sysname] qos apply mirroring policy user2 global inbound

qos policy

Use qos policy to create a QoS policy and enter its view, or enter the view of an existing QoS policy.

Use undo qos policy to delete a QoS policy.

Syntax

qos [ accounting | mirroring | remarking ] policy policy-name

undo qos [ accounting | mirroring | remarking ] policy policy-name

Default

No QoS policies exist.

Views

System view

Predefined user roles

network-admin

Parameters

accounting: Identifies the QoS policy as an accounting-type QoS policy.

mirroring: Identifies the QoS policy as a mirroring-type QoS policy.

remarking: Identifies the QoS policy as a marking-type QoS policy.

policy-name: Specifies a name for the QoS policy, a case-sensitive string of 1 to 31 characters.

Usage guidelines

If you do not specify the accounting, mirroring, or remarking keyword when creating a QoS policy, a generic QoS policy is created.

QoS policies of different types cannot use the same policy name.

Do not use the accounting, mirroring, or remarking word or the first letters of any one of them as a policy name. If you do so, no information is displayed when you execute the display qos policy user-defined policy-name command, because the system will recognize such a policy name as command keyword.

A generic QoS policy can be applied to all supported destinations and can contain all actions. An accounting-type QoS policy can be applied to only interfaces or globally and can contain only class-based accounting actions. A mirroring-type QoS policy can be applied to only interfaces or globally and can contain only mirroring actions. A marking-type QoS policy can be applied to only interfaces or globally and can contain only marking actions.

In the outbound direction of an interface on an S9855 switch, if a packet matches both an accounting-type QoS policy and a packet filter with the counting function enabled, it is counted only by the packet filter. For more information about packet filter, see Security Configuration Guide.

To delete a QoS policy that has been applied to an object, you must first remove the QoS policy from the object.

Examples

# Create a generic QoS policy named user1.

<Sysname> system-view

[Sysname] qos policy user1

[Sysname-qospolicy-user1]

# Create an accounting-type QoS policy named user2.

<Sysname> system-view

[Sysname] qos accounting policy user2

[Sysname-qospolicy-user2]

# Create a marking-type QoS policy named user3.

<Sysname> system-view

[Sysname] qos remarking policy user3

[Sysname-qospolicy-user3]

# Create a mirroring-type QoS policy named user4.

<Sysname> system-view

[Sysname] qos mirroring policy user4

[Sysname-qospolicy-user4]

Related commands

classifier behavior

qos apply policy

qos apply policy global

qos vlan-policy

qos vlan-policy

Use qos vlan-policy to apply a QoS policy to the specified VLANs.

Use undo qos vlan-policy to remove a QoS policy from the specified VLANs.

Syntax

qos vlan-policy policy-name vlan vlan-id-list { inbound | outbound }

undo qos vlan-policy policy-name vlan vlan-id-list { inbound | outbound }

Default

No QoS policy is applied to a VLAN.

Views

System view

Predefined user roles

network-admin

Parameters

policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.

vlan vlan-id-list: Specifies a space-separated list of up to eight VLAN IDs or a VLAN ID range in the form of vlan-id1 to vlan-id2. The value for vlan-id2 must be greater than or equal to the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094.

inbound: Applies the QoS policy to incoming packets.

outbound: Applies the QoS policy to outgoing packets.

Examples

# Apply QoS policy test to the incoming traffic of VLAN 200, VLAN 300, VLAN 400, and VLAN 500.

<Sysname> system-view

[Sysname] qos vlan-policy test vlan 200 300 400 500 inbound

reset qos policy control-plane

Use reset qos policy control-plane to clear the statistics of the QoS policy applied to a control plane.

Syntax

reset qos policy control-plane slot slot-number

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Clear the statistics of the QoS policy applied to the control plane of slot 1.

<Sysname> reset qos policy control-plane slot 1

reset qos policy global

Use reset qos policy global to clear the statistics of a global QoS policy.

Syntax

reset qos [ accounting | mirroring | remarking ] policy global [ inbound | outbound ]

Views

User view

Predefined user roles

network-admin

Parameters

accounting: Specifies accounting-type QoS policies.

mirroring: Specifies mirroring-type QoS policies.

remarking: Specifies marking-type QoS policies.

inbound: Clears the statistics of the global QoS policy applied to incoming traffic globally.

outbound: Clears the statistics of the global QoS policy applied to outgoing traffic globally.

Usage guidelines

If you do not specify the accounting, mirroring, or remarking keyword, this command clears statistics for generic QoS policies.

If you do not specify a direction, this command clears the statistics of the global QoS policies in both directions.

Examples

# Clear the statistics of the generic QoS policy applied to the incoming traffic globally.

<Sysname> reset qos policy global inbound

# Clear statistics for the mirroring-type QoS policy applied to the inbound direction globally.

<Sysname> reset qos mirroring policy global inbound

reset qos vlan-policy

Use reset qos vlan-policy to clear the statistics of the QoS policy applied in a certain direction of a VLAN.

Syntax

reset qos vlan-policy [ vlan vlan-id ] [ inbound | outbound ]

Views

User view

Predefined user roles

network-admin

Parameters

vlan vlan-id: Specifies a VLAN ID in the range of 1 to 4094.

inbound: Clears the statistics of the QoS policy applied to the incoming traffic of the specified VLAN.

outbound: Clears the statistics of the QoS policy applied to the incoming traffic of the specified VLAN.

Usage guidelines

If you do not specify a direction, this command clears the statistics of the QoS policies in both directions of the VLAN.

Examples

# Clear the statistics of QoS policies applied to VLAN 2.

<Sysname> reset qos vlan-policy vlan 2

QoS and ACL resource usage displaying commands

display qos-acl resource

Use display qos-acl resource to display QoS and ACL resource usage.

Syntax

display qos-acl resource [ advance ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

advance: Displays the QoS and ACL resource usage in advanced mode. If you do not specify this keyword, this command displays the QoS and ACL resource usage in common mode.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Display QoS and ACL resource usage in common mode.

<Sysname> display qos-acl resource

Interfaces: HGE1/0/1 to HGE1/0/16, HGE1/0/33

            HGE1/0/35, HGE1/0/37

            HGE1/0/39, HGE1/0/41

            HGE1/0/43, HGE1/0/45

            HGE1/0/47, 400GE1/0/50

            400GE1/0/51, 400GE1/0/52

            400GE1/0/54 (slot 1)

---------------------------------------------------------------------

 Type             Total      Reserved   Configured Remaining  Usage

---------------------------------------------------------------------

 VFP ACL          2048       0          0          2048       0%

 IFP ACL          16384      4096       2          12286      25%

 IFP Meter        512        0          84         428        16%

 IFP Counter      81920      8192       1          73727      10%

 EFP ACL          2048       0          0          2048       0%

 EFP Meter        128        0          0          128        0%

 EFP Counter      8192       0          0          8192       0%

 

Interfaces: HGE1/0/17 to HGE1/0/32, HGE1/0/34

            HGE1/0/36, HGE1/0/38

            HGE1/0/40, HGE1/0/42

            HGE1/0/44, HGE1/0/46

            HGE1/0/48, 400GE1/0/49

            400GE1/0/53, 400GE1/0/55

            400GE1/0/56 (slot 1)

---------------------------------------------------------------------

 Type             Total      Reserved   Configured Remaining  Usage

---------------------------------------------------------------------

 VFP ACL          2048       0          0          2048       0%

 IFP ACL          16384      4096       1          12287      25%

 IFP Meter        512        0          84         428        16%

 IFP Counter      81920      8192       1          73727      10%

 EFP ACL          2048       0          0          2048       0%

 EFP Meter        128        0          0          128        0%

 EFP Counter      8192       0          0          8192       0%

Table 12 Command output

Field

Description

Interfaces

Interface range for the resources.

Type

Resource type.

·     VFP ACL—ACL resource usage for marking local QoS IDs before Layer 2 forwarding.

·     IFP ACL—Ingress ACL resources.

·     IFP Meter—Ingress traffic policing resources.

·     IFP Counter—Ingress traffic accounting resources.

·     EFP ACL—Egress ACL resources.

·     EFP Meter—Egress traffic policing resources.

·     EFP Counter—Egress traffic accounting resources.

Total

Total number of resources.

Reserved

Number of reserved resources.

Configured

Number of resources that have been applied.

Remaining

Number of resources that you can apply.

Usage

Configured and reserved resources as a percentage of total resources. If the percentage is not an integer, this field displays the integer part. For example, if the actual usage is 50.8%, this field displays 50%.

# Display QoS and ACL resource usage in advanced mode.

<Sysname> display qos-acl resource advance

 

Interfaces:  HGE1/0/1 to HGE1/0/16, HGE1/0/33, HGE1/0/35, HGE1/0/37, HGE1/0/39, HGE1/0/41, HGE1/0/43, HGE1/0/45, HGE1/0/47, 400GE1/0

/50, 400GE1/0/51, 400GE1/0/52, 400GE1/0/54 (slot 1)

-------------------------------------------------------------

 Stage    Slice    Total    Configured   Remaining    Usage

-------------------------------------------------------------

 IFP       0        2048      1            2047        0%

 IFP       1        2048      1            2047        0%

 IFP       2        2048      0            2048        0%

 IFP       3        2048      0            2048        0%

 IFP       4        1024      43           981         4%

 IFP       5        1024      43           981         4%

 IFP       6        1024      43           981         4%

 IFP       7        1024      39           985         3%

 IFP       8        1024      0            1024        0%

 IFP       9        1024      0            1024        0%

 IFP       10       1024      0            1024        0%

 IFP       11       1024      0            1024        0%

 EFP       0        512       0            512         0%

 EFP       1        512       0            512         0%

 EFP       2        512       0            512         0%

 EFP       3        512       0            512         0%

 VFP       0        512       0            512         0%

 VFP       1        512       0            512         0%

 VFP       2        512       0            512         0%

 VFP       3        512       0            512         0%

 

Interfaces:  HGE1/0/17 to HGE1/0/32, HGE1/0/34, HGE1/0/36, HGE1/0/38, HGE1/0/40, HGE1/0/42, HGE1/0/44, HGE1/0/46, HGE1/0/48, 400GE1/

0/49, 400GE1/0/53, 400GE1/0/55, 400GE1/0/56 (slot 1)

-------------------------------------------------------------

 Stage    Slice    Total    Configured   Remaining    Usage

-------------------------------------------------------------

 IFP       0        2048      1            2047        0%

 IFP       1        2048      0            2048        0%

 IFP       2        2048      0            2048        0%

 IFP       3        2048      0            2048        0%

 IFP       4        1024      43           981         4%

 IFP       5        1024      43           981         4%

 IFP       6        1024      43           981         4%

 IFP       7        1024      39           985         3%

 IFP       8        1024      0            1024        0%

 IFP       9        1024      0            1024        0%

 IFP       10       1024      0            1024        0%

 IFP       11       1024      0            1024        0%

 EFP       0        512       0            512         0%

 EFP       1        512       0            512         0%

 EFP       2        512       0            512         0%

 EFP       3        512       0            512         0%

 VFP       0        512       0            512         0%

 VFP       1        512       0            512         0%

 VFP       2        512       0            512         0%

 VFP       3        512       0            512         0%

Table 13 Command output

Field

Description

Interfaces

Interface range for the resources.

Stage

Processing stage:

·     VFP—Layer 2 forwarding stage.

·     IFP—Receiving stage.

·     EFP—Sending stage.

Slice

Slice index of the ACL resource.

Total

Total number of resources.

Configured

Number of resources that have been applied.

Remaining

Number of resources that you can apply.

Usage

Configured and reserved resources as a percentage of total resources. If the percentage is not an integer, this field displays the integer part. For example, if the actual usage is 50.8%, this field displays 50%.

 


Priority mapping commands

Priority map commands

display qos map-table

Use display qos map-table to display the configuration of priority maps.

Syntax

display qos map-table [ dot1p-dp | dot1p-dscp | dot1p-lp | dscp-dot1p | lp-dot1p ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

The device provides the following types of priority map.

Table 14 Priority maps

Priority mapping

Description

dot1p-dp

802.1p-drop priority map.

dot1p-dscp

802.1p-DSCP priority map.

dot1p-lp

802.1p-local priority map.

dscp-dot1p

DSCP-802.1p priority map.

lp-dot1p

Local-802.1p priority map.

Usage guidelines

If you do not specify a priority map, this command displays the configuration of all priority maps.

Examples

# Display the configuration of the 802.1p-local priority map.

<Sysname> display qos map-table dot1p-lp

MAP-TABLE NAME: dot1p-lp   TYPE: pre-define

IMPORT  :  EXPORT

   0    :    2

   1    :    0

   2    :    1

   3    :    3

   4    :    4

   5    :    5

   6    :    6

   7    :    7

Table 15 Command output

Field

Description

MAP-TABLE NAME

Name of the priority map.

TYPE

Type of the priority map.

IMPORT

Input values of the priority map.

EXPORT

Output values of the priority map.

import (priority map view)

Use import to configure mappings for a priority map.

Use undo import to restore the specified or all mappings to the default for a priority map.

Syntax

import import-value-list export export-value

undo import { import-value-list | all }

Default

The default priority maps are used. For more information, see ACL and QoS Configuration Guide.

Views

Priority map view

Predefined user roles

network-admin

Parameters

import-value-list: Specifies a list of input values.

export-value: Specifies the output value.

all: Restores all mappings in the priority map to the default.

Examples

# Configure the 802.1p-local priority map to map 802.1p priority values 4 and 5 to local priority 1.

<Sysname> system-view

[Sysname] qos map-table dot1p-lp

[Sysname-maptbl-dot1p-lp] import 4 5 export 1

Related commands

display qos map-table

qos map-table

Use qos map-table to enter the specified priority map view.

Syntax

qos map-table { dot1p-dp | dot1p-dscp | dot1p-lp | dscp-dot1p | lp-dot1p }

Views

System view

Predefined user roles

network-admin

Parameters

For the description of the keywords, see Table 14.

Examples

# Enter the 802.1p-local priority map view.

<Sysname> system-view

[Sysname] qos map-table dot1p-lp

[Sysname-maptbl-dot1p-lp]

Related commands

display qos map-table

import

Priority trust mode commands

display qos trust interface

Use display qos trust interface to display the priority trust mode and port priorities of an interface.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the priority trust mode and port priorities of all interfaces.

Examples

# Display the priority trust mode and port priority of HundredGigE 1/0/1.

<Sysname> display qos trust interface hundredgige 1/0/1

Interface: HundredGigE1/0/1

 Port priority information

  Port priority: 0

  Port dscp priority: -

  Port priority trust type: dscp,  Override: disable

Table 16 Command output

Field

Description

Interface

Interface type and interface number.

Port priority

Port priority set for the interface.

Port dscp priority

DSCP value rewritten for packets. If you have not rewritten the DSCP value of packets, this field displays a hyphen (-).

Port priority trust type

Priority trust mode on the interface:

·     dot1p—Uses the 802.1p priority of received packets for mapping.

·     dscp—Uses the DSCP precedence of received IP packets for mapping.

·     none—Trusts no packet priority.

Override

Indicates whether the precedence derived through priority mapping overwrites the original precedence carried in the packet.

qos trust

Use qos trust to configure the priority trust mode for an interface.

Use undo qos trust to restore the default.

Syntax

qos trust { dot1p | dscp } [ override ]

undo qos trust

Default

An interface trusts the port priority. If the device has both Layer 2 and Layer 3 interfaces, Layer 2 packets trust their 802.1p priority, and Layer 3 packets trust the port priority.

Views

Interface view

Predefined user roles

network-admin

Parameters

dot1p: Uses the 802.1p priority in incoming packets for priority mapping.

dscp: Uses the DSCP value in incoming packets for priority mapping.

override: Uses the priority derived through priority mapping to overwrite the original priority carried in the packet. This keyword is optional. By default, this feature is disabled.

Usage guidelines

As a best practice, do not execute both the qos priority and qos trust commands on the same interface. If you execute both of them, the qos priority command does not take effect on packets with VLAN tags.

Only S9825 switch series support this command on tunnel interfaces. For this command to take effect, you must execute it on the physical interface associated with the tunnel interface.

Examples

# Set the priority trust mode to 802.1p priority on HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos trust dot1p

Related commands

display qos trust interface

qos trust (system view)

Use qos trust to configure the global priority trust mode for VXLAN packets.

Use undo qos trust to restore the default.

Syntax

qos trust tunnel-dscp

undo qos trust tunnel-dscp

Default

The global priority trust mode for VXLAN packets is not configured.

Views

System view

Predefined user roles

network-admin

Parameters

tunnel-dscp: Trusts the DSCP value in the outer IP header of VXLAN packets for priority mapping.

Usage guidelines

For a VXLAN tunnel interface to trust the DSCP priority in the outer IP header of VXLAN packets, you must also configure the qos trust dscp command on its physical interface.

Examples

# Configure the switch to trust the DSCP priority in the outer IP header of VXLAN packets.

<Sysname> system-view

[Sysname] qos trust tunnel-dscp

Port priority commands

qos priority

Use qos priority to change the port priority of an interface.

Use undo qos priority to restore the default.

Syntax

qos priority [ dscp ] priority-value

undo qos priority [ dscp ]

Default

The port priority is 0.

Views

Interface view

Predefined user roles

network-admin

Parameters

priority-value: Specifies a priority value. If the dscp keyword is not specified, this argument specifies the port priority in the range of 0 to 7. If the dscp keyword is specified, this argument specifies the DSCP value to be set for packets, in the range of 0 to 63.

Usage guidelines

When no priority trust mode is configured for an interface, the interface uses the port priority as the 802.1p priority for priority mapping. If the qos priority dscp priority-value command is executed, the interface modifies the DSCP value of Layer 3 packets in addition to performing priority mapping.

As a best practice, do not execute both the qos priority and qos trust commands on the same interface. If you execute both of them, the qos priority command does not take effect on packets with VLAN tags.

Examples

# Set the port priority of HundredGigE 1/0/1 to 2.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos priority 2

Related commands

display qos trust interface

Global priority commands

qos mirroring local-precedence

Use qos mirroring local-precedence to set the local precedence of mirrored packets.

Use undo qos mirroring local-precedence to restore the default.

Syntax

qos mirroring local-precedence local-precedence-value

undo qos mirroring local-precedence

Default

The local precedence of a mirrored packet is 0.

Views

System view

Predefined user roles

network-admin

Parameters

local-precedence-value: Specifies a local precedence value in the range of 0 to 3. The greater the value, the higher the priority.

Usage guidelines

On the mirroring source device, both mirrored packets and service packets might exist on the egress port. To schedule service packets preferentially, execute this command to set the local precedence of mirrored packets to a smaller value, for example, 0. In this case, when congestion occurs, less service packets will be dropped.

This command takes effect on packets mirrored by both port mirroring and flow mirroring.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Set the local precedence of mirrored packets to 2.

<Sysname> system-view

[Sysname] qos mirroring local-precedence 2


Traffic policing, GTS, and rate limit commands

Traffic policing commands

display qos overhead compensation-length

Use display qos overhead compensation-length to display the packet compensation length configuration for QoS rate limiting and statistics.

Syntax

display qos overhead compensation-length [ interface [ interface-type interface-number ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface: Displays the packet compensation length configuration for QoS rate limiting and statistics on interfaces. If you do not specify this keyword, this command displays the global packet compensation length configuration and the packet compensation length configuration for each interface.

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the packet compensation length configuration for each interface.

Examples

# Display the global packet compensation length configuration and the packet compensation length configuration for each interface.

<Sysname> display qos overhead compensation-length

Overhead compensation length:

Global

  Inbound  : 20

  Outbound : 20

Interface  : HundredGigE1/0/1

  Inbound  : 20

  Outbound : 20

Related commands

qos overhead compensation-length

qos overhead compensation-length

Use qos overhead compensation-length to set the packet compensation length for QoS rate limiting and statistics.

Use undo qos overhead compensation-length restore the default.

Syntax

qos overhead compensation-length length

undo qos overhead compensation-length

Default

The device does not include the IFG, preamble, and start frame delimiter by default when performing QoS rate limiting and statistics.

Views

System view

Interface view

Predefined user roles

network-admin

Parameters

length: Specifies the packet compensation length in the range of 0 to 31 bytes.

Usage guidelines

Operating mechanism

At the data link layer, Ethernet standards require the interframe gap (IFG), preamble, and start frame delimiter to exist between frames to allow the receiving device to prepare for the next frame. The minimum total length of the three parts is 20 bytes.

When the device performs QoS rate limiting (including rate limit, GTS, and traffic policing) and statistics on traffic, it calculates the packet rate and limit the rate based on the size of traffic passing through the interface per unit time. When the traffic size in the network is small, for example, when the average packet length is less than 100 bytes, the IFG significantly affects rate statistics. In this case, you must consider the IFG, preamble, and start frame delimiter when performing QoS rate limiting based on the calculated packet rate.

If the device does not include the IFG, preamble, and start frame delimiter when performing QoS rate limiting and statistics by default, you can set the compensation length to 20 bytes to obtain accurate rate limiting and statistics.

Restrictions and guidelines

If you configure the packet compensation length in both system view and interface view, the configuration in interface view takes effect.

Examples

# Set the global packet compensation length for QoS rate limiting and statistics to 20 bytes.

<Sysname> system-view

[Sysname] qos overhead compensation-length 20

# Set the packet compensation length on HundredGigE 1/0/1 for QoS rate limiting and statistics to 20 bytes.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos overhead compensation-length 20

Related commands

display qos overhead compensation-length

GTS commands

display qos gts interface

Use display qos gts interface to display the GTS configuration for interfaces.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the GTS configuration for all interfaces.

Examples

# Display the GTS configuration for all interfaces.

<Sysname> display qos gts interface

Interface: HundredGigE1/0/1

 Rule: If-match queue 2

  CIR 512 (kbps), CBS 51200 (Bytes)

Table 17 Command output

Field

Description

Interface

Interface name, including the interface type and interface number.

Rule

Match criteria.

CIR

CIR in kbps.

CBS

CBS in bytes.

qos gts

Use qos gts to set GTS parameters on an interface.

Use undo qos gts to delete the GTS configuration on an interface.

Syntax

qos gts queue queue-id cir committed-information-rate [ cbs committed-burst-size ]

undo qos gts queue queue-id

Default

No GTS parameters are configured on an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

queue queue-id: Shapes the packets in a queue specified by its ID. The value range for queue-id is 0 to 7.

cir committed-information-rate: Specifies the CIR in kbps. The value range for committed-information-rate is 8 to 100000000 for 100-GE interfaces and 8 to 400000000 for 400-GE interfaces. The specified value must be an integral multiple of 8.

cbs committed-burst-size: Specifies the CBS in bytes. The value range for committed-burst-size is 512 to 16000000, in increments of 512. The default value for this argument is the product of 62.5 and the CIR and must be an integral multiple of 512. When the product is not an integral multiple of 512, it is rounded up to the nearest integral multiple of 512 that is greater than the product. A default value greater than 16000000 is converted to 16000000.

When specifying an ACL, follow these restrictions and guidelines:

·     If the specified ACL does not exist or does not have any rules, the ACL will not be referenced.

·     In the specified ACL, if a rule has the vpn-instance keyword specified, the rule takes effect only on VPN packets. If a rule does not have the vpn-instance keyword specified, the rule takes effect only on packets in the public network.

Usage guidelines

Set the CIR in this command to be greater than or equal to the minimum guaranteed bandwidth in the qos bandwidth queue command.

Examples

# Shape the packets of queue 1 on GigabitEthernet 1/0/1 (CIR 6400 kbps and CBS 51200 bytes).

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] qos gts queue 1 cir 6400 cbs 51200

Rate limit commands

display qos lr interface

Use display qos lr interface to display the rate limit configuration for interfaces.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the rate limit configuration for all interfaces.

Examples

# Display the rate limit configuration and statistics for all interfaces.

<Sysname> display qos lr interface

Interface: HundredGigE1/0/1

 Direction: Outbound

  CIR 2000 (kbps), CBS 20480 (Bytes)

Table 18 Command output

Field

Description

Interface

Interface name, including the interface type and interface number.

Direction

Direction in which the rate limit configuration is applied.

CIR

CIR in kbps.

CBS

CBS in bytes.

qos lr

Use qos lr to configure rate limiting on an interface.

Use undo qos lr to delete the rate limit configuration.

Syntax

qos lr outbound cir committed-information-rate [ cbs committed-burst-size ]

undo qos lr outbound

Default

No rate limit is configured on an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

outbound: Limits the rate of outgoing packets.

cir committed-information-rate: Specifies the CIR in kbps. The value range for committed-information-rate is 32 to 100000000 for 100-GE interfaces and 32 to 400000000 for 400-GE interfaces. The specified value must be an integral multiple of 8.

cbs committed-burst-size: Specifies the CBS in the range of 512 to 128000000 bytes. The default is the product of 62.5 and the CIR and must be a multiple of 512. When the product is not a multiple of 512, it is rounded up to the nearest integral multiple of 512 that is greater than the product. A default value greater than 128000000 is converted to 128000000.

Examples

# Limit the rate of outgoing packets on HundredGigE 1/0/1, with CIR 256 kbps and CBS 51200 bytes.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos lr outbound cir 256 cbs 51200

 


Congestion management commands

SP commands

display qos queue sp interface

Use display qos queue sp interface to display the SP queuing configuration of an interface.

Syntax

display qos queue sp interface [ interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the SP queuing configuration of all interfaces.

Examples

# Display the SP queuing configuration of HundredGigE 1/0/1.

<Sysname> display qos queue sp interface hundredgige 1/0/1

Interface: HundredGigE1/0/1

 Output queue: Strict Priority queuing

Table 19 Command output

Field

Description

Interface

Interface type and interface number.

Output queue

Type of the current output queue.

qos sp

Use qos sp to enable SP queuing on an interface.

Use undo qos sp to restore the default.

Syntax

qos sp

undo qos sp

Default

An interface uses SP queuing.

Views

Interface view

Predefined user roles

network-admin

Examples

# Enable SP queuing on HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos sp

Related commands

display qos queue sp interface

WRR commands

display qos queue wrr interface

Use display qos queue wrr interface to display the WRR queuing configuration of an interface.

Syntax

display qos queue wrr interface [ interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the WRR queuing configuration of all interfaces.

Examples

# Display the WRR queuing configuration of HundredGigE 1/0/1.

<Sysname> display qos queue wrr interface hundredgige 1/0/1

Interface: HundredGigE1/0/1

 Output queue: Weighted Round Robin queuing

 Queue ID        Queue name      Group           Weight

 --------------------------------------------------------

 0               be              1               1

 1               af1             1               1

 2               af2             1               1

 3               af3             1               1

 4               af4             1               1

 5               ef              1               1

 6               cs6             1               1

 7               cs7             sp              N/A

Table 20 Command output

Field

Description

Interface

Interface type and interface number.

Output queue

Type of the current output queue.

Group

ID of the group a queue is assigned to.

Weight

Packet-count queue scheduling weight of a queue. N/A is displayed for a queue that uses the SP scheduling algorithm.

Byte count

Byte-count scheduling weight of a queue. N/A is displayed for a queue that uses the SP scheduling algorithm.

Related commands

qos wrr

qos wrr

Use qos wrr to enable WRR queuing on an interface.

Use undo qos wrr to restore the default.

Syntax

qos wrr { byte-count | weight }

undo qos wrr { byte-count | weight }

Default

An interface uses SP queuing.

Views

Interface view

Predefined user roles

network-admin

Parameters

byte-count: Allocates bandwidth to queues in bytes.

weight: Allocates bandwidth to queues in packets.

Usage guidelines

You must use the qos wrr command to enable WRR queuing before you can configure WRR queuing parameters for a queue on an interface.

Examples

# Enable packet-count WRR queuing on HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wrr weight

# Enable byte-count WRR queuing on HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wrr byte-count

Related commands

display qos queue wrr interface

qos wrr  { byte-count | weight }

Use qos wrr { byte-count | weight } to configure the WRR queuing parameters for a queue on an interface.

Use undo qos wrr to restore the default.

Syntax

qos wrr queue-id group 1 { byte-count | weight } schedule-value

undo qos wrr queue-id

Default

All queues on a WRR-enabled interface are in WRR group 1, and queues 0 through 7 have a weight of 1, 2, 3, 4, 5, 6, 7, and 8, respectively.

Views

Interface view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.

Table 21 The number-keyword map for the queue-id argument

Number

Keyword

0

be

1

af1

2

af2

3

af3

4

af4

5

ef

6

cs6

7

cs7

group 1: Specifies WRR group 1. Only WRR group 1 is supported in the current software version.

byte-count: Allocates bandwidth to queues in bytes.

weight: Allocates bandwidth to queues in packets.

schedule-value: Specifies a scheduling weight. The value range for this argument is 1 to 127.

Usage guidelines

You must use the qos wrr command to enable WRR queuing before you can configure WRR queuing parameters for a queue on an interface.

Examples

# Enable byte-count WRR queuing on HundredGigE 1/0/1, assign queue 0 to WRR group 1, and specify scheduling weight 10 for queue 0.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wrr byte-count

[Sysname-HundredGigE1/0/1] qos wrr 0 group 1 byte-count 10

Related commands

display qos queue wrr interface

qos wrr

qos wrr group sp

Use qos wrr group sp to assign a queue to the SP group.

Use undo qos wrr group sp to remove a queue from the SP group.

Syntax

qos wrr queue-id group sp

undo qos wrr queue-id

Default

All queues on a WRR-enabled interface are in WRR group 1.

Views

Interface view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.

Usage guidelines

This command is available only on a WRR-enabled interface. Queues in the SP group are scheduled with SP. The SP group has higher scheduling priority than the WRR groups.

You must use the qos wrr command to enable WRR queuing before you can configure this command on an interface.

Examples

# Enable WRR queuing on HundredGigE 1/0/1, and assign queue 0 to the SP group.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wrr weight

[Sysname-HundredGigE1/0/1] qos wrr 0 group sp

Related commands

display qos queue wrr interface

qos wrr

WFQ commands

display qos queue wfq interface

Use display qos queue wfq interface to display the WFQ configuration of an interface.

Syntax

display qos queue wfq interface [ interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the WFQ configuration of all interfaces.

Examples

# Display the WFQ configuration of HundredGigE 1/0/1.

<Sysname> display qos wfq interface hundredgige 1/0/1

Interface: HundredGigE1/0/1

 Output queue: Hardware Weighted Fair Queuing

 Queue ID        Queue name      Group           Byte count      Min Bandwidth

 --------------------------------------------------------------------------------

 0               be              1               1               64

 1               af1             1               1               64

 2               af2             1               1               64

 3               af3             1               1               64

 4               af4             1               1               64

 5               ef              1               1               64

 6               cs6             1               1               64

 7               cs7             1               1               64

Table 22 Command output

Field

Description

Interface

Interface type and interface number.

Output queue

Type of the current output queue.

Group

ID of the group that holds the queue.

Byte-count

Byte-count scheduling weight of the queue. N/A is displayed for a queue that uses the SP scheduling algorithm.

Weight

Packet-count queue scheduling weight of the queue. N/A is displayed for a queue that uses the SP scheduling algorithm.

Min Bandwidth

Minimum guaranteed bandwidth for the queue.

Related commands

qos wrr

qos bandwidth queue

Use qos bandwidth queue to set the minimum guaranteed bandwidth for a queue on an interface.

Use undo qos bandwidth queue to restore the default.

Syntax

qos bandwidth queue queue-id min bandwidth-value

undo qos bandwidth queue queue-id

Default

The minimum guaranteed bandwidth for a queue is 64 kbps.

Views

Interface view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.

min bandwidth-value: Sets the minimum guaranteed bandwidth in kbps. The value range for the bandwidth-value argument is 8 to 100000000 for 100-GE interfaces and 8 to 400000000 for 400-GE interfaces.

Usage guidelines

The minimum guaranteed bandwidth is the amount of bandwidth guaranteed for a queue when the interface is congested.

You must use the qos wfq command to enable WFQ before you can configure this command on an interface.

Examples

# Set the minimum guaranteed bandwidth to 100 kbps for queue 0 on HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wfq weight

[Sysname-HundredGigE1/0/1] qos bandwidth queue 0 min 100

Related commands

qos wfq

qos wfq

Use qos wfq to enable WFQ on an interface.

Use undo qos wfq to restore the default.

Syntax

qos wfq { byte-count | weight }

undo qos wfq { byte-count | weight }

Default

An interface uses SP queuing.

Views

Interface view

Predefined user roles

network-admin

Parameters

byte-count: Allocates bandwidth to queues in bytes.

weight: Allocates bandwidth to queues in packets.

Usage guidelines

You must use the qos wfq command to enable WFQ before you can configure WFQ queuing parameters for a queue on an interface.

Examples

# Enable packet-count WFQ on HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wfq weight

# Enable byte-count WFQ on HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wfq byte-count

Related commands

display qos queue wfq interface

qos wfq { byte-count | weight }

Use qos wfq { byte-count | weight } to assign a queue to a WFQ group with a certain scheduling weight.

Use undo qos wfq to restore the default.

Syntax

qos wfq queue-id group 1 { byte-count | weight } schedule-value

undo qos wfq queue-id

Default

All queues on a WFQ-enabled interface are in WFQ group 1 and have a weight of 1.

Views

Interface view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.

group 1: Specifies WFQ group 1. Only WFQ group 1 is supported in the current software version.

byte-count: Allocates bandwidth to queues in bytes.

weight: Allocates bandwidth to queues in packets.

schedule-value: Specifies a scheduling weight. The value range for this argument is 1 to 127.

Usage guidelines

You must use the qos wfq command to enable WFQ before you configure this command.

Examples

# Enable byte-count WFQ on HundredGigE 1/0/1, assign queue 0 to WFQ group 1, and specify scheduling weight 10 for queue 0.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wfq byte-count

[Sysname-HundredGigE1/0/1] qos wfq 0 group 1 byte-count 10

Related commands

display qos queue wfq interface

qos bandwidth queue

qos wfq

qos wfq group sp

Use qos wfq group sp to assign a queue to the SP group.

Use undo qos wfq group sp to remove a queue from the SP group.

Syntax

qos wfq queue-id group sp

undo qos wfq queue-id

Default

All queues on a WFQ-enabled interface are in WFQ group 1.

Views

Interface view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.

Usage guidelines

This command is available only on a WFQ-enabled interface. Queues in the SP group are scheduled with SP, instead of WFQ. The SP group has higher scheduling priority than the WFQ groups.

You must use the qos wfq command to enable WFQ before you configure this command.

Examples

# Enable WFQ on HundredGigE 1/0/1, and assign queue 0 to the SP group.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wfq weight

[Sysname-HundredGigE1/0/1] qos wfq 0 group sp

Related commands

display qos queue wfq interface

qos bandwidth queue

qos wfq

Queue scheduling profile commands

bandwidth queue

Use bandwidth queue to set the minimum guaranteed bandwidth for a queue.

Use undo bandwidth queue to restore the default.

Syntax

bandwidth queue queue-id min bandwidth-value

undo bandwidth queue queue-id

Default

The minimum guaranteed bandwidth for a queue is 64 kbps.

Views

Queue scheduling profile view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.

min bandwidth-value: Specifies the minimum guaranteed bandwidth in kbps. The value range for the bandwidth-value argument is 8 to 100000000.

Usage guidelines

You must configure a queue as a WFQ queue before you set the minimum guaranteed bandwidth for the queue.

The minimum guaranteed bandwidth is the amount of bandwidth guaranteed for a queue when the interface is congested.

Examples

# Configure queue 0 as a WFQ queue, and set the minimum guaranteed bandwidth to 100 kbps for queue 0.

<Sysname> system-view

[Sysname] qos qmprofile myprofile

[Sysname-qmprofile-myprofile] queue 0 wfq group 1 weight 1

[Sysname-qmprofile-myprofile] bandwidth queue 0 min 100

display qos qmprofile configuration

Use display qos qmprofile configuration to display the queue scheduling profile configuration.

Syntax

display qos qmprofile configuration [ profile-name ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

profile-name: Specifies a queue scheduling profile by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a queue scheduling profile, this command displays the configuration of all queue scheduling profiles.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Display the configuration of queue scheduling profile myprofile.

<Sysname> display qos qmprofile configuration myprofile

Queue scheduling profile: myprofile (ID 1)

 Queue ID  Type  Group   Schedule   Schedule  Min         Max

                         unit       value     bandwidth   bandwidth

 ---------------------------------------------------------------------

 be        SP    N/A     N/A        N/A       N/A         N/A

 af1       SP    N/A     N/A        N/A       N/A         N/A

 af2       SP    N/A     N/A        N/A       N/A         N/A

 af3       SP    N/A     N/A        N/A       N/A         N/A

 af4       SP    N/A     N/A        N/A       N/A         N/A

 ef        SP    N/A     N/A        N/A       N/A         N/A

 cs6       SP    N/A     N/A        N/A       N/A         N/A

 cs7       SP    N/A     N/A        N/A       N/A         N/A

Table 23 Command output

Field

Description

Queue management profile

Queue scheduling profile name.

Type

Queue scheduling type:

·     SP.

·     WRR.

·     WFQ.

Group

Priority group to which the queue belongs.

N/A indicates this field is ignored.

Schedule unit

Scheduling unit: weight or byte-count.

N/A indicates that this field is ignored.

Schedule value

This field indicates:

·     Number of packets for the weight scheduling unit.

·     Number of bytes for the byte-count scheduling unit.

N/A indicates that this field is ignored.

Min bandwidth

Minimum guaranteed bandwidth for the queue. N/A indicates that this field is ignored.

Max bandwidth

Maximum allowed bandwidth for the queue. N/A indicates that this field is ignored.

display qos qmprofile interface

Use display qos qmprofile interface to display the queue scheduling profile applied to an interface.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the queue scheduling profiles applied to all interfaces.

Examples

# Display the queue scheduling profile applied to HundredGigE 1/0/1.

<Sysname> display qos qmprofile interface hundredgige 1/0/1

Interface: HundredGigE1/0/1

Direction: Outbound

 Queue scheduling profile: myprofile

Table 24 Command output

Field

Description

Direction

Direction in which the queue scheduling profile is applied.

Queue scheduling profile

Name of the queue scheduling profile applied to the interface.

Related commands

qos apply qmprofile

qos apply qmprofile

Use qos apply qmprofile to apply a queue scheduling profile to the outbound direction of an interface.

Use undo qos apply qmprofile to restore the default.

Syntax

qos apply qmprofile profile-name

undo qos apply qmprofile

Default

No queue scheduling profile is applied to an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

profile-name: Specifies a queue scheduling profile by its name, a case-sensitive string of 1 to 31 characters.

Usage guidelines

You can apply only one queue scheduling profile to an interface.

Examples

# Apply queue scheduling profile myprofile to the outbound direction of HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos apply qmprofile myprofile

Related commands

display qos qmprofile interface

qos qmprofile

Use qos qmprofile to create a queue scheduling profile and enter its view, or enter the view of an existing queue scheduling profile.

Use undo qos qmprofile to delete a queue scheduling profile.

Syntax

qos qmprofile profile-name

undo qos qmprofile profile-name

Default

No user-created queue scheduling profiles exist.

Views

System view

Predefined user roles

network-admin

Parameters

profile-name: Specifies a name for the queue scheduling profile, a case-sensitive string of 1 to 31 characters.

Usage guidelines

To delete a queue scheduling profile already applied to an object, first remove it from the object.

Examples

# Create a queue scheduling profile named myprofile and enter queue scheduling profile view.

<Sysname> system-view

[Sysname] qos qmprofile myprofile

[Sysname-qmprofile-myprofile]

Related commands

display qos qmprofile interface

queue

queue

Use queue to configure queue scheduling parameters.

Use undo queue to delete queue scheduling parameter settings.

Syntax

queue queue-id{ sp | wfq group group-id { weight | byte-count } schedule-value | wrr group group-id { weight | byte-count } schedule-value }

undo queue queue-id

Default

All queues in a queue scheduling profile are SP queues.

Views

Queue scheduling profile view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.

sp: Enables SP for the queue.

wfq: Enables WFQ for the queue.

wrr: Enables WRR for the queue.

group group-id: Specifies a WFQ or WRR group by its ID. The group ID can only be 1.

byte-count: Allocates bandwidth to queues in bytes.

weight: Allocates bandwidth to queues in packets.

schedule-value: Specifies the scheduling weight. The value range for this argument is 1 to 127.

Examples

# Create a queue scheduling profile named myprofile, and configure queue 0 to use SP.

<Sysname> system-view

[Sysname] qos qmprofile myprofile

[Sysname-qmprofile-myprofile] queue 0 sp

# Create a queue scheduling profile named myprofile. Configure queue 1 to meet the following requirements:

·     The WRR queuing is used.

·     The WRR group is group 1.

·     The scheduling weight is 10.

<Sysname> system-view

[Sysname] qos qmprofile myprofile

[Sysname-qmprofile-myprofile] queue 1 wrr group 1 weight 10

Related commands

display qos qmprofile interface

qos qmprofile


Congestion avoidance commands

WRED commands

ai-ecn

Use ai-ecn to enter AI ECN view.

Syntax

ai-ecn

Views

AI service view

Predefined user roles

network-admin

Usage guidelines

To enable AI ECN, first enter AI service view and then enter AI ECN view.

Examples

# Enter AI ECN view.

<Sysname> system-view

[Sysname] ai-service

[Sysname-ai-service] ai-ecn

[Sysname-ai-service-ai-ecn ]

ai ai-ecn enable

Use ai ai-ecn enable to enable AI ECN and set the AI ECN mode.

Use undo ai ai-ecn enable to restore the default.

Syntax

ai ai-ecn enable mode { centralized | distributed }

undo ai ai-ecn enable

Default

AI ECN is disabled.

Views

AI service view

Predefined user roles

network-admin

Parameters

centralized: Specifies that the analyzer calculates the ECN triggering threshold and communicates it to devices.

distributed: Specifies that the device itself intelligently sets the optimal ECN triggering threshold.

Usage guidelines

This function enables the device to collect and send traffic characteristics to the AI service component on an analyzer or the local AI service component. The AI service component dynamically sets the optimal ECN triggering threshold for a queue to achieve low delay and high throughput.

After the device is rebooted, the ECN triggering thresholds set by the analyzer or AI service component are cleared.

Examples

# Enable AI ECN and set the AI ECN mode to centralized.

<Sysname> system-view

[Sysname] ai-service

[Sysname-ai-service] ai ai-ecn enable mode centralized

Related commands

queue (AI ECN view)

ai-service

Use ai-service to enter AI service view.

Syntax

ai-service

Views

System view

Predefined user roles

network-admin

Usage guidelines

To enable AI ECN, first enter AI service view and then enter AI ECN view.

Examples

# Enter AI service view.

<Sysname> system-view

[Sysname] ai-service

[Sysname-ai-service]

display qos wred ecn interface

Use display qos wred ecn interface to display the ECN configuration of an interface.

Syntax

display qos wred ecn interface [ interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the ECN configurations of all interfaces.

Examples

# Display the ECN configurations of all interfaces.

<Sysname> display qos wred ecn interface

Interface: GigabitEthernet1/0/1

 Queue ID: 0

   WRED ECN    : Enabled

   Delay ECN   : Enabled

     Threshold : 100               Queue length    : lt high-limit

   Dynamic ECN : Enabled

     Offset    : 100               Threshold floor : 200

 Queue ID: 1

   WRED ECN    : Enabled

    Delay ECN  : Enabled

     Threshold : 100               Queue length    : lt high-limit

   Dynamic ECN : Enabled

     Offset    : 100               Threshold floor : 200

 Queue ID: 7

   WRED ECN    : Enabled

    Delay ECN  : Enabled

     Threshold : 100               Queue length    : lt high-limit

   Dynamic ECN : Enabled

     Offset    : 100               Threshold floor : 200

Table 25 Command output

Field

Description

WRED ECN

ECN configuration in the qos wred queue command. If ECN is not enabled, this field displays a hyphen (-).

Delay ECN

Delay ECN configuration. If delay ECN is not configured, this field displays a hyphen (-).

Dynamic ECN

Dynamic ECN configuration. If dynamic ECN is not configured, this field displays a hyphen (-).

Threshold

Delay threshold for delay ECN.

Queue length

Queue length range for delay-based ECN. For the meaning of this field, see the operator limit1 [ limit2 ] parameter in the qos wred delay-ecn queue-length command.

Offset

Offset of the maximum available queue length for dynamic ECN.

Threshold floor

Minimum threshold for the queue length in dynamic ECN.

 

Related commands

qos wred queue

qos wred queue delay-ecn

qos wred queue dynamic-ecn

display qos wred interface

Use display qos wred interface to display the WRED information for interfaces.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the WRED information for all interfaces.

Examples

# Display the WRED information for all interfaces.

<Sysname> display qos wred interface

Interface: HundredGigE1/0/3

 Current WRED configuration:

 Applied WRED table name: q1

Table type: Queue based WRED

QID gmin     gmax     gpro ymin     ymax     ypro rmin     rmax     rpro exp ECN

--------------------------------------------------------------------------------

0   100      1000     10   100      1000     10   100      1000     10   9   N

1   100      1000     10   100      1000     10   100      1000     10   9   N

2   100      1000     10   100      1000     10   100      1000     10   9   N

3   100      1000     10   100      1000     10   100      1000     10   9   N

4   100      1000     10   100      1000     10   100      1000     10   9   N

5   100      1000     10   100      1000     10   100      1000     10   9   N

6   100      1000     10   100      1000     10   100      1000     10   9   N

7   100      1000     10   100      1000     10   100      1000     10   9   N

Table 26 Command output

Field

Description

Interface

Interface type and interface number.

Table type

Type of a WRED table.

QID

Queue ID.

gmin

Lower limit for green packets.

gmax

Upper limit for green packets.

gprob

Drop probability for green packets.

ymin

Lower limit for yellow packets.

ymax

Upper limit for yellow packets.

yprob

Drop probability for yellow packets.

rmin

Lower limit for red packets.

rmax

Upper limit for red packets.

rprob

Drop probability for red packets.

exp

Exponent for average queue length calculation.

ECN

Indicates whether ECN is enabled for the queue:

·     Y—Enabled.

·     N—Disabled.

Related commands

qos wred apply

display qos wred table

Use display qos wred table to display the WRED table configuration.

Syntax

display qos wred table [ name table-name ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

name table-name: Specifies a WRED table by its name, a case-sensitive string of 1 to 32 characters. If you do not specify a WRED table, this command displays the configuration of all WRED tables.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Display the configuration of WRED table 1.

<Sysname> display qos wred table name 1

Table name: 1

Table type: Queue based WRED

QID gmin     gmax     gpro ymin     ymax     ypro rmin     rmax     rpro exp ECN

--------------------------------------------------------------------------------

0   250      1000     10   250      1000     10   250      1000     10   9   N

1   250      1000     10   250      1000     10   250      1000     10   9   N

2   250      1000     10   250      1000     10   250      1000     10   9   N

3   250      1000     10   250      1000     10   250      1000     10   9   N

4   250      1000     10   250      1000     10   250      1000     10   9   N

5   250      1000     10   250      1000     10   250      1000     10   9   N

6   250      1000     10   250      1000     10   250      1000     10   9   N

7   250      1000     10   250      1000     10   250      1000     10   9   N

Table 27 Command output

Field

Description

Table name

Name of a WRED table.

Table type

Type of a WRED table.

QID

Queue ID.

gmin

Lower limit for green packets.

gmax

Upper limit for green packets.

gpro

Drop probability for green packets.

ymin

Lower limit for yellow packets.

ymax

Upper limit for yellow packets.

ypro

Drop probability for yellow packets.

rmin

Lower limit for red packets.

rmax

Upper limit for red packets.

rpro

Drop probability for red packets.

exp

Exponent for average queue length calculation.

ECN

Indicates whether ECN is enabled for the queue:

·     Y—Enabled.

·     N—Disabled.

qos wred apply

Use qos wred apply to apply a WRED table to an interface.

Use undo qos wred apply to restore the default.

Syntax

qos wred apply [ table-name ]

undo qos wred apply

Default

No WRED table is applied to an interface, and the tail drop mode is used on an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

table-name: Specifies a WRED table by its name, a case-sensitive string of 1 to 32 characters. If you do not specify a WRED table, this command applies the default WRED table to the interface.

Examples

# Apply WRED table table1 to HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wred apply table1

Related commands

display qos wred interface

display qos wred table

qos wred queue table

qos wred queue

Use qos wred queue to configure the WRED parameters for a queue.

Use undo qos wred queue to restore the default.

Syntax

qos wred queue queue-id low-limit low-limit high-limit high-limit [ discard-probability discard-prob ] [ ecn ] [ weighting-constant exponent ]

qos wred queue queue-id [ drop-level drop-level ] low-limit low-limit high-limit high-limit [ discard-probability discard-prob ]

undo qos wred queue { queue-id [ drop-level drop-level ] | all }

Default

No WRED parameters are configured.

Views

Interface view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.

low-limit low-limit: Specifies the lower limit for the average queue length. The value range for low-limit is 0 to 257862.

high-limit high-limit: Specifies the upper limit for the average queue length. The upper limit must be greater than the lower limit. The value range for high-limit is 0 to 257862.

discard-probability discard-prob: Specifies the denominator for drop probability calculation. The greater the denominator, the greater the calculated drop probability. The value range for discard-prob is 0 to 100.

ecn: Enables ECN.

weighting-constant exponent: Specifies the WRED exponent for average queue length calculation. The value range for exponent is 0 to 15.

drop-level drop-level: Specifies a drop level. This argument is a consideration for dropping packets. The value 0 corresponds to green packets, the value 1 corresponds to yellow packets, and the value 2 corresponds to red packets. If you do not specify a drop level, the subsequent configuration takes effect on the packets in the queue regardless of the drop level.

all: Specifies all queues.

Usage guidelines

When the average queue size is smaller than or equal to the lower threshold, no packet is dropped. When the average queue size is between the lower threshold and the upper threshold, the packets are dropped at random. The longer the queue is, the higher the drop probability is. When the average queue size is equal to the upper threshold, the packets are dropped according to the configured drop probability. When the average queue size exceeds the upper threshold, subsequent packets are dropped.

If you specify the high-limit high-limit and low-limit low-limit options and do not specify the discard-probability discard-prob option, the default drop probability is 10%.

Specifying the ecn keyword in this command has the same effect as executing the qos wred queue ecn command.

Specifying the weighting-constant exponent keyword in this command has the same effect as executing the qos wred queue weighting-constant command.

This command and the qos wred apply command are mutually exclusive.

Examples

# Configure the following WRED parameters for queue 1 on HundredGigE 1/0/1:

·     The drop level is 1.

·     The lower limit for the average queue length is 10.

·     The upper limit for the average queue length is 20.

·     The drop probability is 30%.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wred queue 1 drop-level 1 low-limit 10 high-limit 20 discard-probability 30

Related commands

display qos wred interface

qos wred queue ecn

qos wred queue ecn

Use qos wred queue ecn to enable ECN for a queue.

Use undo qos wred queue ecn to restore the default.

Syntax

qos wred queue queue-id ecn

undo qos wred queue queue-id ecn

Default

ECN is disabled for a queue.

Views

Interface view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.

Usage guidelines

When both the receiver and sender support ECN, the device can notify the peer end of the congestion status by identifying and setting the ECN flag. ECN avoids deteriorating congestion.

Executing this command has the same effect as specifying the ecn keyword in the qos wred queue command.

Examples

# Enable ECN for queue 1 on HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wred queue 1 ecn

Related commands

display qos wred interface

qos wred queue

qos wred queue table

Use qos wred queue table to create a WRED table and enter its view, or enter the view of an existing WRED table.

Use undo qos wred queue table to delete a WRED table.

Syntax

qos wred queue table table-name

undo qos wred queue table table-name

Default

No WRED tables exist.

Views

System view

Predefined user roles

network-admin

Parameters

table table-name: Specifies a name for the WRED table, a case-sensitive string of 1 to 32 characters.

Usage guidelines

You cannot delete a WRED table in use. To delete it, first remove it from the specified interface.

You can use the display qos wred table command to display the default WRED table, which cannot be modified or deleted.

Examples

# Create a queue-based WRED table named queue-table1.

<Sysname> system-view

[Sysname] qos wred queue table queue-table1

[Sysname-wred-table-queue-table1]

Related commands

display qos wred table

qos wred queue weighting-constant

Use qos wred queue weighting-constant to specify an exponent for average queue length calculation for a queue.

Use undo qos wred queue weighting-constant to restore the default.

Syntax

qos wred queue queue-id weighting-constant exponent

undo qos wred queue queue-id weighting-constant

Default

The exponent for average queue length calculation is 9 for a queue.

Views

Interface view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.

weighting-constant exponent: Specifies the WRED exponent for average queue length calculation. The value range for exponent is 0 to 15.

Usage guidelines

The bigger the exponent is, the less sensitive the average queue size is to real-time queue size changes. The average queue size is calculated using the formula:

Average queue size = previous average queue size × (1-2-n) + current queue size × 2-n,

where n can be configured with the qos wred weighting-constant command.

Executing this command has the same effect as specifying the weighting-constant exponent option in the qos wred queue command.

Examples

# Set the exponent for average queue length calculation to 12 for queue 1 on HundredGigE 1/0/1.

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] qos wred queue 1 weighting-constant 12

Related commands

display qos wred interface

qos wred queue

queue (AI ECN view)

Use queue to enable AI ECN for a queue.

Use undo queue to restore the default.

Syntax

queue queue-id enable

undo queue queue-id

Default

AI ECN is disabled for a queue.

Views

AI ECN view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7. 

Usage guidelines

This function enables the device to collect and send traffic characteristics to the AI service component on an analyzer or the local AI service component. The AI service component dynamically sets the optimal ECN triggering threshold for a queue to achieve low delay and high throughput.

This function is mutually exclusive with the following settings:

·     Applying a WRED table to an interface.

·     Configuring WRED parameters for a queue.

·     Setting the WRED exponent for average queue size calculation.

·     Enabling ECN for a queue.

After the device is rebooted, the ECN triggering thresholds set by the AI service component are cleared.

Examples

# Enable AI ECN for a queue 1.

<Sysname> system-view

[Sysname] ai-service

[Sysname-ai-service] ai-ecn

[Sysname-ai-service-ai-ecn] queue 1 enable

Related commands

qos wred apply

qos wred queue

qos wred queue ecn

qos wred queue weighting-constant

queue (WRED table view)

queue ecn

queue (WRED table view)

Use queue to configure the drop-related parameters for a queue in the queue-based WRED table.

Use undo queue to restore the default.

Syntax

queue queue-id [ drop-level drop-level ] low-limit low-limit high-limit high-limit [ discard-probability discard-prob ]

undo queue { queue-id [ drop-level drop-level ] | all }

Default

The lower limit is 100, the upper limit is 1000, and the drop probability denominator is 10.

Views

WRED table view

Predefined user roles

network-admin

Parameters

all: Specifies all queues.

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.

drop-level drop-level: Specifies a drop level. This argument is a consideration for dropping packets. The value 0 corresponds to green packets, the value 1 corresponds to yellow packets, and the value 2 corresponds to red packets. If you do not specify a drop level, the subsequent configuration takes effect on the packets in the queue regardless of the drop level.

low-limit low-limit: Specifies the lower limit for the average queue length. The value range for low-limit is 0 to 257862.

high-limit high-limit: Specifies the upper limit for the average queue length. The upper limit must be greater than the lower limit. The value range for high-limit is 0 to 257862.

discard-probability discard-prob: Specifies the denominator for drop probability calculation. The greater the denominator, the greater the calculated drop probability. The value range for discard-prob is 0 to 100.

 

Usage guidelines

When the average queue size is smaller than the lower threshold, no packet is dropped. When the average queue size is between the lower threshold and the upper threshold, the packets are dropped at random. The longer the queue is, the higher the drop probability is. When the average queue size exceeds the upper threshold, subsequent packets are dropped.

To use tail drop for a queue, set the lower limit and upper limit to the same value.

Examples

# In queue-based WRED table queue-table1, configure the following drop-related parameters for packets in queue 1:

·     The drop level is 1.

·     The lower limit for the average queue length is 10.

·     The upper limit for the average queue length is 20.

·     The drop probability is 30%.

<Sysname> system-view

[Sysname] qos wred queue table queue-table1

[Sysname-wred-table-queue-table1] queue 1 drop-level 1 low-limit 10 high-limit 20 discard-probability 30

Related commands

display qos wred table

qos wred queue table

queue ecn

Use queue ecn to enable ECN for a queue.

Use undo queue ecn to restore the default.

Syntax

queue queue-id ecn

undo queue queue-id ecn

Default

ECN is disabled for a queue.

Views

WRED table view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID in the range of 0 to 7.

Usage guidelines

When both the receiver and sender support ECN, the device can notify the peer end of the congestion status by identifying and setting the ECN flag. ECN avoids deteriorating congestion.

When the average queue size is above the upper threshold:

·     If the ECN field is 00, the packet comes from an ECN-incapable endpoint, and the congestion point drops the packet.

·     If the ECN field is 01 or 10, the packet comes from an ECN-capable endpoint, and the congestion point determines whether to modify the ECN field according to the drop probability and then forwards the packet. All packets will not be dropped.

·     If the ECN field is 11, the packet has experienced congestion along the transmission path, and the congestion point forwards the packet without modifying the ECN field.

Examples

# In WRED table queue-table1, enable ECN for queue 1.

<Sysname> system-view

[Sysname] qos wred queue table queue-table1

[Sysname-wred-table-queue-table1] queue 1 ecn

Related commands

display qos wred table

qos wred queue table

queue weighting-constant

Use queue weighting-constant to specify an exponent for average queue length calculation for a queue.

Use undo queue weighting-constant to restore the default.

Syntax

queue queue-id weighting-constant exponent

undo queue queue-id weighting-constant

Default

The exponent for average queue length calculation is 9.

Views

WRED table view

Predefined user roles

network-admin

Parameters

queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.

weighting-constant exponent: Specifies the WRED exponent for average queue length calculation. The value range for exponent is 0 to 15.

Usage guidelines

The bigger the exponent is, the less sensitive the average queue size is to real-time queue size changes. The average queue size is calculated using the formula:

Average queue size = previous average queue size × (1-2-n) + current queue size × 2-n,

where n can be configured with the qos wred weighting-constant command.

Examples

# In WRED table queue-table1, set the exponent for average queue length calculation to 12 for queue 1.

<Sysname> system-view

[Sysname] qos wred queue table queue-table1

[Sysname-wred-table-queue-table1] queue 1 weighting-constant 12

Related commands

display qos wred table

qos wred queue table


Traffic Matrix commands

display traffic-matrix

Use display traffic-matrix to display the flow tables of Traffic Matrix.

Syntax

display traffic-matrix [ ip | ipv6 ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ip: Specifies the IPv4 flow table. If you do not specify this keyword and the ipv6 keyword, the command displays both IPv4 and IPv6 flow tables.

ipv6: Specifies the IPv6 flow table. If you do not specify this keyword and the ip keyword, the command displays both IPv4 and IPv6 flow tables.

slot slot-number: Specifies the slot number of the device, which is fixed at 1.

Examples

# Display all statically configured flow entries.

<Sysname> display traffic-matrix

Slot : 0

--------------------------------------------------------------------------------

Protocol    : 17

SPort       : 4791               SIP     : 1.1.1.1

DPort       : 4791               DIP     : 2.2.2.2

Traffic path: GE1/0/1            Next hop: 1.1.1.2

Status      : Active             Reason  : -

 

Protocol    : 17

SPort       : -                  SIP     : 1.1.1.1

DPort       : -                  DIP     : 2.2.2.2

Traffic path: GE1/0/1            Next hop: 1.1.1.2

Status      : Inactive           Reason  : Interface down

 

Protocol    : -

SPort       : -                  SIP     : 1.1.1.1

DPort       : -                  DIP     : 2.2.2.2

Traffic path: GE1/0/1            Next hop: 1.1.1.2

Status      : Inactive           Reason  : Destination unreachable

--------------------------------------------------------------------------------

Slot : 1

--------------------------------------------------------------------------------

Protocol    : 17

SPort       : 4791               SIP     : 1.1.1.1

DPort       : 4791               DIP     : 2.2.2.2

Traffic path: GE1/0/1            Next hop: 1.1.1.2

Status      : Active             Reason  : -

 

Protocol    : 17

SPort       : -                  SIP     : 1.1.1.1

DPort       : -                  DIP     : 2.2.2.2

Traffic path: GE1/0/1            Next hop: 1.1.1.2

Status      : Inactive           Reason  : ARP/ND unreachable

 

Protocol    : -

SPort       : -                  SIP     : 1.1.1.1

DPort       : -                  DIP     : 2.2.2.2

Traffic path: GE1/0/1            Next hop: 1.1.1.2

Status      : Inactive           Reason  : Remote path failure

--------------------------------------------------------------------------------

Table 28 Command output

Field

Description

Protocol

Protocol number,

SPort

Source port number.

SIP

Source IP address.

DPort

Destination port number.

DIP

Destination IP address.

Traffic path

Output interface to which traffic is redirected.

Next hop

Next-hop address to which traffic is redirected.

Status

Effective state of a flow entry:

·     Active—The flow entry is effective.

·     Inactive—The flow entry is ineffective.

Reason

Reason why a flow entry fails to take effect:

·     Interface down—The output interface is down.

·     Destination Unreachable—The next-hop address is unreachable.

·     ARP/ND unreachable—The ARP or ND entry is unavailable.

·     Remote path failure—BGP detects a remote path failure.

·     Resource not enough—Resources are insufficient.

·     Not ready—The device driver is not ready. The device driver might be ready after a moment. You can execute the command later.

·     -—The flow entry takes effect.

Related commands

ip source destination

ipv6 source destination

ip source destination

Use ip source destination to configure an IPv4 flow entry for Traffic Matrix.

Use undo ip source destination to delete an IPv4 flow entry for Traffic Matrix.

Syntax

ip [ protocol protocol ] source source-address destination dest-address [ source-port port destination-port port ] traffic-path interface interface-type interface-number next-hop ip-address

undo ip [ protocol protocol ] source source-address destination dest-address [ source-port port destination-port port ]

Default

Traffic Matrix does not have an IPv4 flow entry.

Views

Traffic Matrix View

Predefined user roles

network-admin

Parameters

protocol protocol: Specify a protocol type by its number in the range of 0 to 255. If you do not specify a protocol type, any protocol type can be matched.

source source-address: Specifies a source IPv4 address.

destination dest-address: Specifies a destination IPv4 address.

source-port port: Specifies a source port in the range of 0 to 65535. If you do not specify a source port, any source port can be matched.

destination-port port: Specifies a destination port in the range of 0 to 65535. If you do not specify a destination port, any destination port can be matched.

traffic-path interface interface-type interface-number: Redirect matching traffic to the specified interface for forwarding.

next-hop ip-address: Redirects matching traffic to the specified next-hop IP address. The next-hop IP address can be an IPv4 address or an IPv6 address.

Usage guidelines

Operating mechanism

Use this command to redirect traffic to the specified output interface and next hop for forwarding. The redirected traffic must match the source address, destination address, source port number, destination port number, and protocol type specified in this command.

Restrictions and guidelines

Multiple IPv4 flow entries can be configured for Traffic Matrix. If you configure multiple IPv4 flow entries with the same 5-tuple, the most recent configuration takes effect.

In the Traffic Matrix feature, the source address, destination address, and next-hop address of an IPv4 flow entry must all be valid unicast addresses.

The Traffic Matrix feature regularly queries the routing table to identify whether the next-hop address specified in the ip source destination command is reachable in the routing table. If the next-hop address is unreachable, the ip source destination command will no longer be effective.

If the same flow can match multiple IPv4 flow entries in the Traffic Matrix feature, the priority order for IPv4 flow entries is as follows:

1.     The IPv4 flow entry that is configured with the 5-tuple has the highest priority.

2.     Other IPv4 flow entries are matched in their order of configuration. When a match is found, the matching process stops.

As a best practice to prevent the same flow from being forwarded through different paths before and after the device reboots or the interface flaps, do not configure two flow entries with the same source address and destination address and other overlapping match items. Suppose you configure one flow entry with a protocol, a source address, and a destination address, and the other flow entry with the same source address and destination address but without a protocol. The flow that can match the two entries might match different flow entries and is forwarded through different paths before and after the device reboots or the interface flaps.

Examples

# Configure an IPv4 flow entry.

<Sysname> system-view

[Sysname] traffic-matrix

[Sysname-traffic-matrix] ip protocol 80 source 1.1.1.1 destination 2.2.2.2 source-port 8080 destination-port 8080 traffic-path interface gigabitethernet 1/0/1 next-hop 3.3.3.3

Related commands

display traffic-matrix

ipv6 source destination

Use ipv6 source destination to configure an IPv6 flow entry for Traffic Matrix.

Use undo ipv6 source destination to delete an IPv6 flow entry.

Syntax

ipv6 [ protocol protocol ] source source-address destination dest-address [ source-port port destination-port port ] traffic-path interface interface-type interface-number next-hop ip-address

undo ipv6 [ protocol protocol ] source source-address destination dest-address [ source-port port destination-port port ]

Default

Traffic Matrix does not have an IPv6 flow entry.

Views

Traffic Matrix view

Predefined user roles

network-admin

Parameters

protocol protocol: Specifies a protocol type by its number in the range of 0 to 255. If you do not specify a protocol type, any protocol type can be matched.

source source-address: Specifies a source IPv6 address.

destination dest-address: Specifies a destination IPv6 address.

source-port port: Specifies a source port in the range of 0 to 65535. If you do not specify a source port, any source port can be matched.

destination-port port: Specifies a destination port in the range of 0 to 65535. If you do not specify a destination port, any destination port can be matched.

traffic-path interface interface-type interface-number: Redirects matching traffic to the specified interface for forwarding.

next-hop ip-address: Redirects matching traffic to the specified next-hop IP address. The next-hop IP address can be an IPv4 address or an IPv6 address.

Usage guidelines

Operating mechanism

Use this command to redirect traffic to the specified output interface and next hop for forwarding. The redirected traffic must match the source address, destination address, source port number, destination port number, and protocol type specified in this command.

Restrictions and guidelines

Multiple IPv6 flow entries can be configured for Traffic Matrix. If you configure multiple IPv6 flow entries with the same 5-tuple, the most recent configuration takes effect.

In the Traffic Matrix feature, the source address, destination address, and next-hop address in an IPv6 flow entry must all be valid unicast addresses.

The Traffic Matrix feature regularly queries the routing table to identify whether the next-hop address specified in the ipv6 source destination command is reachable in the routing table. If the next-hop address is unreachable, the ipv6 source destination command will no longer be effective.

If the same flow can match multiple IPv6 flow entries in the Traffic Matrix feature, the priority order for IPv6 flow entries is as follows:

1.     The IPv6 flow entry that is configured with the 5-tuple has the highest priority.

2.     Other IPv6 flow entries are matched in their order of configuration. When a match is found, the matching process stops.

 

As a best practice to prevent the same flow from being forwarded through different paths before and after the device reboots or the interface flaps, do not configure two flow entries with the same source address and destination address and other overlapping match items. Suppose you configure one flow entry with a protocol, a source address, and a destination address, and the other flow entry with the same source address and destination address but without a protocol. The flow that can match the two entries might match different flow entries and is forwarded through different paths before and after the device reboots or the interface flaps.

Examples

# Configure an IPv6 flow entry.

<Sysname> system-view

[Sysname] traffic-matrix

[Sysname-traffic-matrix] ipv6 protocol 80 source 1::1 destination 2::2 source-port 8080 destination-port 8080 traffic-path interface gigabitethernet 1/0/1 next-hop 3::3

Related commands

display traffic-matrix

traffic-matrix

Use traffic-matrix to enable the Traffic Matrix feature and enter Traffic Matrix view.

Use undo traffic-matrix to disable the Traffic Matrix feature and delete all its flow tables.

Syntax

traffic-matrix

undo traffic-matrix

Default

The Traffic Matrix feature is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Application scenarios

In scenarios where AI model training occurs in data center networks or intelligent lossless networks, there are fewer traffic flows, but each flow has long transmission time and large data volumes. When traffic load sharing is conducted using the hash algorithm through equal-cost multi-path (ECMP), load imbalance can easily occur. To address uneven traffic load, enable the Traffic Matrix feature. The controller, based on the 5-tuple, deploys flow entries to leaf or spine devices to redirect traffic. Traffic is redirected to the specified path for forwarding, thus achieving manually controlled load sharing.

Operating mechanism

Traffic Matrix flow entries can be statically configured or dynamically generated.

·     Static configuration—You can use the ipv6 source destination or ip source destination command to generate a Traffic Matrix flow entry. A flow that matches a flow entry is forwarded according to the specified output interface and next hop.

·     Dynamic generation—In adaptive routing scenarios, the device automatically collects network node congestion data and dynamically generates Traffic Matrix flow entries.

Restrictions and guidelines

Statically configured Traffic Matrix flow entries have higher priority than dynamically generated ones.

The device forwards traffic first according to the path defined in the flow table. If the defined path is invalid (for example, the output interface fails or the next hop is unreachable), the traffic is then forwarded by looking up the routing table.

Examples

# Enable the Traffic Matrix feature and enter Traffic Matrix view.

<Sysname> system-view

[Sysname] traffic-matrix

[Sysname-traffic-matrix]

Related commands

display traffic-matrix

ip source destination

ipv6 source destination

 


Elephant and mice flows distinguishing commands

elephant-flow action

Use elephant-flow action to configure an action to take on elephant flows.

Use undo elephant-flow action to restore the default.

Syntax

elephant-flow action { drop-precedence drop-precedence-value | dot1p dot1p-value | local-precedence local-precedence-value | none }

undo elephant-flow action

Default

No action is configured.

Views

Elephant/mice flow view

Predefined user roles

network-admin

Parameters

drop-precedence drop-precedence-value: Specifies a drop precedence value in the range of 0 to 2.

dot1p dot1p-value: Specifies an 802.1p priority value in the range of 0 to 7.

local-precedence local-precedence-value: Specifies a local precedence value in the range of 0 to 7.

none: Takes no action.

Examples

# Specify drop precedence 2 for elephant flows.

<Sysname> system-view

[Sysname] qos mice-elephant-flow

[Sysname-mice-elephant-flow] elephant-flow action drop-precedence 2

Related commands

elephant-flow rate

elephant-flow rate

Use elephant-flow rate to configure the traffic thresholds to identify elephant flows.

Use undo elephant-flow rate to remove traffic threshold settings.

Syntax

elephant-flow rate rate [ gbps | kbps | mbps ] [ size size [ bytes | kbytes | mbytes ] ]

undo elephant-flow rate

Default

No traffic thresholds are configured.

Views

Elephant/mice flow view

Predefined user roles

network-admin

Parameters

rate [ gbps | kbps | mbps ]: Specifies the traffic rate threshold in Gbps, kbps, or Mbps. The default unit is kbps. The value range for the rate argument is 1 to 1000.

size size [ bytes | kbytes | mbytes ]: Specifies the traffic size threshold in bytes, KB, or MB. The default unit is byte. The value range for the rate argument is 1 to 1000.

Usage guidelines

The device assigns the drop precedence value specified the elephant-flow action command to the identified elephant flows and keeps the drop precedence of mice flows unchanged. When congestion occurs, packets with a lower or no drop precedence are preferentially forwarded.

Examples

# Specify the traffic thresholds as 20 kbps and 100 KB for identifying elephant flows.

<Sysname> system-view

[Sysname] qos mice-elephant-flow

[Sysname-mice-elephant-flow] elephant-flow rate 20 kbps size 100 kbytes

Related commands

elephant-flow action

agile-buffer enable

Use agile-buffer enable to enable the flexible buffer for elephant and mice flows.

Use undo agile-buffer enable to disable the flexible buffer for elephant and mice flows.

Syntax

agile-buffer enable

undo agile-buffer enable

Default

The flexible buffer for elephant and mice flows is disabled.

Views

Elephant/mice flow view

Predefined user roles

network-admin

Usage guidelines

Prerequisites

For the flexible buffer for elephant and mice flows to take effect, you must configure the following features:

·     Enable the feature of distinguishing elephant and mice flows as follows:

a.     Execute the elephant-flow rate command to configure the parameters for identifying elephant flows.

b.     Execute the elephant-flow action command with the local-precedence keyword specified to configure the local precedence of elephant flows.

·     Create a flow group in mice-elephant-flow mode or apply a predefined flow group in mice-elephant-flow mode. For more information about flow groups in mice-elephant-flow mode, see flow group commands in Telemetry Command Reference

Application scenarios

The feature of distinguishing and scheduling elephant flows and mice flows statically configures parameters (for example, flow rate and size) to identify elephant flows in network traffic. Additionally, this feature specifies a lower drop priority, local priority, or 802.1p priority to these elephant flows. In the event of congestion, the device preferentially drops elephant flows based on the assigned priority to ensure fast forwarding of mice flows. The feature of distinguishing elephant and mice flows can partially resolve the issue that mice flows are blocked by elephant flows. However, in scenarios where the vast majority of traffic in the network contains mice flows or in scenarios of bursty traffic, the optimization effect of the elephant and mice flow distinguishing feature, which identifies flows through statically configured parameters, is not ideal. For example, in data center networks, where the majority of traffic contains mice flows that are more sensitive to delay. In the preceding scenarios, you can enable the flexible buffer for elephant and mice flows.

Operating mechanism

On the device, mice flow queues and elephant flow queues share a buffer space to schedule packets. This feature dynamically adjusts the size of the shared buffer space occupied by the mice flow queues and the elephant flow queues. When the network is congested and packets are dropped, the system dynamically reduces the upper limit of the shared buffer space available for elephant flow queues while ensuring high throughput of the elephant flows. In this case, the upper limit of the shared buffer space available for mice flow queues is increased, allowing the shared buffer space to accommodate as much mice flow traffic as possible, avoiding packet loss and reducing delay for mice flows. The device operates as follows after the flexible buffer for elephant and mice flows is enabled:

1.     By default, both the elephant flow queues and the mice flow queues use the tail-drop method to drop packets. In this case, when the length of either elephant flow queues or mice flow queues occupies the entire buffer space, all new packets entering the buffer space will be dropped.

2.     When the network is congested and packet loss occurs in the mice flow queues, the system triggers the flexible buffer feature for the elephant flows. In this case, the elephant flows use the WRED drop threshold. The system reduces the drop threshold of the elephant flow queues and uses the WRED method to drop elephant flow packets with a certain probability. As a result, the space for mice flow packets in the shared buffer increases.

3.     If the device still detects packet loss for mice flows after a certain detection period, this feature further lowers the WRED drop threshold for the elephant flow queues to increase the space for mice flow packets in the shared buffer.

4.     If no packet loss occurs in the mice flows during a detection period, this feature gradually restores the drop threshold of the elephant flow queues to the default tail drop method of the system.

Restrictions and guidelines

With this feature enabled, the system will dynamically set the WRED drop threshold (the lower limit of the queue length) for the elephant flow queues. Therefore, this feature conflicts with the statically configured WRED parameters or a WRED table applied on an interface. If you both configure this feature and configure static WRED parameters or apply a WRED table, the static WRED parameters or applied WRED table takes precedence.

Examples

# Enable the flexible buffer for elephant and mice flows.

<Sysname> system-view

[Sysname] qos mice-elephant-flow

[Sysname-mice-elephant-flow] agile-buffer enable

Related commands

elephant-flow action

elephant-flow rate

qos mice-elephant-flow

Use qos mice-elephant-flow to enter elephant/mice flow view.

Syntax

qos mice-elephant-flow

Views

System view

Predefined user roles

network-admin

Examples

# Enter elephant/mice flow view.

<Sysname> system-view

[Sysname] qos mice-elephant-flow

[Sysname-mice-elephant-flow]

 

 


Queue-based accounting commands

display qos queue-statistics interface outbound

Use display qos queue-statistics interface outbound to display outgoing traffic statistics collected for interfaces on a per-queue basis.

Syntax

display qos queue-statistics interface [ interface-type interface-number ] outbound

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the outgoing traffic statistics for all interfaces.

Examples

# Display queue-based outgoing traffic statistics of HundredGigE 1/0/1.

<Sysname> display qos queue-statistics interface hundredgige 1/0/1 outbound

Interface: HundredGigE1/0/1

 Direction: outbound

 Forwarded: 0 packets, 0 bytes

 Dropped: 1 packets, 1 bytes

 Queue 0

  Forwarded: 0 packets, 0 bytes, 0 pps, 0 bps

  Dropped: 0 packets, 0 bytes

  Current queue length: 0 packets

 Queue 7

  Forwarded: 0 packets, 0 bytes, 0 pps, 0 bps

  Dropped: 0 packets, 0 bytes

  Current queue length: 0 packets

Table 29 Command output

Field

Description

Interface

Interface for which queue-based traffic statistics are displayed.

Direction

Direction of traffic for which statistics are collected.

Forwarded

Counts forwarded traffic both in packets and in bytes.

Dropped

Counts dropped traffic both in packets and in bytes.

Current queue length

Current number of packets in the queue.

Related commands

reset counters interface (Interface Command Reference)

reset qos queue-statistics interface outbound

Use reset qos queue-statistics interface outbound to clear outgoing queue-based traffic statistics for an interface.

Syntax

reset qos queue-statistics interface [ interface-type interface-number ] outbound

Views

User view

Predefined user roles

network-admin

Parameters

interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command clears the outgoing queue-based traffic statistics for all interfaces.

Examples

# Clear the outgoing queue-based traffic statistics for all interfaces.

<Sysname> reset qos queue-statistics interface outbound

# Clear the outgoing queue-based traffic statistics for HundredGigE 1/0/1.

<Sysname> reset qos queue-statistics interface hundredgige 1/0/1 outbound

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us