09-ACL and QoS Command Reference

HomeSupportResource CenterRoutersH3C SR8800 Series RoutersH3C SR8800Technical DocumentsCommandCommand ReferenceH3C SR8800 Command Reference-Release3347-6W10309-ACL and QoS Command Reference
02-QoS Commands
Title Size Download
02-QoS Commands 348.42 KB

Contents

GTS and line rate configuration commands 1

GTS configuration commands 1

display qos gts interface· 1

qos gts 2

Line rate configuration commands 3

display qos lr interface· 3

qos lr 4

QoS policy configuration commands 1

Class configuration commands 1

display traffic classifier 1

if-match· 2

traffic classifier 5

Traffic behavior configuration commands 6

accounting· 6

car 7

display traffic behavior 8

filter 9

primap· 10

redirect 10

redirect-default 12

remark dot1p· 12

remark drop-precedence· 13

remark dscp· 13

remark ip-precedence· 15

remark local-precedence· 15

remark mpls-exp· 16

traffic behavior 17

QoS policy configuration and application commands 17

classifier behavior 17

display qos policy· 18

display qos policy interface· 19

display qos vlan-policy· 21

qos apply policy· 23

qos apply policy global 24

qos policy· 24

qos vlan-policy· 25

reset qos vlan-policy· 26

Hardware congestion management configuration commands 1

WFQ queuing configuration commands 1

display qos wfq interface· 1

qos bandwidth queue· 2

qos wfq weight 3

CBQ configuration commands 3

queue af 4

queue ef 4

queue wfq· 5

wred· 5

Priority mapping configuration commands 1

Priority mapping table configuration commands 1

display qos map-table· 1

qos map-table· 2

import 3

Port priority configuration commands 4

qos priority· 4

Priority trust mode configuration commands 5

display qos trust interface· 5

qos trust 6

Congestion avoidance configuration commands 1

WRED configuration commands 1

display qos wred interface· 1

WRED table configuration commands 2

display qos wred table· 2

qos wred table· 3

queue· 4

queue weighting-constant 4

qos wred apply· 5

Aggregation CAR configuration commands 1

car name· 1

display qos car name· 1

qos car aggregative· 2

reset qos car name· 3

Queue scheduling profile configuration commands 1

display qos qmprofile configuration· 1

display qos qmprofile interface· 2

qos apply qmprofile· 3

qos qmprofile· 3

queue· 4

QoS traffic accounting and per-port queue-based accounting configuration commands 1

QoS traffic accounting configuration commands 1

display qos traffic-counter 1

qos traffic-counter 3

reset qos traffic-counter 4

Per-port queue-based traffic statistics displaying command· 5

display qos queue-statistics interface· 5

 


 

 

NOTE:

In this documentation, SPC cards refer to the cards prefixed with SPC, for example, SPC-GT48L, and SPE cards refer to the cards prefixed with SPE, for example, SPE-1020-E-II.

 

GTS configuration commands

display qos gts interface

Syntax

display qos gts interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

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

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos gts interface command to view generic traffic shaping (GTS) configuration information on the specified interface or all the interfaces if no interface is specified.

Examples

# Display the GTS configuration information on GigabitEthernet 2/1/5.

<Sysname> display qos gts interface GigabitEthernet2/1/5

Interface: GigabitEthernet2/1/5

 Rule(s): If-match any

 CIR 160 (kbps), CBS 10240 (byte)

Table 1 Output description

Field

Description

Interface

Interface type and interface number

Rule(s)

Match criteria

CIR

Committed information rate (CIR) in kbps

CBS

Committed burst size in bytes, which specifies the depth of the token bucket for holding burst traffic

 

qos gts

Syntax

qos gts { any | queue queue } cir committed-information-rate [ cbs committed-burst-size ]

undo qos gts { any | queue queue }

View

Interface view, port group view

Default level

2: System level

Parameters

any: Shapes all packets.

queue queue-number: Shapes the packets in the queue identified by the queue-number argument. Low-speed CPOS interfaces do not support the queue keyword of this command. The queue-number argument can be a number or keyword, and the number-keyword mapping is shown in Table 2.

Table 2 Description on the queue argument

Keyword

Queue number (decimal)

af1

1

af2

2

af3

3

af4

4

be

0

cs6

6

cs7

7

ef

5

 

cir committed-information-rate: Committed information rate (CIR) in kbps. The value range for the CIR varies by interface type as follows:

·           On a GE interface, the CIR ranges from 300 to 1000000 kbps.

·           On a 10GE interface, the CIR ranges from 2500 to 10000000 kbps.

·           On a POS interface, the CIR ranges from 300 to 10000000 kbps.

·           On a serial port or MP interface, the CIR ranges from 40 to 1000000 kbps.

cbs committed-burst-size: Committed burst size (CBS) in bytes, which must be a multiple of 1024.

·           For interfaces except low-speed CPOS interfaces, CBS ranges from 4096 to 133169152 bytes and the default CBS value is the traffic transmitted at the rate of CIR in 500 ms.

·           For low-speed CPOS interfaces, CBS ranges from 1024 to 15360 bytes, and the default CBS value is 1024.

Description

Use the qos gts command to set GTS parameters for the packets in a queue.

Use the undo qos gts command to remove the GTS parameters for traffic in a queue or all traffic on an interface.

By default, no GTS parameters are configured on any interface.

Settings in interface view take effect on the current interface. Settings in port group view take effect on all interfaces in the port group.

Do not configure the qos lr command and the qos gts any command on the same interface or port group at the same time.

Examples

# Shape the traffic in queue af1 of interface GigabitEthernet 2/1/1, setting CIR to 640 kbps and CBS to 1024000 bytes.

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/1/1

[Sysname-GigabitEthernet2/1/1] qos gts queue af1 cir 640 cbs 1024000

Line rate configuration commands

display qos lr interface

Syntax

display qos lr interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

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

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays the lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos lr interface command to view the line rate configuration information on a specified interface or all the interfaces.

If no interface is specified, this command displays the line rate configuration information on all the interfaces.

With line rate enabled on an interface, this command can display the line rate configuration information of the interface regardless of the interface state (up or down).

Examples

# Display the line rate configuration information on interface GigabitEthernet 2/1/5.

<Sysname> display qos lr interface GigabitEthernet2/1/5

Interface: GigabitEthernet2/1/5

 Direction: Outbound

 CIR 300 (kbps), CBS 18750 (byte)

Table 3 Output description

Field

Description

Interface

Interface type and interface number

Direction

The direction in which the line rate configuration is applied: inbound or outbound

CIR

Committed information rate (CIR) in kbps

CBS

Committed burst size (CBS) in bytes, which specifies the depth of the token bucket for holding bursty traffic

 

qos lr

Syntax

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

undo qos lr outbound

View

Interface view, port group view, subinterface view

Default level

2: System level

Parameters

outbound: Limits the rate of outgoing packets on the interface.

cir committed-information-rate: Committed information rate (CIR) in kbps. For interfaces except low-speed CPOS interfaces, this argument ranges from 300 to 1000000. For low-speed CPOS interfaces, this argument ranges from 40 to 1000000.

cbs committed-burst-size: Committed burst size (CBS) in bytes, which must be a multiple of 1024. For interfaces except low-speed CPOS interfaces, this argument ranges from 4096 to 133169152, and defaults to the traffic transmitted at the rate of CIR in 500 ms. For low-speed CPOS interfaces, this argument ranges from 1024 to 15360, and default to 1024.

Description

Use the qos lr command to limit the rate of outgoing packets on the interface.

Use the undo qos lr command to remove the rate limit.

By default, no line rate is configured on an interface.

Settings in interface view are effective on the current interface. Settings in port group view are effective on all ports in the port group.

 

 

NOTE:

·       This command is available for the interfaces on the subcards PIC-GP10L, PIC-GP20R, and PIC-GT20R.

·       Do not configure the qos lr command and the qos gts any command on the same interface or port group at the same time.

·       The first time you configure the qos lr, qos gts any, queue ef bandwidth, queue af bandwidth, queue wfq, or remark local-precedence command for a subinterface, you must use the undo qos lr and undo qos gts any commands to disable line rate and GTS on the main interface if none of these commands is configured on any other subinterfaces.

 

Examples

# Limit the rate of outgoing packets on interface GigabitEthernet 2/1/1, with CIR 640 kbps and CBS 1024000 bytes.

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/1/1

[Sysname-GigabitEthernet2/1/1] qos lr outbound cir 640 cbs 1024000

 


Class configuration commands

display traffic classifier

Syntax

