queue (port queue view)

Function

The queue command sets the scheduling parameters for port queues in a port-queue template. The parameters include the scheduling mode, shaping value and CIR.

The undo port-queue command restores the default scheduling parameters.

By default, the shaping value of an interface equals the bandwidth of the interface, the BE, AF1, AF2, AF3, and AF4 queues are scheduled using the WFQ scheduling mode, with the scheduling weights being 10, 10, 10, 15, and 15, respectively, and the EF, CS6, and CS7 queues are scheduled using the PQ scheduling mode. The shaping percentage is set to 100 for all queues, and the tail drop mode is used.

Format

queue cos-value { { pq | wfq weight weight-value | lpq } | shaping { shaping-value | shaping-percentage shaping-percentage-value } [ pbs pbs-value ] | port-wred wred-name | low-latency } *

undo queue cos-value [ pq | wfq | lpq | shaping | port-wred | low-latency ]

queue cos-value cir { { cir-value [ cbs cbs-value ] cir-schedule pq pir pir-value } | { cir-percentage cir-percentage-value [ cbs cbs-value ] cir-schedule pq pir pir-percentage pir-percentage-value } } [ pbs pbs-value ] pir-schedule { pq | wfq weight weight-value | lpq } [ port-wred wred-name ]

undo queue cos-value [ cir { { cir-value [ cbs cbs-value ] cir-schedule pq pir pir-value } | { cir-percentage cir-percentage-value [ cbs cbs-value ] cir-schedule pq pir pir-percentage pir-percentage-value } } [ pbs pbs-value ] pir-schedule { pq | wfq weight weight-value | lpq } [ port-wred wred-name ] ]

Parameters

Parameter Description Value
cos-value

Specifies the service class of a port queue.

The value is an enumerated type and can be cs7, cs6, ef, af4, af3, af2, af1, or be.

pq

Specifies the scheduling mode of a queue as PQ scheduling.

-

wfq

Specifies the scheduling mode of a queue as WFQ scheduling.

-

weight weight-value

Specifies the weight value of a port-queue. To be specific, the percentage of the remaining bandwidth after bandwidth is allocated to PQ queues.

The value is an integer ranging from 1 to 100.

lpq

Specifies the scheduling mode of a queue as LPQ scheduling.

-

shaping shaping-value

Specifies a shaping rate.

The value is an integer ranging from 0 to 4294967294, in Mbit/s.

shaping-percentage shaping-percentage-value

Specifies the shaping percentage of a port queue. It indicates the percentage of bandwidth that can be used by the specific port queue.

The value is an integer ranging from 0 to 100, in percentage.

pbs pbs-value

Specifies the depth of a shaping token bucket.

The value is an integer ranging from 1 to 65535, in bytes.

port-wred wred-name

Specifies the name of a WRED profile for port queues.

The value is a string of 1 to 31 characters.

low-latency

Indicates the low-latency mode.

-

cir cir-value

Specifies the CIR.

The value is an integer ranging from 0 to 4294967294, in Mbit/s.

cbs cbs-value

Specifies the CBS.

The value is an integer ranging from 1 to 65535, in bytes.

cir-schedule

Specifies the scheduling mode for CIR.

-

pir pir-value

Specifies the PIR.

The value is an integer ranging from 0 to 4294967294, in Mbit/s.

cir-percentage cir-percentage-value

Specifies the CIR percentage.

The value is an integer ranging from 1 to 100.

pir-percentage pir-percentage-value

Specifies the PIR percentage.

The value is an integer ranging from 1 to 100.

pir-schedule

Specifies the scheduling mode for PIR.

-

Views

Port queue view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
qos write

Usage Guidelines

Usage Scenario

When a network is congested, to ensure that service packets in the queues of a high priority, such as VoIP packets and video packets, are preferentially scheduled, run the queue command.

After packets enter the queues on an interface, the interface schedules packets based on policies. If no congestion occurs on an interface, the rate at which packets are transmitted can reach the shaping value. If congestion occurs on an interface, the rate at which packets are transmitted is higher than the weight-based bandwidth. You can increase the weight value for queues of high priorities, when a network is congested, to prevent packet loss.

Prerequisites

A port-queue profile has been created.

Precautions

  • Do not configure both the shaping rate and CIR for one queue.

  • You can configure the CIR for a maximum of two queues on one interface.

  • Only PQ queues can be configured to work in low-latency mode. A queue that is configured to work in low-latency mode is scheduled preferentially if congestion occurs.

  • The priorities of CS7, CS6, EF, AF4, AF3, AF2, AF1, and BE queues are placed in descending order. The low-latency function is preferentially guaranteed for the three high-priority (CS7, CS6, and EF) queues. Therefore, configure the low-latency function for the three high-priority (CS7, CS6, and EF) queues. If you configure the low-latency function for the five low-priority queues, ensure that the three high-priority queues are not congested. Otherwise, the low-latency function cannot be guaranteed for the five low-priority queues.

  • When the shaping value is set for a queue, the maximum bandwidth of the queue is equal to the shaping value regardless of the bandwidth of the entire interface or whether other queues have traffic.

Example

# For outgoing traffic in the AF1 queue on GE 0/1/0, set the CIR to 1000 Mbit/s, scheduling mode for CIR to PQ, PIR to 2000 Mbit/s, and scheduling mode for PIR to PQ.
<HUAWEI> system-view
[~HUAWEI] port-queue-template test
[*HUAWEI-port-queue-template-test] queue af1 cir 1000 cir-schedule pq pir 2000 pir-schedule pq
# Set the scheduling mode of AF1 queues to WFQ in the port-queue template named test and set the weight value to 50 and shaping rate to 20 Mbit/s.
<HUAWEI> system-view
[~HUAWEI] port-queue-template test
[*HUAWEI-port-queue-template-test] queue af1 wfq weight 50 shaping 20
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >