Configuring Low-Latency Queuing (LLQ) with Class-Based Weighted Random Early Detection (CBWRED)

Configuring Low-Latency Queuing (LLQ) with Class-Based Weighted Random Early Detection (CBWRED)

Figure 4-6 is a flowchart showing the architecture of Low-Latency Queuing with Class-Based Weighted Random Early Detection. The configuration that follows the diagram shows a specific example of configuring LLQ with CBWRED.

Figure 4-6. Low-Latency Queuing with Class-Based Weighted Random Early Detection


The tasks to configure CBWRED with LLQ are

STEP 1.
STEP 2.


STEP 3.
STEP 4.
STEP 5.

Step 1: Define One or More Class Maps to Specify Traffic

Router(config-cmap)# class-map match-any VoIP Creates class VoIP.
Router(config-cmap)# match precedence 5 Selects traffic with IP precedence 5.
Router(config-cmap)# class-map match-any CRITICAL Creates class CRITICAL.
Router(config-cmap)# match precedence 3 4 Selects traffic with IP precedence 3 and 4.
Router(config-cmap)# class-map match-any NOTCRITICAL Creates class NOTCRITICAL.
Router(config-cmap)# match precedence 1 2 Selects traffic with IP precedence 1 and 2.
Router(config-cmap)# exit Returns to global configuration mode.


Step 2: Create a Policy

Router(config)# policy-map POLICY-1 Creates policy POLICY-1.


Step 3: Add Class Maps to the Policy and Specify One (or More) Class(es) with Priority Bandwidth

Router(config-pmap)# class VoIP Associates class VoIP with policy POLICY-1.
Router(config-pmap-c)# priority percent 10 Guarantees 10% bandwidth with first priority data handling.
Router(config-pmap-c)# class CRITICAL Associates class CRITICAL with policy POLICY-1.
Router(config-pmap-c)# bandwidth percent 15 Sets guaranteed bandwidth to 15 percent.
Router(config-pmap-c)# random-detect Enables Random Early Detection.
Router(config-pmap-c)# random-detect precedence 3 26 40 10 Sets minimum (26 packets) and maximum (40 packets) drop thresholds for traffic with default mark-prob-denominator of 10 for precedence value 3.
Router(config-pmap-c)# random-detect precedence 4 28 40 10 Sets minimum (28 packets) and maximum (40 packets) drop thresholds for traffic with default mark-prob-denominator of 10 for precedence value 4.
NOTE: The DSCP-based random detect can apply a minimum drop threshold level, maximum drop threshold level, and mark-probability-denominator for each or any DSCP value within a queue or class.
Router(config-pmap-c)# class NOTCRITICAL Associates class NOTCRITICAL with policy POLICY-1.
Router(config-pmap-c)# bandwidth percent 30 Sets guaranteed bandwidth to 30 percent.
Router(config-pmap-c)# random-detect Enables Random Early Detection.
Router(config-pmap-c)# random-detect precedence 1 22 36 10 Sets minimum (22 packets) and maximum (36 packets) drop thresholds for traffic with default mark-prob-denominator of 10 for precedence value 1.
Router(config-pmap-c)# random-detect precedence 2 24 36 10 Sets minimum (24 packets) and maximum (36 packets) drop thresholds for traffic with default mark-prob-denominator of 10 for precedence value 2.
Router(config-pmap-c)# class class-default Associates class class-default with policy POLICY-1 for unspecified traffic.
Router(config-pmap-c)# fair-queue 20 Specifies the number of reserved dynamic queues for unclassified traffic.
Router(config-pmap-c)# random-detect Enables WRED with defaults for the "catch remaining traffic" default class.
Router(config-pmap-c)# exit Returns to Config-pmap mode.
Router(config-pmap)# exit Returns to global configuration mode.


Step 4: Apply Policy to an Interface

Router(config)# interface fastethernet 0/0 Chooses an interface to apply queuing policy.
Router(config-if)# service-policy output POLICY-1 Applies the queuing policy to outbound traffic.


Step 5: Verify Policy Configuration

Router# show policy-map interface fastethernet 0/0 Displays the configurations and statistics of policy maps applied at fastethernet 0/0.


Note

WRED is IP precedence-based by default, but it can be configured to be DSCP-based, if desired.

WRED has three configuration parameters: minimum threshold, maximum threshold, and mark probability denominator (MPD). If the size of the queue is smaller than the minimum threshold, packets are not dropped. As the size of the queue grows beyond the minimum threshold, the rate of packet drops also increases. If the size of the queue becomes larger than the maximum threshold, all arriving packets are dropped. The minimum and maximum threshold ranges are 1 to 4096.

MPD is an integer that dictates to drop 1 of the MPD when the size of the queue is between the minimum and maximum thresholds. For example, if the MPD is set to 10, and the queue size is between minimum and maximum values, there is a drop of 1 out of every 10 packets. The value of the mark probability can range from 1 to 65,535.

With WRED you can set up a different profile (with a minimum threshold, maximum threshold, and MPD) for each traffic priority.