display traffic classifier user-defined [ tcl-name ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

user-defined: Displays user-defined classes.

tcl-name: Class name, which is a string of 1 to 31 characters.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display traffic classifier command to display class information.

If no class name is specified, information about all user-defined classes is displayed.

Examples

# Display information about all user-defined classes.

<Sysname> display traffic classifier user-defined

User Defined Classifier Information:

 Classifier: USER1

  Operator: AND

  Rule(s) : if-match ip-precedence 5

 

 Classifier: database

  Operator: AND

  Rule(s) : if-match acl 3131

Table 4 Output description

Field

Description

User Defined Classifier Information

User-defined class information

Classifier

Class name and its match criteria

Operator

Logical relationship between match criteria

Rule(s)

Match criteria

 

if-match

Syntax

if-match match-criteria

undo if-match match-criteria

View

Class view

Default level

2: System level

Parameters

match-criteria: Match criterion. Table 5 shows the available criteria.

Table 5 Available settings for the match-criteria argument

Value

Description

acl [ ipv6 ] { acl-number | name acl-name }

Matches an ACL.

The acl-number argument ranges from 2000 to 4999 for an IPv4 ACL, and 2000 to 3999 for an IPv6 ACL.

The acl-name argument is a case-insensitive string of 1 to 32 characters, which must start with an English letter from a to z or A to Z and cannot be all to avoid confusion.

customer-dot1p 8021p-list

Matches the 802.1p priority of the customer network.

The 8021p-list argument is a list of up to eight 802.1p priority values. An 802.1p priority is in the range 0 to 7.

customer-vlan-id { vlan-id-list | vlan-id1 to vlan-id2 }

Matches the VLAN IDs of customer networks.

The vlan-id-list argument is a list of up to eight VLAN IDs. The vlan-id1 to vlan-id2 specifies a VLAN ID range, where the vlan-id1 must be smaller than the vlan-id2. A VLAN ID ranges from 1 to 4093.

destination-mac mac-address

Matches a destination MAC address.

dscp dscp-list

Matches DSCP values.

The dscp-list argument is a list of up to eight DSCP values. A DSCP value is in the range 0 to 63.

ip-precedence ip-precedence-list

Matches IP precedence.

The ip-precedence-list argument is a list of up to eight IP precedence values. An IP precedence ranges from 0 to 7.

mpls-exp exp-list

Matches MPLS EXP values.

The exp-list argument is a list of up to eight EXP values. An EXP value ranges from 0 to 7.

mpls-label { label-value-list | label-value1 to label-value2 }

Matches MPLS labels.

The label-value-list argument specifies a list of up to eight MPLS label values. label-value1 to label-value2 specifies an MPLS label value range, where label-value1 must be smaller than label-value2. An MPLS label value ranges from 1 to 1048575.

protocol protocol-name

Matches the specified protocol.

The protocol-name argument can be IP or IPv6.

second-mpls-exp exp-list

Matches inner MPLS EXP values.

The exp-list argument is a list of up to eight EXP values. An EXP value ranges from 0 to 7.

second-mpls-label { label-value-list | label-value1 to label-value2 }

Matches inner MPLS labels.

The label-value-list argument specifies a list of up to eight MPLS label values. label-value1 to label-value2 specifies an MPLS label range, where label-value1 must be smaller than label-value2. An MPLS label ranges from 1 to 1048575.

service-dot1p 8021p-list

Matches the 802.1p priority of the service provider network.

The 8021p-list argument is a list of up to eight 802.1p priority values. An 802.1p priority is in the range 0 to 7.

service-vlan-id { vlan-id-list | vlan-id1 to vlan-id2 }

Matches the VLAN IDs of SP networks.

The vlan-id-list argument is a list of up to eight VLAN IDs. The vlan-id1 to vlan-id2 specifies a VLAN ID range, where the vlan-id1 must be smaller than the vlan-id2. A VLAN ID ranges from 1 to 4093.

source-mac mac-address

Matches a source MAC address.

 

Description

Use the if-match command to define a match criterion.

Use the undo if-match command to remove a match criterion.

1.      Define an ACL-based match criterion

·           If the ACL referenced in the if-match command does not exist, the class cannot be applied to hardware.

·           For a class, you can reference an ACL twice by its name and number respectively with the if-match command.

2.      Define a criterion to match a destination MAC address

·           If this command is executed multiple times for a class, the new configuration does not overwrite the previous one.

·           A criterion to match a destination MAC address is significant only to Ethernet interfaces.

3.      Define a criterion to match a source MAC address

·           If this command is executed multiple times for a class, the new configuration does not overwrite the previous one.

·           A criterion to match a source MAC address is significant only to Ethernet interfaces.

4.      Define a criterion to match DSCP precedence values

·           If this command is executed multiple times for a class, the new configuration does not overwrite the previous one. After such a command is configured, all the DSCP values are arranged in ascending order automatically.

·           You can configure up to eight DSCP values in one command line. If multiple identical DSCP values are specified, the system considers them as one. The relationship between different DSCP values is OR. If a packet matches one of the defined DSCP values, it is considered as matching the if-match clause.

·           To delete a rule matching DSCP values, the specified DSCP values must be identical with those defined in the rule (sequence may be different).

5.      Define a criterion to match IP precedence values

·           If this command is executed multiple times in a class, the new configuration does not overwrite the previous one. When such a command is configured, the IP precedence values are arranged automatically in ascending order.

·           You can configure up to eight IP precedence values in one command line. If the same IP precedence is specified multiple times, the system considers them as one. The relationship between different IP precedence values is OR. If a packet matches one of the defined IP precedence values, it is considered as matching the if-match clause.

·           To delete a criterion matching IP precedence values, the specified IP precedence values in the command must be identical with those defined in the criterion (sequence may be different).

6.      Define a criterion to match customer network VLAN IDs or service provider network VLAN IDs

·           If this command is executed multiple times in a class, the new configuration does not overwrite the previous one. After such a command is configured, all the VLAN IDs are arranged in ascending order automatically.

·           You can configure multiple VLAN IDs in one command line. If the same VLAN ID is specified multiple times, the system considers them as one. The relationship between different VLAN IDs is logical OR. If a packet matches one of the defined VLAN IDs, it is considered as matching the if-match clause.

·           To delete a criterion matching VLAN IDs, the specified VLAN IDs in the command must be identical with those defined in the criterion (sequence may be different).

7.      Defining a criterion to match MPLS EXP values

·           You can configure multiple MPLS EXP match criteria for a class. The defined MPLS EXP values are automatically arranged in ascending order.

·           You can configure up to eight MPLS EXP values in one command line. If the same MPLS EXP value is specified multiple times, the system considers them as one. If a packet matches one of the defined MPLS EXP values, it matches the if-match clause.

·           To delete a criterion that matches MPLS EXP values, the specified MPLS EXP values in the command must be identical with those defined in the criterion (the sequence may be different).

·           The MPLS EXP field exists only in MPLS packets, so this match criterion takes effect for only the MPLS packets.

8.      Defining a criterion to match MPLS labels

·           You can configure multiple MPLS label match criteria for a class. The defined MPLS labels are automatically arranged in ascending order.

·           You may configure multiple MPLS label values in one command. If the same MPLS label value is specified multiple times, the system considers them as one. If a packet matches one of the defined MPLS label values, it matches the if-match clause.

·           To delete a criterion that matches MPLS label values, the specified MPLS label values in the command must be identical with those defined in the criterion (the sequence may be different).

Related commands: traffic classifier.

Examples

# Define a match criterion for class class1 to match the packets with the destination MAC address 0050-BA27-BED3.

<Sysname> system-view

[Sysname] traffic classifier class1

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

# Define match criteria for class class2 to match the packets that have the source MAC address 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 class class1 to match the packets with a DSCP precedence of 1, 6 or 9.

<Sysname> system-view

[Sysname] traffic classifier class1

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

# Define a match criterion for class class1 to match the packets with customer network VLAN ID 1, 6, or 9.

<Sysname> system-view

[Sysname] traffic classifier class1

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

traffic classifier

Syntax

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

undo traffic classifier tcl-name

View

System view

Default level

2: System level

Parameters

tcl-name: Class name, a string of 1 to 31 characters.

operator: Sets the operator to logic AND or OR for the class.

and: Specifies the relationship between the match criteria in the class as logic AND, which means that the packets that match all the criteria belong to this class.

or: Specifies the relationship between the criteria in the class as logic OR, which means that the packets that match any of the criteria belong to this class.

Description

Use the traffic classifier command to define a class and enter class view.

Use the undo traffic classifier command to remove a class.

By default, the relationship between match criteria in a class is and, and the relationship between match criteria is logical AND.

Related commands: qos policy, qos apply policy, and classifier behavior.

Examples

# Define class class1.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1]

Traffic behavior configuration commands

accounting

Syntax

accounting [ byte | packet ]

undo accounting

View

Traffic behavior view

Default level

2: System level

Parameters

byte: Counts traffic in bytes.

packets: Counts traffic in packets. With this keyword specified, the CAR also counts traffic in packets.

Description

Use the accounting command to enable traffic accounting for the traffic behavior.

Use the undo accounting command to disable traffic accounting.

View the related statistics with the display qos policy interface command or the display qos vlan-policy command.

1.      On an SPE card

For packets forwarded at Layer 3, such as IPv4/IPv6 unicast packets, multicast packets, tunnel packets, and L3VPN incoming tunnel packets, the accounting command only takes the IP header and payload into account. Take 128-byte Layer-3 packets for example. The traffic size is calculated following these formulae:

¡  When the incoming port and the outgoing port are Ethernet interfaces and the packets are untagged:

Traffic size = the number of packets × (128 bytes of packet length – 4 bytes of CRC – 14 bytes of Layer-2 header)

¡  When the incoming port and the outgoing port are POS interfaces:

Traffic size = the number of packets × (128 bytes of packet length– 4 bytes of CRC – 4 bytes of Layer-2 header)

2.      On an SPC card

The accounting command takes the total packet length into account.

Related commands: qos policy, traffic behavior, and classifier behavior.

Examples

# Enable traffic accounting for traffic behavior database.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] accounting

car

Syntax

car cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ pir peak-information-rate ] [ red { discard | pass } ]

undo car

View

Traffic behavior view

Default level

2: System level

Parameters

cir committed-information-rate: Committed information rate (CIR) in kbps, in the range of 64 to 10000000.

cbs committed-burst-size: Committed burst size (CBS) in bytes, in the range of 1875 to 1000000000. By default, CBS is the traffic size that can be transmitted at the rate of CIR over 500 ms.

ebs excess-burst-size: Excess burst size (EBS) in bytes, in the range of 0 to 1000000000. The default is 0.

pir peak-information-rate: Peak information rate (PIR) in kbps, in the range of 64 to 10000000.

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

·           discard: Drops the packets.

·           pass: Permits the packets to pass through.

