< Home

Configuring Traffic Shaping for a Queue

Context

Packets received on an interface enter different queues based on priority mapping. The device can provide differentiated services for queues of different priorities using different traffic shaping parameter settings for these queues.

Before configuring traffic shaping for queues on an interface, configure priority mapping to map packet priorities to per hop behaviors (PHBs) so that packets of different services enter different queues. For details about priority mapping, see Configuring Priority Mapping for the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-S, S5731S-H, S5732-H, S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735S-S, S5735-S-I, S6720-EI, S6720S-EI, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S, and Configuring Priority Mapping for the S2720-EI, S5720-LI, S5720S-LI, S5720-SI, S5720S-SI, S5720I-SI, S5730-SI, S5730S-EI, S6720-LI, S6720S-LI, S6720-SI, and S6720S-SI.

Procedure

  1. Run system-view

    The system view is displayed.

  2. (Optional) Run qos-shaping exclude-interframe

    The device is configured not to count the inter-frame gap and preamble of packets when the device calculates the traffic shaping rate.

    By default, the device counts the inter-frame gap and preamble of packets when the device calculates the traffic shaping rate.

  3. Run interface interface-type interface-number

    The interface view is displayed.

  4. Run qos queue queue-index shaping cir cir-value pir pir-value [ cbs cbs-value pbs pbs-value ]

    The traffic shaping rate is configured for a queue. It is recommended that the CBS be 120 times the CIR.

    By default, the traffic shaping rate for a queue is the maximum bandwidth of the interface.

    If both queue-based traffic shaping and outbound rate limiting (configured by the qos lr outbound command) are configured on an interface, the CIR for outbound rate limiting must be greater than or equal to the sum of CIR values of all queues on the interface; otherwise, the traffic shaping result may be incorrect. For example, a low-priority queue may preempt the bandwidth of a high-priority queue.

    On the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S, after traffic shaping is configured, statistics on the number of discarded packets in the display qos queue statistics command output may be incorrect upon heavy traffic bursts.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >