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 Priority Mapping Configuration.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Run qos queue queue-index shaping { percent cir cir-percent-value [ pir pir-percent-value ] | cir cir-value [ kbps | mbps | gbps ] [ cbs cbs-value [ bytes | kbytes | mbytes ] | pir pir-value [ kbps | mbps | gbps ] [ cbs cbs-value [ bytes | kbytes | mbytes ] pbs pbs-value [ bytes | kbytes | mbytes ] ] ] }
The traffic shaping rate is configured for a queue on the interface.
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 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.
- Run commit
The configuration is committed.