Description

Use the car command to configure a CAR action for the traffic behavior.

Use the undo car command to remove a CAR action from the traffic behavior.

A QoS policy that references the behavior can be applied in either the inbound direction or the outbound direction of an interface.

If this command is configured multiple times for the same traffic behavior, the last configuration takes effect.

Related commands: qos policy, traffic behavior, and classifier behavior.

1.      On an SPE card

For packets forwarded at Layer 3, such as IPv4/IPv6 unicast packets, multicast packets, tunnel packets, and L3VPN incoming tunnel packets, CAR only takes the IP header and payload into account. The port rate parameters configured in the car command are transformed into the theoretical output rate following these formulae (take 128-byte Layer-3 packets for example, and assume that the rate is set to 10000 kbps):

¡  When the incoming port and the outgoing port are Ethernet interfaces and the packets are untagged, the theoretical outgoing interface rate is calculated following this formula:

10000 kbps × 128 bytes/(128 bytes of packet length – 4 bytes of CRC – 14 bytes of Layer-2 header)

¡  When the incoming port and the outgoing port are POS interfaces, the theoretical outgoing interface rate is calculated following this formula:

10000 kbps × 128 bytes/(128 bytes of packet length – 4 bytes of CRC – 4 bytes of Layer-2 header)

2.      On an SPC card

The configured rate is the same as the theoretical output rate.

Examples

# Configure a CAR action for traffic behavior database, setting CIR to 200 kbps and CBS to 50000 bytes, and dropping the packets not conforming to CIR.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] car cir 200 cbs 50000 red discard

display traffic behavior

Syntax

