port-queue

Function

The port-queue command sets scheduling parameters for port queues in the outbound direction of a non-low-speed interface.

The undo port-queue command restores the default settings.

By default, 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

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

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

port-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 ] outbound

undo port-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 ] ] outbound

Parameters

Parameter Description Value
cos-value

Specifies the class of service.

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 scheduling weight 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 that ranges from 0 to 4294967294.

pbs pbs-value

Specifies a cache size, namely, the maximum volume of traffic that a port shaping-capable interface can send. The value of this parameter is equal to the peak burst size (PBS).

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

port-wred wred-name

Specifies the WRED profile of a queue.

The value is a string of 1 to 31 characters.

outbound

Specifies the outbound direction.

-

shaping-percentage shaping-percentage-value

Specifies the traffic shaping rate , namely, the traffic shaping rate for each class queue as percentage of the configured interface output bandwidth.

This parameter is not supported in the tunnel interface view.

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

low-latency

Specifies the low-latency mode.

This parameter is not supported in the tunnel interface view.

-

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

100GE interface view, 10G LAN interface view, 10G WAN interface view, 25GE interface view, 400GE interface view, 40GE interface view, 50GE interface view, Eth-Trunk interface view, GE optical interface view, GE electrical interface view, Tunnel interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
qos write

Usage Guidelines

Usage Scenario

When a network is congested, you can run the port-queue command to configure queue scheduling so that service packets in the queues of a high priority, such as VoIP packets and video packets, are scheduled based on priorities.

After packets enter the queues on an interface, the interface schedules packets based on policies. If no congestion occurs on

Precautions

  • Port-queue is supported on a tunnel interface only when the protocol of the tunnel interface is set to GRE or GRE IPv6 and the port-shaping command is configured.
  • If the port-wred template is configured on the port-queue command, only the command undo port-queue port-wred outbound can be running to cancel the configuration.If the shaping value or shaping percentage is configured on the port-queue command, only the command undo port-queue shaping outbound can be running to cancel the configuration. 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.
  • If a multiple member interfaces of a trunk interface reside on different forwarding modules (for example, inter-board) or traffic management modules (for example, inter-TM), the effective shaping value for port-queue or port-shaping can be a multiple of the configured one.
  • 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.The CIR can be delivered only in overwriting mode.
  • 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.To provide low latency for a queue in low-latency mode on an interface, ensure that the shaping value of the queue is smaller than the CIR value of the interface. You can run the qos default user-queue command to adjust the CIR value of an interface.If multiple queues are configured to work in low-latency mode and congestion occurs in the low-latency queues, not all queues can be guaranteed low latency. Configuring low-latency only for high-priority queues is recommended.

Example

# Configure rate limiting for the outgoing AF1 queue packets on Tunnel 10.
<HUAWEI> system-view
[~HUAWEI] interface Tunnel 10
[*HUAWEI-Tunnel10] tunnel-protocol gre
[*HUAWEI-Tunnel10] port-queue af1 shaping 100 outbound
# 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] interface GigabitEthernet 0/1/0
[~HUAWEI-GigabitEthernet0/1/0] port-queue af1 cir 1000 cir-schedule pq pir 2000 pir-schedule pq outbound
# Set the CIR for the queue with the CoS of AF1 in the outbound direction of GE 0/1/0.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/0
[~HUAWEI-GigabitEthernet0/1/0] port-queue af1 shaping 100 outbound
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >