QOS Queuing and Scheduling

QOS Queuing and Scheduling

Posted on Jan 24, 2020 (0)

QOS Queuing and Scheduling

Whenever any traffic moves from high Bw link to low bandwidth link speed mismatches and cause network congestion. There also congestion occurs in aggregation layers and mostly due to oversubscription.

Two control and avoid congestion and manage the bandwidth there are two solutions available:

  • Congestion Management
  • Congestion Avoidance

Congestion Management: It uses the queuing algorithms to manage the congestion in network by shorting the packets and then prioritize the packets on output links by various queues. QOS Queuing feature are enabled by default, and when users configures its own queuing policy and apply it on interfaces the new queuing policy replaces the default on.

Congestion Avoidance: This method is used to monitor the network traffic to anticipate and avoid the congestion at common network bottleneck points. In this Packet is dropped by default feature like tail drop or by using more complex dropping technique like WRED.

Tail Drop:

When a packet reached to any interface and is not transmitted quickly it is queued and once interface are free to process the packet, the packet is taken out from queue and transmitted on the interface. If the rate at which packet arrives on interface is more than device capability to process it and forward it , the size of the queue starts increasing and at point comes it reaches to maximum and interface gets congested. Now to avoid this tail drops occurs which is default queuing response to congestion.

In tail drop those traffic which are trying to enter to interface and if interface is congested all entering packet will be dropped until congestion is eliminated and queue is no longer full.

When Tail drop happens it has following drawbacks:

  • It affects most TCP sessions which simultaneously back off and then restart again which further causes more link utilization also called as TCP Global Synchronization.
  • It also cause the another issue we say it as TCP Starvation, in which all buffers are temporarily seized by aggressive flows and normal TCP flows experience buffer starvation.

Methods to avoid tail drops issues:

We have seen the issue occurs when tail drops occurs. Tail drops can be prevented by using some congestion prevention technique like RED and WRED.

Random Early Detection (RED):

It is also called as Random Early Detection which randomly drops packets before queue is full. In RED when the average size of the queue increases RED drops the incoming packet and when average queue length is shorter it does not drops any packet.

With RED, problem of TCP global synchronization occurs very less and TCP can utilize the Link Bandwidth more efficiently. RED uses DSCP to create the different DROP profiles for different class of traffic.

RED profile is created to determine packet dropping policies which is based on average queue length. Any packet is dropped based on two thresholds which are configured on RED profile.

  • Minimum Threshold: When average queue length is equal to or above minimum threshold RED starts dropping packets until average queue size reaches to maximum threshold.
  • Maximum Threshold: When average queue size is above the maximum threshold all packets are dropped.

Based on the average queue size RED has three dropping modes:

  • When average queue size is in between 0 and configured minimum threshold no drops occurs.
  • When average queue size is in between configured minimum threshold and the configured maximum threshold, random drops occur.
  • When average queue size is > tan maximum threshold, full tail drop occur in the queue.

WRED (Weighted Random Early Detection):

WRED drops the packets based on its marking, WRED monitors the average queue length and determine when to discard packet based on length of interface queue.

When average queue length is > minimum threshold, WRED randomly drops packets with certain probability

When average queue length is > maximum threshold WRED switches to tail drops method.

WRED is not recommended for video and voice packets because voice packets are UDP based and it will not throttle back.

Tail drop and WRED can be configured on both ingress and egress and threshold can be different for different CoS values.

Example : Tail Drop

Defined queue size for different CoS value.

policy—map type queuing EGRESS
class type queuing lp3q4t—out—pql
queue-limit cos 5 20 mbytes
queue-limit cos 3 10 mbytes
queue-limit cos 0 5 mbytes

Exmaple WRED: Defines the minimum and maximum threshold as per  CoS value.

policy-map type queuing EGRESS
class type queuing Ip3q4t-out-pql
random—detect cos 4, 3  aggregate 15 mbytes 30 mbytes
random—detect cos 5,7 15 mbytes 20 mbytes

Congestion Management Technique:

 Congestion management techniques can be configured in a policy map on following attributes:


  • Allocate part of the interface bandwidth to the queue
  • Queue is reserved for each class
  • Minimum BW allocated to the class during congestion

Policy-map type queuing shape_queues
Class type queuing lp3q4t—out—pq1
Bandwidth 10 mbps


  • Allows delay-sensitive data to be dequeued and sent first
  • Strict priority queue is configured
  • Only one level of priority on an egress priority queue

Policy-map type queuing shape_queues
Class type queuing lp3q4t—out—pq1


  • Configured on an egress queue to limit a maximum rate
  • Queues packets as opposed to policing
  • Require some buffer space

Policy-map type queuing shape_queues
Class type queuing lp3q4t-out-pq1
Shape percent 25

In the example using the priority keyword, you designate the system-defined 1p3q41-oul-Pq1 as a priority queue that has strict priority over the other classes. The bandwidth command in shaping you configure the maximum rate that is allowed for the lp3q4t-out-pq1 class. In the example that is provided 25 percent of the underlying link speed is used as above limit for the traffic class on which the shaping is applied.


    You are will be the first.


Please login here to comment.