display traffic behavior user-defined [ behavior-name ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

user-defined: Displays user-defined traffic behaviors.

behavior-name: Behavior name, a string of 1 to 31 characters. If no traffic behavior is specified, the information of all the user-defined behaviors is displayed.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display traffic behavior command to display traffic behavior information.

Examples

# Display user-defined traffic behaviors.

<Sysname> display traffic behavior user-defined

  User Defined Behavior Information:

    Behavior: ben

      Mirror enable:

        Mirror type: vlan

        Mirror destination: 23

    Behavior: 23

      Mirror enable:

        Mirror type: vlan

        Mirror destination: 25

filter

Syntax

filter { deny | permit }

undo filter

View

Traffic behavior view

Default level

2: System level

Parameters

deny: Drops packets.

permit: Permits packets to pass through.

Description

Use the filter command to configure a traffic filtering action for the traffic behavior.

Use the undo accounting command to remove the traffic filtering action.

Examples

# Configure the traffic filtering action as deny for traffic behavior database.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] filter deny

primap

Syntax

primap { pre-defined { color { up-dot1p | up-dscp | up-exp | up-lp } | dscp-dscp } | color-map-dp }

undo primap { pre-defined { color { up-dot1p | up-dscp | up-exp | up-lp } | dscp-dscp } | color-map-dp }

View

Traffic behavior view

Default level

2: System level

Parameters

pre-defined: Pre-defined priority mapping table.

up-dot1p: User-to-802.1p priority mapping table.

up-dscp: User-to-DSCP priority mapping table.

up-exp: User-to-EXP priority mapping table.

up-lp: User-to-local priority mapping table.

dscp-dscp: DSCP-to-DSCP priority mapping table.

color-map-dp: Packet-color-to-drop priority mapping table.

Description

Use the primap command to configure the action of mapping source precedence to target precedence through the specified priority mapping table for the traffic behavior.

Use the undo primap pre-defined command to remove the action.

If the primap command is configured with the color up-dot1p, color up-dscp, color up-exp, color up-lp, or color-map-dp keyword in a behavior, you must also configure the car command in the behavior.

Related commands: display qos map-table.

Examples

# Specify a DSCP-to-DSCP priority mapping table for traffic behavior behavior1.

<Sysname> system-view

[Sysname] traffic behavior behavior1

[Sysname-behavior-behavior1] primap pre-defined dscp-dscp

redirect

Syntax

redirect { cpu | interface interface-type interface-number | next-hop { ipv4-add1 [ track track-entry-number ] [ ipv4-add2 [ track track-entry-number ] ] | ipv6-add1 [ interface-type interface-number ] [ track track-entry-number ] [ ipv6-add2 [ interface-type interface-number ] [ track track-entry-number ] ] } [ fail-action { discard | forward } ] | vpn-instance vpn-instance-name }

undo redirect { cpu | interface interface-type interface-number | next-hop | vpn-instance }

View

Traffic behavior view

Default level

2: System level

Parameters

cpu: Redirects traffic to the CPU.

next-hop: Redirects traffic to a next hop. On an SPC card, the next hop can be any address on the network. On an SPE card, the next hop must be a directly-connected address.

interface: Redirects traffic to an interface.

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

ipv4-add1/ipv4-add2: IPv4 address of the next hop. The ipv4-add2 argument backs up ipv4-add1. If redirecting traffic to ipv4-add1 fails, traffic will be redirected to ipv4-add2.

ipv6-add1/ipv6-add2: IPv6 address of the next hop. The ipv6-add2 argument backs up ipv6-add1. If redirecting traffic to ipv6-add1 fails, traffic will be redirected to ipv6-add2. Traffic cannot be redirected to a link-local address. If the IPv6 address is not a link-local address, you do not need to specify an interface for the IPv6 address of the next hop.

track track-entry-number: Specifies the track entry associated with the next hop. For different IP addresses, specify different track entries. The track-entry-number argument ranges from 1 to 1024. By specifying track entries, you can enable the traffic redirecting action to collaborate with the tracking modules, such as NQA and BFD. For more information about tracking modules, see High Availability Configuration Guide.

fail-action { discard | forward }: Specifies the action to take when the next hop address for a packet does not exist.

·           discard: Drops the packet.

·           forward: Forwards the packet. This action applies if no fail-action is specified.

vpn-instance vpn-instance-name: Redirects traffic to the VPN instance specified by the vpn-instance-name argument. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters.

Description

Use the redirect command to configure a traffic redirecting action for the traffic behavior.

Use the undo redirect command to remove the traffic redirect action.

The actions of redirecting traffic to CPU, redirecting traffic to an interface, redirecting traffic to the next hop, and redirecting traffic to a VPN instance are mutually exclusive with each other in the same traffic behavior.

 

CAUTION

CAUTION:

If the outgoing interface for the redirected traffic is bound to a NAT virtual interface, packets are sent to the L3 NAT card, and QoS redirection failure occurs.

 

Examples

# Configure the action of redirecting traffic to the CPU for traffic behavior database.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] redirect cpu

redirect-default

Syntax

redirect-default next-hop ipv4-add1 [ track track-entry-number ] [ ipv4-add2 [ track track-entry-number ] ]

undo redirect-default next-hop

View

Traffic behavior view

Default level

2: System level

Parameters

next-hop: Redirects traffic to a next hop.

ipv4-add1/ipv4-add2: IPv4 address of the next hop. The ipv4-add2 argument specifies the backup of ipv4-add1. If redirect to ipv4-add1 fails, traffic will be redirected to ipv4-add2.

track track-entry-number: Specifies the track entry associated with the next hop. For different IP addresses, specify different track entries. The track-entry-number argument ranges from 1 to 1024. By specifying track entries, you can enable the traffic redirecting action to collaborate with the tracking modules, such as NQA and BFD. For detailed information about tracking modules, see High Availability Configuration Guide.

Description

Use the redirect-default command to configure the default traffic redirecting action.

Use the undo redirect-default command to remove the default traffic redirecting action.

Examples

# Configure the default traffic redirecting action as redirecting traffic to next hop 1.1.1.1.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] redirect-default next-hop 1.1.1.1

remark dot1p

Syntax

remark dot1p 8021p

undo remark dot1p

View

Traffic behavior view

Default level

2: System level

Parameters

8021p: 802.1p priority to be marked for packets, in the range of 0 to 7.

Description

Use the remark dot1p command to configure the action of setting the specified 802.1p priority for packets.

Use the undo remark dot1p command to remove the action.

Related commands: qos policy, traffic behavior, and classifier behavior.

Examples

# Set the 802.1p priority to 2.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark dot1p 2

remark drop-precedence

Syntax

remark drop-precedence drop-precedence-value

undo remark drop-precedence

View

Traffic behavior view

Default level

2: System level

Parameters

drop-precedence-value: Drop precedence to be marked for packets, in the range of 0 to 2.

Description

Use the remark drop-precedence command to configure the action of setting the specified drop precedence for packets.

Use the undo remark drop-precedence command to remove the action.

Related commands: qos policy, traffic behavior, and classifier behavior.

Examples

# Set the drop precedence to 2 for packets.

<Sysname> system-view

[Sysname] traffic behavior database

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

remark dscp

Syntax

remark dscp dscp-value

undo remark dscp

View

Traffic behavior view

Default level

2: System level

Parameters

dscp-value: DSCP value, in the range of 0 to 63 or a keyword, as shown in Table 6.

Table 6 DSCP keywords and values

Keyword

DSCP value (binary)

DSCP value (decimal)

default

000000

0

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

ef

101110

46

 

Description

Use the remark dscp command to configure the action of setting the specified DSCP value for packets.

Use the undo remark dscp command to remove the action.

Related commands: qos policy, traffic behavior, and classifier behavior.

Examples

# Set the DSCP value of packets to 6.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark dscp 6

remark ip-precedence

Syntax

remark ip-precedence ip-precedence-value

undo remark ip-precedence

View

Traffic behavior view

Default level

2: System level

Parameters

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

Description

Use the remark ip-precedence command to configure the action of setting the specified IP precedence for packets.

Use the undo remark ip-precedence command to remove the action.

With this command configured, the low-order three bits of the DSCP field of an IP packet will be set to 0.

Related commands: qos policy, traffic behavior, and classifier behavior.

Examples

# Set the IP precedence of packets to 6.

<Sysname> system-view

[Sysname] traffic behavior database

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

remark local-precedence

Syntax

remark local-precedence local-precedence

undo remark local-precedence

View

Traffic behavior view

Default level

2: System level

Parameters

local-precedence: Local precedence value to be marked for packets, which can be a number or keyword. The number-keyword mapping is shown in Table 7.

Table 7 Description on the local-precedence argument

Keyword

Local precedence value (decimal)

af1

1

af2

2

af3

3

af4

4

be

0

cs6

6

cs7

7

ef

5

 

Description

Use the remark local-precedence command to configure the action of setting the specified local precedence for packets.

Use the undo remark local-precedence command to remove the action.

Related commands: qos policy, traffic behavior, and classifier behavior.

Examples

# Set the local precedence of packets to 2.

<Sysname> system-view

[Sysname] traffic behavior database

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

remark mpls-exp

Syntax

remark mpls-exp exp-value

undo remark mpls-exp

View

Traffic behavior view

Default level

2: System level

Parameters

exp-value: EXP value to be marked for MPLS packets, in the range of 0 to 7.

Description

Use the remark mpls-exp command to configure the action of setting the specified EXP value for MPLS packets.

Use the undo remark mpls-exp command to remove the action.

This command can change the EXP values only when this command is used in the inbound direction and IP packets are configured to enter MPLS tunnels.

With this command configured, the IP precedence value of an IP packet will be changed, and the low-order three bits of the DSCP field of the IP packet will be set to 0.

Related commands: qos policy, traffic behavior, and classifier behavior.

Examples

# Set the EXP value of MPLS packets to 2.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark mpls-exp 2

traffic behavior

Syntax

traffic behavior behavior-name

undo traffic behavior behavior-name

View

System view

Default level

2: System level

Parameters

behavior-name: Behavior name, a string of 1 to 31 characters.

Description

Use the traffic behavior command to create a traffic behavior and enter traffic behavior view.

Use the undo traffic classifier command to remove a traffic behavior.

Related commands: qos policy, qos apply policy, and classifier behavior.

Examples

# Create traffic behavior behavior1.

<Sysname> system-view

[Sysname] traffic behavior behavior1

[Sysname-behavior-behavior1]

QoS policy configuration and application commands

classifier behavior

Syntax

classifier tcl-name behavior behavior-name

undo classifier tcl-name

View

Policy view

Default level

2: System level

Parameters

tcl-name: Class name, a string of 1 to 31 characters.

behavior-name: Behavior name, a string of 1 to 31 characters.

Description

Use the classifier behavior command to specify a behavior for a class in the policy.

Use the undo classifier command to remove a class from the policy.

Each class in the policy can be associated with only one behavior.

If the class and traffic behavior specified for the command do not exist, the system creates a null class and a null traffic behavior.

Related commands: qos policy.

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

display qos policy

Syntax

display qos policy user-defined [ policy-name [ classifier tcl-name ] ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

user-defined: Displays user-defined QoS policies.

policy-name: Displays information about the QoS policy. If no policy is specified, the configuration information of all the policies is displayed. The policy-name argument is a string of 1 to 31 characters.

tcl-name: Class name, a string of 1 to 31 characters.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos policy command to display user-defined QoS policy configuration.

Examples

# Display the configuration information of user-defined QoS policies.

<Sysname> display qos policy user-defined

  User Defined QoS Policy Information:

 

  Policy: user1

   Classifier: class1

     Behavior: test

      Accounting Enable

      Committed Access Rate:

        CIR 20000 (kbps), CBS 300000 (byte), EBS 100 (byte), PIR 25000 (kbps)

        Red Action: discard

      Filter enable : permit

      Marking:

        Remark dot1p COS 2

Table 8 Output description

Field

Description

Policy

Policy name.

Classifier

Class name.

A policy can contain multiple classes, and each class is associated with a traffic behavior. A class can be configured with multiple match criteria. For more information, see the traffic classifier command.

Behavior

A behavior is associated with a class. It can be configured with multiple actions. For more information, see the traffic behavior command.

Accounting

Traffic accounting is configured in the traffic behavior.

Committed Access Rate

Information about rate limiting.

Red Action

Action to take on packets not conforming to CIR.

Filter enable

Traffic filtering is configured in the traffic behavior.

Marking

Information about priority marking.

 

display qos policy interface

Syntax

display qos policy interface [ interface-type interface-number ] [ inbound | outbound ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

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

inbound: Displays the QoS policy configuration in the inbound direction.

outbound: Displays the QoS policy configuration in the outbound direction.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos policy interface command to display the QoS policy configuration and operational information of the specified interface or all interfaces.

Examples

# Display the QoS policy configuration and operational information on GigabitEthernet 2/1/1.

<Sysname> display qos policy interface GigabitEthernet 2/1/1

Interface: GigabitEthernet2/1/1

 

  Direction: Outbound                                                          

                                                                               

  Policy: user1                                                                

   Classifier: class1                                                          

     Operator: AND                                                             

     Rule(s) : If-match acl 2001                                               

               If-match ip-precedence 1                                        

     Behavior: test                                                            

      Mirror enable:                                                           

        Mirror type: cpu                                                       

      Assured Forwarding:                                                      

        Bandwidth 3000 (Kbps)                                                  

        Matched  : 3905267/429580690 (Packets/Bytes)                           

        Enqueued : 13384/1471580 (Packets/Bytes)                               

        Discarded: 3891883/428109110 (Packets/Bytes)                           

      Filter Enable: permit                                                    

      Marking:                                                                 

        Remark DSCP cs5

Table 9 Output description

Field

Description

Interface

Interface type and interface number.

Direction

The direction in which the policy is applied to the interface.

Policy

Name of the policy applied to the interface.

Classifier

Class name and configuration information.

Operator

Logical relationship between match criteria in the class.

Rule(s)

Match criteria in the class.

Behavior

Behavior name and configuration information.

Mirror enable

Information about traffic mirroring.

Mirror type

Traffic mirroring type:

·       VLAN—Mirrors traffic to a VLAN

·       CPU—Mirrors traffic to a CPU

·       Interface—Mirrors traffic to an interface

Assured Forwarding

Information about AF queues.

Bandwidth

Bandwidth of the queue.

Matched

Number of packets matching the match criteria.

Enqueued

Number of packets and bytes enqueued.

Discarded

Number of packets and bytes dequeued.

Filter enable

Traffic filtering information:

·       permit—Forwards packets

·       deny—Drops packets

Marking

Information about priority marking.

Remark

Type of priority to be marked, which can be DSCP, IP precedence, or MPLS EXP. For more information, see “Traffic behavior configuration commands.”

 

display qos vlan-policy

Syntax

display qos vlan-policy { name policy-name | vlan [ vlan-id ] } [ slot slot-number ] [ inbound | outbound ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

name policy-name: Displays the information of the VLAN QoS policy identified by its name. The policy-name argument is a string of 1 to 31 characters.

vlan vlan-id: Displays the QoS policy or policies applied to a VLAN identified by its VLAN ID, which ranges from 1 to 4093.

inbound: Displays the QoS policy applied to the inbound direction of the specified VLAN.

outbound: Displays the QoS policy applied to the outbound direction of the specified VLAN.

slot slot-number: Displays VLAN QoS policy information for the specified card. If no card is specified, the command displays VLAN QoS policy information for the main processing unit.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos vlan-policy command to display information about VLAN QoS policies.

If no direction is specified, this command displays VLAN QoS policy information for both inbound and outbound directions.

If no slot number is specified, this command displays all VLAN QoS policy information on the device.

Examples

# Display information about the QoS policy test on the card in slot 6.

<Sysname> display qos vlan-policy name test slot 6

Policy user1

    Vlan 2: inbound

Table 10 Output description

Field

Description

Policy

Name of the QoS policy.

Vlan

ID of the VLAN where the VLAN policy is applied.

Inbound

The QoS policy is applied in the inbound direction of the VLAN.

 

# Display the QoS policy applied to VLAN 2.

<Sysname> display qos vlan-policy vlan 2

Vlan 2

  Direction: Inbound

  Policy: user1

   Classifier: class1

     Operator: AND

     Rule(s) : If-match acl 2001

     Behavior: test

      Accounting Enable:

        0 (Packets)

        0 (Bytes)

      Committed Access Rate:

        CIR 2000 (kbps), CBS 30000 (byte), EBS 100 (byte), PIR 25000 (kbps)

        Red Action: discard

        Green : 0(Bytes)

        Yellow: 0(Bytes)

        Red   : 0(Bytes)

      Filter Enable: permit

      Marking:

        Remark dot1p COS 2

Table 11 Output description

Field

Description

Vlan

ID of the VLAN where the QoS policy is applied.

Direction

Direction of the VLAN in which the QoS policy is applied.

Classifier

Class name and its contents.

Operator

Logical relationship between match criteria.

Rule(s)

Match criteria.

Behavior

Name of the behavior, and its actions.

Accounting

Accounting is enabled.

Committed Access Rate

CAR information.

CIR

Committed information rate (CIR) in kbps.

CBS

Committed burst size (CBS) in bytes, which specifies the depth of the token bucket for holding burst traffic.

EBS

Excessive burst size (EBS) in bytes, which specifies the amount of traffic exceeding the CBS when two token buckets are adopted.

PIR

Peak information rate.

Red Action

Action on red packets.

Green

Statistics about green packets.

Yellow

Statistics about yellow packets.

Red

Statistics about red packets.

 

qos apply policy

Syntax

qos apply policy policy-name { inbound | outbound }

undo qos apply policy { inbound | outbound }

View

Interface view, port group view

Default level

2: System level

Parameters

inbound: Inbound direction.

outbound: Outbound direction.

policy policy-name: Specifies a policy by its name, which is a string of 1 to 31 characters.

Description

Use the qos apply policy command to apply a QoS policy to the interfaces.

Use the undo qos apply policy command to remove the QoS policy.

You can apply QoS policies to all physical interfaces but X.25-enabled or LAPB-enabled interfaces.

Settings in interface view take effect on the current interface. Settings in port group view take effect on all ports in the port group.

Examples

# Apply policy USER1 in the outbound direction of GigabitEthernet 2/1/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet2/1/1

[Sysname-GigabitEthernet2/1/1] qos apply policy USER1 outbound

qos apply policy global

Syntax

qos apply policy policy-name global { inbound | outbound }

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

View

System view

Default level

2: System level

Parameters

policy-name: Policy name, a string of 1 to 31 characters.

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

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

Description

Use the qos apply policy global command to apply a QoS policy globally. A global QoS policy takes effect on all inbound or outbound traffic depending on the direction in which the policy is applied.

Use the undo qos apply policy global command to remove the QoS policy.

This command is available only on the SPC cards.

Examples

# Apply the QoS policy user1 in the inbound direction globally.

<Sysname> system-view

[Sysname] qos apply policy user1 global inbound

qos policy

Syntax

qos policy policy-name

undo qos policy policy-name

View

System view

Default level

2: System level

Parameters

policy policy-name: Policy name, a string of 1 to 31 characters.

Description

Use the qos policy command to create a policy and enter policy view.

Use the undo qos policy command to remove a policy.

A policy applied to an interface cannot be deleted directly. You must cancel application of the policy on the interface before deleting the policy with the undo qos policy command.

The specified policy-name cannot be the name of the system-defined policy default.  

Related commands: classifier behavior and qos apply policy.

Examples

# Create a policy user1.

<Sysname> system-view

[Sysname] qos policy user1

[Sysname-qospolicy-user1]

qos vlan-policy

Syntax

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

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

View

System view

Default level

2: System level

Parameters

policy-name: QoS policy name, a string of 1 to 31 characters.

vlan-id-list: A list of discrete VLAN IDs in the range 1 to 4093. You can input up to eight VLAN IDs in the list. Separate each VLAN ID with a space. You can also specify a range of VLANs in the form of vlan-id1 to vlan-id2, with vlan-id2 be greater than vlan-id1. The value range for vlan-id1 and vlan-id2 are 1 to 4093.

inbound: Applies the QoS policy to the incoming packets in the VLANs.

outbound: Applies the QoS policy to the outgoing packets in the VLANs.

Description

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

Use the undo qos vlan-policy command to remove the QoS policy applied to the specified VLANs.

A QoS policy can be applied to a port to regulate the incoming or outgoing packets on the port or to a VLAN to regulate the incoming or outgoing packets of the VLAN.

QoS policies applied to VLANs are called “VLAN QoS polices”.

Examples

# Apply the QoS policy test to the inbound direction of VLAN 200, VLAN 300, VLAN 400, VLAN 500, VLAN 600, VLAN 700, VLAN 800, and VLAN 900.

<Sysname> system-view

[Sysname] qos vlan-policy test vlan 200 300 400 500 600 700 800 900 inbound

reset qos vlan-policy

Syntax

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

View

User view

Default level

1: Monitor level

Parameters

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

inbound: Clears the QoS policy statistics in the inbound direction of the specified VLAN.

outbound: Clears the QoS policy statistics in the outbound direction of the specified VLAN.

Description

Use the reset qos vlan-policy command to clear VLAN QoS policy statistics.

Examples

# Clear the QoS policy statistics of VLAN 2.

<Sysname> reset qos vlan-policy vlan 2

 


WFQ queuing configuration commands

 

 

NOTE:

WFQ configuration commands are applicable to only SPE cards.

 

display qos wfq interface

Syntax

display qos wfq interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

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

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos wfq interface command to display the weighted fair queuing (WFQ) configuration on an interface.

If no interface is specified, the WFQ configuration of all the interfaces is displayed.

Related commands: qos wfq.

Examples

# Display the WFQ configuration of GigabitEthernet 2/1/1.

<Sysname> display qos wfq interface GigabitEthernet 2/1/1

Interface: GigabitEthernet2/1/1

Output queue: Hardware weighted fair queue

Queue ID    Weight            Min-Bandwidth

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

   0         1                 NA

   1         1                 200

   2         1                 NA

   3         1                 NA

   4         1                 NA

   5         1                 NA

   6         1                 NA

   7         1                 NA

Table 12 Output description

Field

Description

Interface

Interface type and interface number.

Output queue

Type of the current output queue.

Queue ID

ID of a queue.

Weight

Queue weight based on which queues are scheduled.

Min-Bandwidth

The minimum guaranteed bandwidth for the queue. NA indicates that no configuration is available.

 

qos bandwidth queue

Syntax

qos bandwidth queue queue-number min bandwidth-value

undo qos bandwidth queue queue-number [ min bandwidth-value ]

View

Interface view, port group view

Default level

2: System level

Parameters

queue-number: Queue specified by the queue-number argument, which can be a number or keyword. The number-keyword mapping is shown in Table 2. The bandwidth configuration is not applicable to queue 0 (queue be).

min bandwidth-value: Minimum guaranteed bandwidth (in kbps), which specifies the minimum bandwidth guaranteed for a queue when the port is congested.

Description

Use the qos bandwidth queue command to set the minimum guaranteed bandwidth for a queue on a port.

Use the undo qos bandwidth queue command to cancel the configuration.

By default, no minimum guaranteed bandwidth is configured for a port.

Settings in ATM interface view take effect on all PVCs of the ATM interface. Settings in interface view take effect on the current interface. Settings in port group view take effect on all ports in the port group.

An SPC card does not support this command.

Examples

# Set the minimum guaranteed bandwidth to 100 kbps for queue 1 on GigabitEthernet 2/1/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/1/1

[Sysname-GigabitEthernet2/1/1] qos bandwidth queue 1 min 100

qos wfq weight

Syntax

qos wfq queue-number weight schedule-value

undo qos wfq queue-number weight

View

Interface view, port group view

Default level

2: System level

Parameters

queue-number: Queue specified by the queue-number argument, which can be a number or keyword. The number-keyword mapping is shown in Table 2.

weight schedule-value: Specifies the scheduling weight for the specified queue, in the range of 1 to 63.

Description

Use the qos wfq weight command to configure a scheduling weight for a WFQ queue on a port.

Use the undo qos wfq weight command to restore the default scheduling weight for a WFQ queue on a port.

Settings in interface view take effect on the current port. Settings in port group view take effect on all ports in the port group.

An SPC card does not support this command.

Related commands: display qos wfq interface.

Examples

# Set the scheduling weight of queue 3 and queue 4 to 20 and 30 on GigabitEthernet 2/1/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet2/1/1

[Sysname-GigabitEthernet2/1/1] qos wfq 3 weight 20

[Sysname-GigabitEthernet2/1/1] qos wfq 4 weight 30

CBQ configuration commands

 

 

NOTE:

CBQ configuration commands are applicable to only SPE cards.

 

queue af

Syntax

queue af bandwidth bandwidth

undo queue af

View

Traffic behavior view

Default level

2: System level

Parameters

bandwidth: Guaranteed bandwidth for assured forwarding (AF), which ranges from 64 to 10000000 in kbps.

Description

Use the queue af command to enable assured-forwarding (AF) and set the guaranteed bandwidth for the AF traffic.

Use the undo queue af command to remove the configuration from the traffic behavior.

Related commands: queue ef.

Examples

# Enable AF and set the guaranteed bandwidth to 5 Mbps for the AF traffic in behavior af_behav.

<Sysname> system-view

[Sysname] traffic behavior af_behav

[Sysname-behavior-af_behav] queue af bandwidth 5120

[Sysname-behavior-af_behav] quit

queue ef

Syntax

queue ef bandwidth bandwidth [ cbs burst ]

undo queue ef

View

Traffic behavior view

Default level

2: System level

Parameters

bandwidth: Guaranteed bandwidth for expedited forwarding (EF), which ranges from 64 to 10000000 in kbps.

cbs burst: Sets the committed burst size (CBS) in bytes, which specifies the  maximum burst traffic size permitted when the average traffic rate conforms to the configured bandwidth. CBS ranges from 1600 to 1000000000 bytes, and defaults to bandwidth×25. The CBS should be greater than traffic transmitted within 50ms at the rate of bandwidth. Otherwise, the burst traffic rate is too low, and the burst traffic transmission is affected.

Description

Use the queue ef command to enable expedited forwarding (EF), and configure the guaranteed bandwidth for the EF traffic.

Related commands: queue af.

Examples

# Enable EF and set the guaranteed bandwidth to 30 Mbps for the EF traffic in behavior ef_behav.

<Sysname> system-view

[Sysname] traffic behavior ef_behav

[Sysname-behavior-ef_behav] queue ef bandwidth 30720

[Sysname-behavior-ef_behav] quit

queue wfq

Syntax

queue wfq

undo queue wfq

View

Traffic behavior view

Default level

2: System level

Parameters

None

Description

Use the queue wfq command to configure WFQ for the behavior.

Use the undo queue wfq command to remove the configuration.

Examples

# Configure WFQ for behavior be_behav.

[Sysname] traffic behavior be_behav

[Sysname-behavior-be_behav] queue wfq

wred

Syntax

wred [ dscp | ip-precedence ]

undo wred

View

Traffic behavior view

Default level

2: System level

Parameters

dscp: Uses DSCP for calculating drop probability for a packet.

ip-precedence: Uses IP precedence for calculating drop probability for a packet. This is the default.

Description

Use the wred command to enable WRED drop in a traffic behavior.

Use the undo wred command to remove the configuration from a traffic behavior.

To use this command, make sure that the queue af or queue wfq command has been configured.

Examples

# Configure WRED for behavior af_behav.

<Sysname> system-view

[Sysname] traffic behavior af_behav

[Sysname-behavior-af_behav] queue af bandwidth 5120

[Sysname-behavior-af_behav] wred

 


Priority mapping table configuration commands

display qos map-table

Syntax

display qos map-table [ dscp-dscp | inbound [ up-dp | up-lp | up-up] | outbound [ up-dp | up-fc | up-lp | up-rpr ] | color [ green | yellow | red ] [ up-dot1p | up-dscp | up-lp | up-exp ] ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

inbound: Specifies the priority mapping table for incoming packets.

outbound: Specifies the priority mapping table for outgoing packets.

dscp-dscp: DSCP-to-DSCP priority mapping table.

up-dot1p: User-to-802.1p priority mapping table.

up-dp: User-to-drop priority mapping table.

up-dscp: User-to-DSCP priority mapping table.

up-up: User-to-user priority mapping table.

up-fc: User-to-forwarding-class priority mapping table.

up-exp: User-to-EXP priority mapping table.

color: Specifies the priority mapping tables for colored packets.

green: Green packets.

yellow: Yellow packets.

red: Red packets.

up-lp: User-to-local priority mapping table.

up-rpr: User-to-RPR priority mapping table.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos map-table command to display the configuration of a priority mapping table.

If no priority mapping table is specified, the configuration information of all priority mapping tables is displayed.

Related commands: qos map-table.

Examples

# Display the configuration of the user-to-802.1p priority mapping table for green packets.

<Sysname> display qos map-table color green up-dot1p

MAP-TABLE NAME: up-dot1p   TYPE: pre-define   COLOR: green

IMPORT  :  EXPORT

   0    :    0

   1    :    1

   2    :    2

   3    :    3

   4    :    4

   5    :    5

   6    :    6

   7    :    7

Table 13 Output description

Field

Description

MAP-TABLE NAME

Name of the priority mapping table

TYPE

Type of the priority mapping table

Color

Color of the priority mapping table

IMPORT

Import entries of the priority mapping table

EXPORT

Export entries of the priority mapping table

 

qos map-table

Syntax

qos map-table { dscp-dscp | inbound { up-dp | up-lp | up-up } | outbound { up-dp | up-fc | up-lp | up-rpr } | color { green | red | yellow } { up-dot1p | up-dscp  | up-lp | up-exp } }

View

System view

Default level

2: System level

Parameters

inbound: Specifies the priority mapping table for incoming packets.

outbound: Specifies the priority mapping table for outgoing packets.

dscp-dscp: DSCP-to-DSCP priority mapping table.

up-dot1p: User-to-802.1p priority mapping table.

up-dp: User-to-drop priority mapping table.

up-dscp: User-to-DSCP priority mapping table.

up-up: User-to-user priority mapping table.

up-fc: User-to-forwarding-class priority mapping table.

up-exp: User-to-EXP priority mapping table.

color: Specifies the priority mapping tables for colored packets.

green: Green packets.

yellow: Yellow packets.

red: Red packets.

up-lp: User-to-local priority mapping table.

up-rpr: User-to-RPR priority mapping table.

Description

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

Related commands: display qos map-table.

Examples

# Enter the DSCP-to-DSCP priority mapping table view.

<Sysname> system-view

[Sysname] qos map-table dscp-dscp

[Sysname-maptbl-dscp-dscp]

import

Syntax

import import-value-list export export-value

undo import { import-value-list | all }

View

Priority mapping table view

Default level

2: System level

Parameters

import-value-list: List of input values.

export-value: Output value.

all: Deletes all the mappings in the priority mapping table.

Description

Use the import command to configure a mapping from one or multiple input values to an output value.

Use the undo import command to restore the specified or all mappings to the default mappings.

Related commands: display qos map-table.

 

 

NOTE:

In a DSCP-to-DSCP priority mapping table, only entries with an odd number as the input can take effect. To configure a DSCP-to-DSCP mapping for an even source DSCP value, use the even source DSCP value plus one as the input value. For example, to create a mapping for source DSCP precedence 4, you need to use 5 as the input value for the mapping.

 

Examples

# Configure the DSCP-to-DSCP priority mapping table to map DSCP values 5 to DSCP value 1.

<Sysname> system-view

[Sysname] qos map-table dscp-dscp

[Sysname-maptbl-dscp-dscp] import 5 export 1

Port priority configuration commands

qos priority

Syntax

qos priority priority-value

undo qos priority

View

Interface view, port group view

Default level

2: System level

Parameters

priority-value: Port priority value, in the range of 0 to 7.

Description

Use the qos priority command to change the port priority of a port.

Use the undo qos priority command to restore the default.

The default port priority is 0.

To view the port priority of a port, use the display qos trust interface command.

Examples

# Set the priority of GigabitEthernet 2/1/1 to 2.

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/1/1

[Sysname-GigabitEthernet2/1/1] qos priority 2

Priority trust mode configuration commands

display qos trust interface

Syntax

display qos trust interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

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

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

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

If no interface is specified, the command displays priority trust mode and port priority settings for all interfaces.

Examples

# Display the priority trust mode and port priority settings of GigabitEthernet 2/1/1.

<Sysname> display qos trust interface GigabitEthernet 2/1/1

Interface: GigabitEthernet2/1/1

 Port priority information

  Port priority :0

  Port priority trust type : untrust

Table 14 Output description

Field

Description

Interface

Interface type and interface number.

Port priority

Port priority.

Port priority trust type

Priority trust mode on the interface. If the trust mode is untrust, the port priority is used for priority mapping. If not, a priority field in the incoming packet is used.

 

qos trust

Syntax

qos trust auto

undo qos trust

View

Interface view, port group view

Default level

2: System level

Parameters

auto: Uses a priority in incoming packets for priority mapping.

·           An SPE card uses the 802.1p priority of Layer 2 packets, the IP precedence of Layer 3 packets, and the EXP of MPLS packets for priority mapping.

·           An SPC card uses the IP precedence of IP packets, EXP of MPLS packets, and 802p priority of any other non-IP packet for priority mapping.

Description

Use the qos trust auto command to configure an interface to use a particular priority field in the incoming packet for priority mapping.

Use the undo qos trust command to restore the default priority trust mode.

In interface view, the setting is effective on the current interface only; in port group view, the setting is effective on all the ports in the port group.

When a packet arrives on an interface, the router assigns a set of parameters (including 802.1p priority, DSCP precedence, local precedence, and drop precedence) to the packet as configured.

A local precedence is locally significant and corresponds to an output queue.

A drop precedence is used for packet drop. The value 2 corresponds to red packets, the value 1 corresponds to yellow packets, and the value 0 corresponds to green packets.

Examples

# Specify auto priority trust mode for GigabitEthernet 2/1/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/1/1

[Sysname-GigabitEthernet2/1/1] qos trust auto

 


WRED configuration commands

display qos wred interface

Syntax

display qos wred interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

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

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos wred interface command to display the WRED configuration and statistics of an interface.

If no interface is specified, the WRED configuration and statistics for all interfaces are displayed.

Examples

# Display the WRED configuration and statistics of interface GigabitEthernet 2/1/1.

<Sysname> display qos wred interface GigabitEthernet 2/1/1

Interface: GigabitEthernet2/1/1

 Current WRED configuration:

 Applied WRED table name: 123

Table 15 Output description

Field

Description

Interface

Interface type and interface number

Applied WRED table name

Name of the applied WRED table

 

WRED table configuration commands

 

 

NOTE:

WRED table configuration commands are applicable to only SPE cards.

 

display qos wred table

Syntax

display qos wred table [ table-name ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

table-name: Name of the WRED table to be displayed.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

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

If no WRED table name is specified, configurations of all WRED tables are displayed.

Examples

# Display the configuration of WRED table 1.

<Sysname> display qos wred table 1

Table Name: 1

Table Type: Queue based WRED

QID:  gmin  gmax  gprob  ymin  ymax  yprob  rmin  rmax  rprob  exponent

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

 0 10224  10240   100 10224  10240   100 10224  10240   100      8

 1 10224  10240   100 10224  10240   100 10224  10240   100      8

 2 10224  10240   100 10224  10240   100 10224  10240   100      8

 3 10224  10240   100 10224  10240   100 10224  10240   100      8

 4 10224  10240   100 10224  10240   100 10224  10240   100      8

 5 10224  10240   100 10224  10240   100 10224  10240   100      8

 6 10224  10240   100 10224  10240   100 10224  10240   100      8

 7 10224  10240   100 10224  10240   100 10224  10240   100      8

Table 16 Output description

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

gprob

Maximum drop probability for green packets

ymin

Lower limit for yellow packets

ymax

Upper limit for yellow packets

yprob

Maximum drop probability for yellow packets

rmin

Lower limit for red packets

rmax

Upper limit for red packets

rprob

Maximum drop probability for red packets

exponent

Exponent for average length calculation

 

qos wred table

Syntax

qos wred queue table table-name

undo qos wred table table-name

View

System view

Default level

2: System level

Parameters

queue: Creates a queue-based table; packets are dropped based on the queue when congestion occurs.

table table-name: Specifies an name for the table. The table-name argument is a string of 1 to 32 characters.

Description

Use the qos wred queue table command to create a WRED table and enter WRED table view.

Use the undo qos wred table command to remove a global WRED table.

By default, no global WRED table is created.

A WRED table in use cannot be removed.

Related commands: display qos wred table and display qos wred interface.

Examples

# Create WRED table exp-table1.

<Sysname> system-view

[Sysname] qos wred queue table exp-table1

[Sysname-wred-table-exp-table1]

queue

Syntax

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

undo queue { queue-number | all }

View

WRED table view

Default level

2: System level

Parameters

queue-number: Queue number. This argument is available on only Layer 2 ports.

drop-level drop-level: Specifies a drop level. If this argument is not specified, the subsequent configuration takes effect on the packets in the queue regardless of the drop level.

low-limit low-limit: Lower limit, which is 10224 by default.

high-limit high-limit: Upper limit, which is 10240 by default.

discard-probability discard-prob: Denominator for drop probability. Each drop level corresponds to an independent denominator. The discard-prob argument is 100 by default.

Description

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

Use the undo queue command to restore the default.

By default, a global queue-based WRED table has a set of default available parameters.

Related commands: qos wred table.

Examples

# Configure the drop parameters for packets with drop level 1 in queue 1 for the global queue-based WRED table queue-table1.

<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

queue weighting-constant

Syntax

queue queue-number weighting-constant exponent

undo queue queue-number weighting-constant

View

WRED table view

Default level

2: System level

Parameters

queue-number: Queue number.

weighting-constant exponent: Specifies the exponent for average queue length calculation, in the range of 0 to 21. This argument is 8 by default.

Description

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

Use the undo queue weighting-constant command to restore the default.

Related commands: qos wred table.

Examples

# Set the exponent for average queue length calculation to 12 for queue 1 in the queue-based WRED table queue-table1.

<Sysname> system-view

[Sysname] qos wred queue table queue-table1

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

qos wred apply

Syntax

qos wred apply table-name

undo qos wred apply

View

Interface view, port group view

Default level

2: System level

Parameters

table-name: Name of a global WRED table.

Description

Use the qos wred apply command to apply a global WRED table on a port/port group.

Use the undo qos wred apply command to restore the default.

By default, the tail drop mode is adopted on a port.

In interface view, the setting is effective on the current port only; in port group view, the setting is effective on all the ports in the port group.

Related commands: display qos wred interface, display qos wred table, and qos wred table.

 

 

NOTE:

This command is not available on SPC cards.

 

Examples

# Apply the queue-based WRED table queue-table1 to the Layer 2 port GigabitEthernet 2/1/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet2/1/1

[Sysname-GigabitEthernet2/1/1] qos wred apply queue-table1

 


car name

Syntax

car name car-name

undo car

View

Traffic behavior view

Default level

2: System level

Parameters

car-name: Name of an aggregation CAR policy.

Description

Use the car name command to reference an aggregation CAR policy for the traffic behavior.

Use the undo car command to remove the aggregation CAR from the traffic behavior.

Examples

# Reference the aggregation CAR policy aggcar-1 for the traffic behavior be1.

<Sysname> system-view

[Sysname] traffic behavior be1

[Sysname-behavior-be1] car name aggcar-1

display qos car name

Syntax

display qos car name [ car-name ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

car-name: Name of an aggregation CAR policy.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos car name command to display the configuration and statistics of a specified aggregation CAR policy.

If no CAR policy is specified, the configuration and statistics of all the aggregation CAR policies are displayed.

Examples

# Display the configuration and statistics of the aggregation CAR policy aggcar-1.

<Sysname> display qos car name aggcar-1

 Name: aggcar-1

  Mode: aggregative

 CIR 200(kbps)  CBS: 2000(byte)  EBS: 40000(byte)  PIR: 2000(kbps)

  Red Action: discard

  Green packet 2000(Bytes)

  Yellow packet 400(Bytes)

  Red packet 6000(Bytes)

Table 17 Output description

Field

Description

Name

Name of the CAR policy

Mode

Mode of the CAR policy

CIR  CBS  EBS  PIR

Parameters for the aggregation CAR policy

Red Action

Action on red packets

Green packet

Statistics about green packets

Yellow packet

Statistics about yellow packets

Red packet

Statistics about red packets

 

qos car aggregative

Syntax

qos car car-name aggregative cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ pir peek-information-rate ] [ red  { discard | pass } ]

undo qos car car-name

View

System view

Default level

2: System level

Parameters

car-name: Name of an aggregation CAR policy, a string of 1 to 31 characters.

aggregative: Indicates that the global CAR policy is aggregative. Only aggregation CAR is supported.

cir committed-information-rate: Committed information rate (CIR) in kbps, in the range of 64 to 10000000.

cbs committed-burst-size: Specifies the committed burst size (CBS) in bytes, which specifies the size of burst traffic when the actual average rate is no bigger than CIR. CBS ranges from 1875 to 1000000000. By default, CBS is the traffic transmitted in 500 ms at the rate of CIR. The CBS to be configured must be no smaller than the traffic transmitted at the rate of CIR  in 50 ms. Otherwise, the burst rate of the token bucket is too low, and affects burst traffic transmission.

ebs excess-burst-size: Excess burst size (EBS) in bytes, in the range of 0 to 1000000000.

pir peak-information-rate: Peak information rate (PIR) in kbps, in the range of 64 to 10000000. If PIR is not configured, only one token bucket is configured for TP. Otherwise, two token buckets are configured for TP.

red action: Specifies the action to be taken on red packets. Red packets are packets whose rate neither conforms to CIR nor conforms to PIR.

The action argument can be:

·           discard: Drops the packet.

·           pass: Permits the packet to pass through.

Description

Use the qos car aggregative command to configure an aggregation CAR policy.

Use the undo qos car aggregative command to remove an aggregation CAR policy.

An aggregation CAR policy does not take effect until it is referenced in a policy.

For packets forwarded at Layer 3, such as IPv4/IPv6 unicast packets, multicast packets, tunnel packets, and L3VPN incoming tunnel packets, aggregation CAR only takes the IP header and payload into account. The port rate parameters configured in the qos car aggregative command are transformed into the theoretical output rate following these formulae (take 128-byte Layer-3 packets for example, and assume that the rate is set to 10000 kbps):

·           When the incoming port and the outgoing port are Ethernet interfaces and the packets are untagged, the theoretical outgoing interface rate is calculated following this formula:

10000 kbps × 128 bytes/(128 bytes of packet length – 4 bytes of CRC – 14 bytes of Layer-2 header)

·           When the incoming port and the outgoing port are POS interfaces, the theoretical outgoing interface rate is calculated following this formula:

10000 kbps × 128 bytes/(128 bytes of packet length – 4 bytes of CRC – 4 bytes of Layer-2 header)

Examples

# Configure the aggregation CAR policy aggcar-1, where CIR is 200, CBS is 2000, and red packets are dropped.

<Sysname> system-view

[Sysname] qos car aggcar-1 aggregative cir 200 cbs 2000 red discard

reset qos car name

Syntax

reset qos car name [ car-name ]

View

User view

Default level

2: System level

Parameters

car-name: Name of an aggregation CAR policy.

Description

Use the reset qos car name command to clear the statistics about the specified aggregation CAR policy.

If no car-name is specified, the statistics about all aggregation CAR policies is cleared.

Examples

# Clear the statistics about the aggregation CAR policy aggcar-1.

<Sysname> reset qos car name aggcar-1

 


Queue scheduling profile configuration commands

 

 

NOTE:

The commands in this chapter are available on only the SPC cards.

 

display qos qmprofile configuration

Syntax

display qos qmprofile configuration [ profile-name ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

profile-name: Queue scheduling profile name, a string of 1 to 31 case-sensitive characters.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

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

If a queue scheduling profile is specified, only the configuration of the profile is displayed. If no queue scheduling profile is specified, the configuration of all queue scheduling profiles is displayed.

Examples

# Display the configuration of queue scheduling profile myprofile.

<Sysname> display qos qmprofile configuration myprofile

Queue management profile: myprofile

 Queue ID    Type    Group    Weight

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

 0           SP      N/A      N/A

 1           SP      N/A      N/A

 2           SP      N/A      N/A

 3           SP      N/A      N/A

 4           SP      N/A      N/A

 5           SP      N/A      N/A

 6           WRR     1        200

 7           SP      N/A      N/A

Table 18 Output description

Field

Description

Queue management profile

Queue scheduling profile name.

Queue ID

ID of a queue.

Type

Queue scheduling type, which can be SP or WRR.

Group

For a WRR queue, this field displays the WRR priority group to which the queue belongs. For a queue using any other scheduling mechanism, this field is insignificant and N/A is displayed.

Weight

Scheduling weight. N/A indicates that the Weight field is insignificant for the queue.

 

display qos qmprofile interface

Syntax

display qos qmprofile interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

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

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

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

If no interface is specified, all applications of queue scheduling profiles to interfaces are displayed.

Examples

# Display the queue scheduling profile applied to GigabitEthernet 3/1/1.

<Sysname> display qos qmprofile interface gigabitethernet 3/1/1

Interface: GigabitEthernet3/1/1

Queue management profile: myprofile

Table 19 Output description

Field

Description

Interface

Interface name

Queue management profile

Name of the queue scheduling profile applied to the interface

 

qos apply qmprofile

Syntax

qos apply qmprofile profile-name

undo qos apply qmprofile

View

Interface view, port group view

Default level

2: System level

Parameters

profile-name: Queue scheduling profile name, a string of 1 to 31 case-sensitive characters.

Description

Use the qos apply qmprofile command to apply a queue scheduling profile to the interface/port group.

Use the undo qos apply qmprofile command to restore the default.

By default, a queue uses the SP queuing.

Only one queue scheduling profile can be applied to an interface.

Examples

# Apply queue scheduling profile myprofile to GigabitEthernet 3/1/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet3/1/1] qos apply qmprofile myprofile

qos qmprofile

Syntax

qos qmprofile profile-name

undo qos qmprofile profile-name

View

System view

Default level

2: System level

Parameters

profile-name: Queue scheduling profile name, a string of 1 to 31 case-sensitive characters.

Description

Use the qos qmprofile command to create a queue scheduling profile and enter queue scheduling profile view.

Use the undo qos qmprofile command to delete a queue scheduling profile.

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

Examples

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

<Sysname> system-view

[Sysname] qos qmprofile myprofile

[Sysname-qmprofile-myprofile]

queue

Syntax

queue queue-number { sp | wrr group group-id weight weight-value }

undo queue queue-number

View

Queue scheduling profile view

Default level

2: System level

Parameters

queue-number: Queue number, which ranges from 0 to 7.

sp: Enables SP for the queue.

wrr: Enables WRR for the queue.

group-id: WRR priority group ID, which ranges from 1 to 2.

weight-value: Scheduling weight, which ranges from 1 to 63.

Description

Use the queue command to configure queue scheduling parameters.

Use the undo queue command to restore the default.

By default, a queue uses the SP queuing.

To guarantee that the queue scheduling is exact, make sure that the queues assigned to a WRR group are continuous.

Examples

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

<Sysname> system-view

[Sysname] qos qmprofile myprofile

[Sysname-qmprofile-myprofile] queue 0 sp

# Create queue scheduling profile myprofile, configure queue 1 to use WRR, set the scheduling weight of queue 1 to 20, and assign queue 1 to WRR priority group 1.

<Sysname> system-view

[Sysname] qos qmprofile myprofile

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

 


QoS traffic accounting configuration commands

 

 

NOTE:

The QoS traffic accounting configuration commands are applicable to only the ports operating in bridge mode on an SPC card.

 

display qos traffic-counter

Syntax

display qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

inbound: Inbound direction.

outbound: Outbound direction.

counter0: Counter 0.

counter1: Counter 1.

slot slot-number: Specifies a card by its slot number.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos traffic-counter command to display the traffic statistics collected by the specified counter and display the configuration of the counter.

Examples

# Display the outbound traffic statistics of counter 0 on card 4.

<Sysname> display qos traffic-counter outbound counter0 slot 4

Slot 4 outbound counter0 mode:

 Interface: all

 VLAN: all

 Local precedence: all

 Drop priority: all

 

Traffic-counter summary:

 Unicast: 0 packets

 Multicast: 0 packets

 Broadcast: 0 packets

 Control packets: 2 packets

 Bridge egress filtered packets: 0 packets

 Tail drop packets: 0 packets

 Multicast Tail drop packets: 6 packets

 Forward restrictions packets: 0 packets

Table 20 Output description

Field

Description

Slot 4 outbound counter0 mode

Monitored objects of the counter in the outbound direction

Interface

Interfaces monitored by the counter

VLAN

VLANs monitored by the counter

Local precedence

Local precedence values monitored by the counter

Drop priority

Drop precedence values monitored by the counter

Traffic-counter summary

Summary statistics collected by the counter

Unicast

The number of unicast packets

Multicast

The number of multicast packets

Broadcast

The number of broadcast packets

Control packets

The number of control packets

Bridge egress filtered packets

The number of packets filtered in the egress direction of the bridge

Tail drop packets

The number of unicast packets dropped by tail drop

Multicast Tail drop packets

The number of multicast and broadcast packets dropped by tail drop

Forward restrictions packets

The number of packets whose forwarding is restricted (this field is not supported)

 

# Display the inbound traffic statistics of counter 0 on card 1.

<Sysname> display qos traffic-counter inbound counter0 slot 1

Slot 1 inbound counter0 mode:

 Interface: all

 VLAN: all

 

Traffic-counter summary:

 Bridge in frames: 5490000 packets

 Bridge local discarded: 0 packets

 Bridge vlan ingress filter discarded: 0 packets

 Bridge security filter discarded: 0 packets

Table 21 Output description

Field

Description

Slot 1 inbound counter0 mode

Monitored objects of the counter in the inbound direction

Interface

Interfaces monitored by the counter

VLAN

VLANs monitored by the counter

Traffic-counter summary

Summary statistics collected by the counter

Bridge in frames

The number of packets received by the bridge

Bridge local discarded

The number of packets dropped by the bridge (except the packets dropped due to other causes)

Bridge vlan ingress filter discarded

The number of incoming packets filtered based on the VLAN

Bridge security filter discarded

The number of packets filtered by the security function of the bridge

 

qos traffic-counter

Syntax

qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number [ interface interface-type interface-number | vlan vlan-id | local-precedence lp-value | drop-priority dp-value ] *

undo qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number

View

System view

Default level

2: System level

Parameters

inbound: Inbound direction.

outbound: Outbound direction.

counter0: Counter 0.

counter1: Counter 1.

slot slot-number: Specifies a card by its slot number.

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

vlan-id: VLAN ID, in the range of 1 to 4093.

local-precedence: Local precedence value, in the range of 0 to 7.

drop-priority: Drop precedence, in the range of 0 to 2.

Description

Use the qos traffic-counter command to enable the traffic accounting function

Use the undo qos traffic-counter command to disable the traffic accounting function.

By default, the traffic accounting function is disabled.

A card provides two counters for traffic accounting. The monitored object can be a port, a VLAN, a local precedence value, or a drop precedence value.

·           If no port is specified, the traffic of all the ports on the card is monitored.

·           If no VLAN is specified, the traffic of all the VLANs is monitored.

·           If no local precedence value is specified, the traffic with any local precedence value is monitored.

·           If no drop precedence value is specified, the traffic with any drop precedence value is monitored.

 

 

NOTE:

When you redefine the monitored object on a card with the qos traffic-counter command, the counter resets automatically.

 

Examples

# Enable counter 0 in slot 4 to collect statistics about the outbound traffic on GigabitEthernet 4/0/1.

<Sysname> system-view

[Sysname] qos traffic-counter outbound counter0 slot 4 interface gigabitethernet 4/0/1

reset qos traffic-counter

Syntax

reset qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number

View

User view

Default level

2: System level

Parameters

inbound: Inbound direction.

outbound: Outbound direction.

counter0: Counter 0.

counter1: Counter 1.

slot slot-number: Specifies a card by its slot number.

Description

Use the reset qos traffic-counter command to clear the traffic statistics collected by a counter on a card.

Examples

# Clear the outbound traffic statistics collected by counter 0 on card 4.

<Sysname> reset qos traffic-counter outbound counter0 slot 4

Per-port queue-based traffic statistics displaying command

display qos queue-statistics interface

Syntax

display qos queue-statistics interface [ interface-type interface-number ] [ pvc { pvc-name [ vpi/vci ] | vpi/vci } ] [ outbound ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

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

pvc: Displays the queue-based traffic statistics for a PVC on an ATM interface. This keyword is available only for ATM interfaces.

pvc-name: Specifies the PVC by its name.

vpi/vci: Specifies the PVC by its VPI/VCI pair.

outbound: Displays queue-based outbound traffic statistics.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display qos queue-statistics interface command to display the port queue traffic statistics.

If no interface is specified, statistics for all interfaces are displayed.

For more information about the reset counters interface command, see Interface Command Reference.

Examples

# Display port queue traffic statistics in the outbound direction of GigabitEthernet 2/1/3.

<Sysname>display qos queue-statistics interface GigabitEthernet 2/1/3

Interface: GigabitEthernet2/1/3

Direction: Outbound

    Pass: 0 packets, 0 bytes

    Drop: 0 packets, 0 bytes

 

  Data Flow:

    Queue 0:

      Pass: 0 packets, 0 bytes

      Drop: 0 packets, 0 bytes

      Total queue length  : 4096 packets

      Current queue length: 0 packets, 0% use ratio

 

    Queue 1:

      Pass: 0 packets, 0 bytes

      Drop: 0 packets, 0 bytes

      Total queue length  : 2048 packets

      Current queue length: 0 packets, 0% use ratio

 

    Queue 2:

      Pass: 0 packets, 0 bytes

      Drop: 0 packets, 0 bytes

      Total queue length  : 2048 packets

      Current queue length: 0 packets, 0% use ratio

 

    Queue 3:

      Pass: 0 packets, 0 bytes

      Drop: 0 packets, 0 bytes

      Total queue length  : 2048 packets

      Current queue length: 0 packets, 0% use ratio

 

    Queue 4:

      Pass: 0 packets, 0 bytes

      Drop: 0 packets, 0 bytes

      Total queue length  : 2048 packets

      Current queue length: 0 packets, 0% use ratio

 

    Queue 5:

      Pass: 0 packets, 0 bytes

      Drop: 0 packets, 0 bytes

      Total queue length  : 512 packets

      Current queue length: 0 packets, 0% use ratio

 

    Queue 6:

      Pass: 0 packets, 0 bytes

      Drop: 0 packets, 0 bytes

      Total queue length  : 512 packets

      Current queue length: 0 packets, 0% use ratio

 

    Queue 7:

      Pass: 0 packets, 0 bytes

      Drop: 0 packets, 0 bytes

      Total queue length  : 8192 packets

      Current queue length: 0 packets, 0% use ratio 

Table 22 Output description

Field

Description

Interface

Interface for which port queue traffic statistics are to be displayed

Direction

Direction for which port queue traffic statistics are to be displayed

Pass

The number of packets forwarded and the number of bytes forwarded

Drop

The number of packets dropped and the bytes of packets dropped

Data Flow

Traffic statistics per queue

Queue

Queue ID

Total queue length

The total queue length

Current queue length

The current queue length

use ratio

Usage of the queue