Legacy Congestion Management
Last updated
Last updated
In the incoming direction,there is only one software queue that is always serviced using a FIFO algorithm. To only configuration available for the input queue is the size. You can specify it with:
To see information about the hold-queue, use:
You can enable Selective Packet Discard to have more control over the Ingress Queue.
When a device needs to send packets out an interface, it sends them to the Hardware Queue, also known as the TX Ring. The Hardware Queue is always serviced using FIFO. The size of the outgoing Hardware Queue can be configured using:
To see the size of the hardware queue, use:
When the Hardware Queue is full, the packets are queued in the Outgoing Software Queue. The size of this queue can also be configured using:
This queue is serviced by default using FIFO (high speed interfaces) or WFQ (Serial interfaces with bandwidth lower than E1 – 2048kbps). However, the outgoing software Queue can be configured to use one of the available queueing algorithims: FIFO, Fair Queuing (WFQ or CBWFQ), Priority Queueing (PQ) or Custom Queuing (CQ). To see information about the hold-queue, use:
By default, all interfaces, except serial interfaces at E1(2048 kbps) or lower speeds, use the FIFO queuing. This means that packets are only served in the order of their arrival. A single queue is used for FIFO.
On serial interfaces with lower speeds (<2048 kbps), the default queuing mechanism used is Fair Queuing, but if you want, you can disable it and use FIFO instead:
To verify that FIFO is the queueing algorithm of an interface, use one of the following commands:
The main disadvantage of FIFO is that there is no difference between important traffic and less important traffic, so applications that need a certain level of QoS will not get it. Also, smaller flows, may end up being delayed or dropped altogether because the high bandwidth consumers are using all the available bandwidth.
Fair Queuing is a technique that offers a chance for the smallest flows to send traffic. At each time interval, the available bandwidth is split among all flows, based on the minimum request. That is the smallest flow will get the required bandwidth to send all traffic, and the other flows will get the same amount. The remaining bandwidth will be split again, also based on the minimum request, but this time there will be less flows. Cisco implements Fair Queuing with the possibility to prioritize traffic according to their importance. You can use fair queueing on an interface (called Flow-Based WFQ) or in a class-map inside a policy (called Class-Based WFQ).
Flow-Based Weighted Fair Queuing is the default queuing mechanism used on slow speed (<2048 kbps) serial interfaces. A flow is identified as all the packets that share the same source and destination IP, source and destination TCP port and the same IP ToS Byte. The weight for a flow is calculated using the formula:
In each time unit, a number of bytes inversely proportional to the weight or directly proportional to IP_Precedence+1 is sent for each flow. Let’s define the following variables:
The next two equations are true:
If you know the values for each Ni, then you know how much of the bandwidth will be assigned to a flow with a certain priority:
To enable flow-based WFQ if not already on, use:
WFQ assigns a hash value to each flow. Based on this hash, a flow is assigned to a CONVERSATION. Different flows can be assigned to the same Conversation.
WFQ also uses a flavor of RED to drop packets when the Congestive Discard Threshold (CDT) is reached. It will drop packets from the flow with the highest scheduled time calculated as
For a new flow, the previous Time is considered as the scheduled time of the last packet sent, therefor new flows are penalised just as old flows.
In addition to the queues assigned for each conversation (Queue ID: 1->CONVERSATIONS), there are 8 Link Queues which are reserved for network control and routing packets (Queue ID:CONVERSATIONS+1->CONVERSATIONS+8). The weight assigned for these queues is 1024 – which is lower than the lowest weight for normal traffic (32384/8 = 4048).
Then, if RTP Priority is used, it will use a Queue ID of CONVERSATIONS+9. This queue will have a weight of 0 and will act like a Priority Queue.
In the end, Queues for the RSVP flows are assigned and they will have a weight of 128.
To verify WFQ configuration, use:
The fallowing command displays information about all interfaces configured for fair-queueing:
CQ allows the use of up to 16 queues, with an assigned byte count. CQ cycles through each queue in a round-robin manner and allows each queue to send packets until the assigned byte count is exceeded. There is a default system queue (Queue 0) that cannot be configured, which will contain packets used for L2 keepalives. All other traffic, including routing updates are assigned to Queue 1 by default.
CQ uses a Deficit Round Robin algorithm, meaning that each time interval, a queue is allowed to send traffic until it exceeds the assigned Byte Count. If the Byte Count is exceeded, the packets are sent anyway, but the execess will be deducted from the Byte Count in the next round. The Byte Count also accounts for the L2 overhead. Let’s define for each queue:
We can then chose a convenient value for one of the k factors and find the Byte Count for each Queue so that our traffic is shared accordingly.
We can define different configurations for CQ on each interface. All configurations applied to an interface are grouped under a Queue-list. To configure CQ, first set up the queue length and byte count for each queue, using:
We will then classify packets and assign them to each queue. The packets can be assigned by interface or by protocol:
A default Queue can be assigned for unmatched traffic:
By default, Queue 0 is used as a Priority Queue. You can set more queues to be served as priority queues, using:
This command actually defines what is the lowest Queue that is served in a round-robin fashion. Queues from 0 to the LowestCustomQueue-1 are considered Priority Queues, and the others are considered Custom Queues. As you can see, by default only Queue 0 is a Priority Queue.
In the end, apply CQ-LIST configuration on the interface:
You can verify configuration with: To verify the configuration, use:
To see the configured CQ-LISTS, use:
Priorty Queuing is a Queuing mechanism wich uses 4 queues knwon as HIGH, MEDIUM, NORMAL and LOW. They are serviced in the order of their priority, with a higher priority queue being always served before a lower priority queue. As in CQ, the configuration that is applied on an interface is grouped in a LIST.
Each queue has a defined length and when it is full, packets are dropped. The length of each queue can be set using:
As with CQ, packets are assigned to a queue based on a classification process:
By default, all unclassified packets are assigned to the NORMAL queue, but this can be changed with:
In the end, apply the PQ-LIST configuration on the interface:
To verify, use:
To see the existing CQ-LISTS: