|
|
Once a class has been defined according to its match criteria, you can assign it characteristics. To characterize a class, you assign it bandwidth, weight, and maximum packet limit. The bandwidth assigned to a class is the minimum bandwidth delivered to the class during congestion.
To characterize a class, you also specify the queue limit for that class, which is the maximum number of packets allowed to accumulate in the class's queue. Packets belonging to a class are subject to the bandwidth and queue limits that characterize the class.
After a queue has reached its configured queue limit, enqueuing of additional packets to the class causes tail drop or packet drop to take effect, depending on how class policy is configured.
Tail drop is used for CBWFQ classes unless you explicitly configure policy for a class to use Weighted Random Early Detection (WRED) to drop packets as a means of avoiding congestion. Note that if you use WRED packet drop instead of tail drop for one or more classes comprising a policy map, you must ensure that WRED is not configured for the interface to which you attach that service policy.
If a default class is configured, all unclassified traffic is treated as belonging to the default class. If no default class is configured, then by default the traffic that does not match any of the configured classes is flow classified and given best-effort treatment. Once a packet is classified, all of the standard mechanisms that can be used to differentiate service among the classes apply.
Flow classification is standard WFQ treatment. That is, packets with the same source IP address, destination IP address, source Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) port, or destination TCP or UDP port are classified as belonging to the same flow. WFQ allocates an equal share of bandwidth to each flow. Flow-based WFQ is also called fair queueing because all flows are equally weighted.
For CBWFQ, which extends the standard WFQ fair queueing, the weight specified for the class becomes the weight of each packet that meets the match criteria of the class. Packets that arrive at the output interface are classified according to the match criteria filters you define, then each one is assigned the appropriate weight. The weight for a packet belonging to a specific class is derived from the bandwidth you assigned to the class when you configured it; in this sense the weight for a class is user-configurable.
After a packet's weight is assigned, the packet is enqueued in the appropriate class queue. CBWFQ uses the weights assigned to the queued packets to ensure that the class queue is serviced fairly.
Configuring a class policy--thus, configuring CBWFQ--entails these three processes:
CBWFQ allows you to specify the exact amount of bandwidth to be allocated for a specific class of traffic. Taking into account available bandwidth on the interface, you can configure up to 64 classes and control distribution among them, which is not the case with flow-based WFQ.
Flow-based WFQ applies weights to traffic to classify it into conversations and determine how much bandwidth each conversation is allowed relative to other conversations. These weights, and traffic classification, are dependent on and limited to the seven IP Precedence levels.
CBWFQ allows you to define what constitutes a class based on criteria that exceed the confines of flow. CBWFQ allows you to use access control lists and protocols or input interface names to define how traffic will be classified, thereby providing coarser granularity. You need not maintain traffic classification on a flow basis. Moreover, you can configure up to 64 discrete classes in a service policy.
Resource Reservation Protocol (RSVP) can be used in conjunction with CBWFQ. When both RSVP and CBWFQ are configured for an interface, RSVP and CBWFQ act independently, exhibiting the same behavior that they would if each were running alone. RSVP continues to work as it does when CBWFQ is not present, even in regard to bandwidth availability assessment and allocation.
For related information on this feature, refer to the following documents:
CBWFQ supports standard and extended numbered access lists only. For information on creating access lists, see the appropriate Cisco IOS Release 12.0 configuration guides and command references.
Attaching a service policy to an interface disables WFQ on that interface if WFQ is configured for the interface. For this reason, you should ensure that WFQ is not enabled on such an interface.
For information on WFQ, see the "Configuring Weighted Fair Queueing" chapter of the Cisco IOS Release 12.0 Quality of Service Solutions Configuration Guide.
Attaching a service policy containing classes configured to use WRED to an interface disables WRED on that interface. If any of the classes that you configure in a policy map use WRED for packet drop instead of tail drop, you must ensure that WRED is not configured on the interface to which you intend to attach that service policy.
You can specify a numbered access list as the match criterion for any class that you create. For this reason, you should know how to configure access lists.
None
None
Perform the following tasks to configure CBWFQ:
| Command | Purpose |
|---|---|
To attach a service policy to an interface and enable CBWFQ on the interface, you must create a policy map. You can configure class policies for as many classes as are defined on the router up to the maximum of 64.
To configure a policy map and create class policies (including a default class) comprising the service policy, use the first command in global configuration mode to specify the policy map name, then use the following commands in policy map configuration mode to configure policy for a standard class and the default class. The policy map's default class is the class to which traffic is directed if that traffic does not satisfy the match criteria of other classes whose policy is defined in the policy map. To configure policy for more than one class in the same policy map, repeat Steps 2 through 4. Note that this set of commands uses WRED's packet drop for both class policies, not CBWFQ's tail drop.
To attach a service policy to an interface and enable CBWFQ on the interface, you must create a policy map. You can configure class policies for as many classes as are defined on the router up to the maximum of 64.
| Step | Command | Purpose | ||
|---|---|---|---|---|
| Specifies the name of the policy map to be created or modified. | |||
| Specifies the name of a class to be created and included in the service policy. | |||
| Specifies the amount of bandwidth in kilobits per second (kbps) to be assigned to the class. | |||
| Router(config)# random-detect exponential-weighting-constant exponent | Configures the exponential weight factor used in calculating the average queue length. | ||
| Router(config-pmap)# class class-default default-class-name | Specify the name of the default class to be created as part of the service policy. | ||
| Specifies the number of hashed queues to be reserved for the default class. | |||
| Specifies the maximum number of packets that can be enqueued for the specified default class. |
| Step | Command | Purpose | ||
|---|---|---|---|---|
| Specifies the name of the policy map to which you want to add the class policy. | |||
| ||||
| Specifies the amount of bandwidth in kbps to be assigned to the class. | |||
| Router(config-pmap-c)# random-detect exponential-weighting-constant exponent | Configures the exponential weight factor used in calculating the average queue length. | ||
| Router(config-pmap-c)# random-detect precedence precedence min-threshold max-threshold mark-prob-denominator | Configures the parameters for packets with a specific IP Precedence. The minimum threshold for IP Precedence 0 corresponds to half the maximum threshold for the interface. Repeat this command for each precedence. |
| Command | Purpose |
|---|---|
Enables CBWFQ and attaches the specified service policy map to the output interface. |
To change the amount of bandwidth allocated for an existing class, use the following commands:
| Step | Command | Purpose | ||
|---|---|---|---|---|
| Specifies the name of the policy map containing the class to be modified. | |||
|
| Specifies the name of a class whose bandwidth you want to modify. | ||
| Specifies the new amount of bandwidth in kbps per second to be used to reconfigure the class. |
| Step | Command | Purpose | ||
|---|---|---|---|---|
| Specifies the name of the policy map containing the class to be modified. | |||
| Specifies the name of a class whose queue limit you want to modify. | |||
| Specifies the new maximum number of packets that can be enqueued for the class to be reconfigured.The default and maximum number of packets is 64. |
| Step | Command | Purpose | ||
|---|---|---|---|---|
| Specifies the name of the policy map containing the classes to be deleted. | |||
| Specifies the name of the class(es) to be deleted. | |||
| Router(config-pmap-c)# | Deletes the default class. |
To display the contents of a specific policy map, a specific class from a specific policy map, or all policy maps configured on an interface, use one of the following global configuration commands:
| Command | Purpose |
|---|---|
Displays the configuration of all classes comprising the specified policy map. | |
Displays the configuration of the specified class of the specified policy map. | |
Displays the configuration of all classes configured for all policy maps on the specified interface. |
This section provides the following configuration examples:
Router(config)# class-map class1
Router(config-cmap)# match access-group 101 Router(config-cmap)# exit Router(config)# class-map class2
Router(config-cmap)# match access-group 102 Router(config-cmap)# exit
In the following example, a policy map called policy1 is defined to contain policy specification for the two classes--class1 and class2. The match criteria for these classes were defined in the class maps previous example "Configure Class Maps."
For class1, the policy includes bandwidth allocation request and maximum packet count limit for the queue reserved for the class. For class2, the policy specifies only bandwidth allocation request, so the default queue limit of 64 packets is assumed.
Router(config)# policy-map policy1 Router(config-pmap)# class class1 Router(config-pmap-c)# bandwidth 3000 Router(config-pmap-c)# queue-limit 30 Router(config-pmap)# exit Router(config-pmap)# class class2 Router(config-pmap-c)# bandwidth 2000 Router(config-pmap)# exit
Router(config)# interface e1/1
Router(config-if)# service output policy1 Router(config-if)# exit Router(config)# interface fa1/0/0
Router(config-if)# service output policy1 Router(config-if)# exit
This section documents new commands that configure the CBWFQ feature. All other commands used with this feature are documented in the Cisco IOS Release 12.0 command references.
bandwidth-kbps | Amount of bandwidth in kilobits per second to be assigned to the class. |
No default behavior.
Policy map configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
You use the bandwidth command when you configure policy in a policy map for a class defined by the class-map command. The bandwidth command specifies the bandwidth for traffic in that class. CBWFQ derives the weight for packets belonging to the class from the bandwidth allocated to the class. CBWFQ then uses the weight to ensure that the queue for the class is serviced fairly.
Note that when the policy map containing class policy configurations is attached to the interface to stipulate the service policy for that interface, available bandwidth is assessed. If a policy map cannot be attached to a particular interface because of insufficient interface bandwidth, then the policy is removed from all interfaces to which it was successfully attached.
The following example modifies the bandwidth for a class called acl22. The default class belongs to a service policy map called polmap6. The previous bandwidth for this class was 3000.
policy-map polmap6
class acl22
bandwidth 2000
queue-limit 30
| Command | Description |
class | Specifies the class policy whose bandwidth specification is to be configured or modified. |
class class-default | Specifies the default class whose bandwidth is to be configured or modified. |
policy-map | Specifies the policy map to which the class belongs whose bandwidth is to be configured or modified. |
random-detect exponential-weighting-constant | Configures the exponential weight factor used in calculating the average queue length. |
random-detect precedence | Configures the parameters for packets with a specific IP Precedence. The minimum threshold for IP Precedence 0 corresponds to half the maximum threshold for the interface. Repeat this command for each precedence. |
To specify the name of the class whose policy you want to create or change or to specify the default class called class-default before you configure its policy, use the class policy map configuration command. To remove a class from the policy map, use the no form of this command.
class [class-name | class-default]
class-name | The name of the class for which you want to configure or modify policy. |
class-default | Specifies the default class so that you can configure or modify its policy. |
No default behavior.
Policy map configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
Enter the policy-map command to identify the policy map and enter policy map configuration mode before you use the class command. After you specify a policy map, you can configure policy for new classes or modify policy for any existing classes in that policy map.
The class name that you specify in the policy map ties the characteristics for that class--that is, its policy--to the class map and its match criteria configured using the class-map command.
When you configure policy for a class and specify its bandwidth and attach the policy map to an interface, class-based weighted fair queueing (CBWFQ) checks to determine if the bandwidth requirement of the class can be satisfied. If so, CBWFQ creates the necessary internal data structures to maintain state for the class and allocates a queue for it.
When a class is removed, available bandwidth for the interface is incremented by the amount previously allocated to the class.
The maximum number of classes you can configure for a router--and, therefore, within a policy map--is 64.
The predefined class-default default class match criteria select for packets not otherwise matched. You can use any of the following pairs of commands to configure policy for the class-default default class:
The following example configures policy for a class named acl136 included in the policy map called policy1. Class acl136 has these characteristics: a minimum of 2000 kilobits per second (kbps) of bandwidth are expected to be delivered to this class in the event of congestion, and the queue reserved for this class can enqueue 40 packets before tail drop is enacted. Note that when the policy map containing this class is attached to the interface to stipulate the service policy for that interface, available bandwidth is assessed, taking into account all class policies and RSVP, if configured.
policy-map policy1 class acl136 bandwidth 2000 queue-limit 40
The following example configures policy for a class named int101 included in the policy map called policy8. Class int101 has these characteristics: a minimum of 3000 kbps of bandwidth are expected to be delivered to this class in the event of congestion, and a weight factor of 10 is used to calculate the average queue size. For congestion avoidance, WRED packet drop is used, not tail drop. Note that when the policy map containing this class is attached to the interface to stipulate the service policy for that interface, available bandwidth is assessed.
policy-map policy8 class int101 bandwidth 3000 random-detect exponential-weighting-constant 10
The following example configures policy for the class-default default class included in the policy map called policy1. The class-default default class has these characteristics: 10 hashed queues for traffic that does not meet the match criteria of other classes whose policy is defined by the policy map policy1, and a maximum of 20 packets per queue before tail drop is enacted to handle additional enqueued packets.
policy-map policy1 class class-default fair-queue 10 queue-limit 20
The following example configures policy for the class-default default class included in the policy map called policy8. The class-default default class has these characteristics: 20 hashed queues for traffic that doesn't meet the match criteria of other classes whose policy is defined by the policy map policy8 and a weight factor of 20 is used to calculate the average queue size. For congestion avoidance, WRED packet drop is used, not tail drop.
policy-map policy8 class class-default fair-queue 20 random-detect exponential-weighting-constant 14
| Command | Description |
bandwidth | Specifies or modifies the bandwidth allocated for a class whose policy is specified in the policy map. |
policy-map | Specifies the policy map to which the class policy belongs. |
queue-limit | Specifies or modifies the maximum number of packets that can accumulate in the queue reserved for the class before tail drop or (if WRED is configured as part of the class policy) packet drop is enacted. |
random-detect exponential-weighting-constant | Configures the exponential weight factor used in calculating the average queue length.
|
random-detect precedence | Configures the parameters for packets with a specific IP Precedence. |
To create a class map to be used for matching packets to the class whose name you specify, use the class-map global configuration command. To remove an existing class map from the router, use the no form of this command.
class-map class-map-name
class-map-name | Name of the class for the class map. The class name is used for both the class map and to configure policy for the class in the policy map. |
No default behavior.
Global configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
Use this command to specify the name of the class for which you want to create or modify class map match criteria. Use of the class-map command enables class map configuration mode in which you can enter one of the match commands to configure the match criteria for this class. Packets arriving at the output interface are checked against the match criteria configured for a class map to determine if the packet belongs to that class.
The following example specifies access101 as the name of a class, and it defines a class map for this class. The match access-group command is entered following the class-map command to configure the numbered access control list (ACL) 101 whose contents are to be used as match criteria for the class.
class-map access101 match access-group 101
| Command | Description |
class | Specifies a class belonging to a service policy map. |
class class-default | Specifies the default class for a service policy map. |
match access-group | Configures the match criteria for a class map based on the specified ACL number. |
match input-interface | Configures the match criteria for a class map based on the specified input interface. |
match protocol | Configures the match criteria for a class map based on the specified protocol. |
policy-map | Specifies the policy map to which the class belongs. |
number-of-hashed-queues | A number in the range of 16 through 4096 specifying the number of hashed queues. |
No default behavior.
Policy map configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
The fair-queue command can be used for the class-default default class only. You can use it in conjunction with either the queue-limit command or the random-detect exponential-weighting-constant command.
The following example configures the class-default default class for the policy map called policy9 to reserve 10 hashed queues for packets that do not satisfy match criteria specified for other classes whose policy is configured in the same service policy. Because the queue-limit command is configured, tail drop is used for each hashed queue when the maximum number of packets are enqueued and additional packets arrive.
policy-map policy9
class class-default
fair-queue 10 queue-limit 20
The following example configures policy for the class-default default class included in the policy map called policy8. The fair-queue command reserves 20 hashed queues to be used for the class-default default class. For congestion avoidance, weighted random early detection (WRED) or (DWRED) packet drop is used, not tail drop.
policy-map policy8
class class-default
fair-queue 20 random-detect exponential-weighting-constant 14
| Command | Description |
class class-default | Specifies the default class for a service policy map. |
queue-limit | Specifies or modifies the maximum number of packets that can accumulate in the queue reserved for the class before tail drop or (if WRED is configured as part of the class policy) packet drop is enacted. |
random-detect exponential-weighting-constant | Configures the exponential weight factor used in calculating the average queue length. |
access-list-number | A numbered ACL whose contents are used as the match criteria against which packets are checked to determine if they belong to this class. |
No default behavior.
Class map configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
For class-based weighted fair queueing (CBWFQ), you define traffic classes based on match criteria including numbered ACLs, protocols, and input interfaces. Packets satisfying the match criteria for a class constitute the traffic for that class. The match access-group command specifies a numbered ACL whose contents are used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map. Use the class-map command to specify the name of the class whose match criteria you want to establish. After you identify the class, you can use the match access-group command to configure the match criteria.
The following example specifies a class map called acl144 and configures the ACL numbered 144 to be used as the match criteria for this class.
class-map acl144 match access-group 144
| Command | Description |
class-map | Creates a class map for the specified class. |
match input-interface | Configures the match criteria for a class map based on the specified input interface. |
match protocol | Configures the match criteria for a class map based on the specified protocol. |
interface-name | Name of the input interface to be used as match criteria |
No default behavior.
Class map configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
For class-based weighted fair queueing (CBWFQ), you define traffic classes based on match criteria including input interfaces, numbered access control lists (ACLs), and protocols. Packets satisfying the match criteria for a class constitute the traffic for that class. The match input-interface command specifies the name of an input interface to be used as the match criterion against which packets are checked to determine if they belong to the class specified by the class map. Use the class-map command to specify the name of the class whose match criteria you want to establish. After you identify the class, you can use the match input-interface command to configure its match criteria.
The following example specifies a class map called eth1 and configures the input interface named ethernet1to be used as the match criterion for this class:
class-map eth1 match input-interface ethernet1
| Command | Description |
class-map | Creates a class map for the specified class. |
match access-group | Configures the match criteria for a class map based on the specified numbered ACL. |
match protocol | Configures the match criteria for a class map based on the specified protocol. |
protocol | Name of the protocol to match against. The following protocols are supported: apollo--Apollo Domain arp--IP ARP bridge--Bridging bstun--Block Serial Tunnel cdp--Cisco Discovery Tunnel clns--ISO CLNS clns_es--ISO CLNS End System clns_is--ISO CLNS Intermediate System cmns--ISO CMNS compressedtcp--Compressed TCP decnet--DECnet decnet_node--DECnet Node decnet_router-I1--DECnet Router L1 decnet_router-I2--DECnet Router L2 dlsw--Data Link Switching ip--IP ipx--Novell IPX llc2--llc2 pad--PAD links qllc--qllc protocol rsrb--Remote Source-Route Bridging snapshot--Snapshot routing support stun--Serial Tunnel vines--Banyan Vines xns--Xerox Network Services |
No default behavior.
Class map configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
For class-based weighted fair queueing (CBWFQ), you define traffic classes based on match criteria including protocols, numbered access control lists (ACLs), and input interfaces. Packets satisfying the match criteria for a class constitute the traffic for that class. The match protocol command specifies the name of a protocol to be used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map. Use the class-map command to specify the name of the class whose match criteria you want to establish. After you identify the class, you can use the match protocol command to configure the match criteria for it.
The following example specifies a class map called ipx and configures the ipx protocol as match criteria for it:
class-map ipx match protocol ipx
| Command | Description |
class-map | Creates a class map for the specified class. |
match access-group | Configures the match criteria for a class map based on the specified numbered ACL. |
match input-interface | Configures the match criteria for a class map based on the specified input interface. |
policy-map | Name of the policy map. |
No default behavior or values.
Global configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
Use the policy-map command to specify the name of the policy map to be created, added to, or modified before you can configure policies for classes whose match criteria are defined in a class map. Entering the policy-map command enables policy map configuration mode in which you can configure or modify the class policies for that policy map.
You can configure class policies in a policy map only if the classes have match criteria defined for them. You use the class-map and match commands to configure the match criteria for a class. Because you can configure a maximum of 64 class maps, no policy map can contain more than 64 class policies.
A single policy map can be attached to multiple interfaces concurrently. When you attempt to attach a policy map to an interface, the attempt is denied if the interface's available bandwidth cannot accommodate the total bandwidth requested by class policies comprising the policy map. In this case, if the policy map is already attached to other interfaces, it is removed from them.
Whenever you modify class policy in an attached policy map, CBWFQ is notified and the new classes are installed as part of the policy map in the CBWFQ system.
The following example creates a policy map call policy9 and configures three class policies to belong to that map. Of these classes, two specify policy for classes with class maps that specify match criteria based on either a numbered access control list (ACL) or an interface name, and one specifies policy for the default class called class-default to which packets that do not satisfy configured match criteria are directed.
policy-map policy9 class acl136 bandwidth 2000 queue-limit 40 class ethernet101 bandwidth 3000 random-detect exponential-weighting-constant 10 class class-default
fair-queue 10 queue-limit 20
| Command | Description |
bandwidth | Specifies or modifies the bandwidth allocated for a class belonging to a policy map. |
class | Specifies the class whose bandwidth is to be configured or modified. |
class class-default | Specifies the default class whose bandwidth is to be configured or modified. |
queue-limit | Specifies or modifies the maximum number of packets that can accumulate in the queue reserved for a class of a policy map. |
random-detect exponential-weighting-constant | Configures the exponential weight factor used in calculating the average queue length. |
random-detect precedence | Configures the parameters for packets with a specific IP Precedence. The minimum threshold for IP Precedence 0 corresponds to half the maximum threshold for the interface. Repeat this command for each precedence. |
service-policy output | Enables CBWFQ and attaches the specified service policy map to the interface. |
To specify or modify the maximum number of packets the queue can hold for a class policy configured in a policy map, use the queue-limit policy map configuration command. To remove the queue packet limit from a class, use the no form of this command.
queue-limit number-of-packets
number-of-packets | A number in the range of 1 through 64 specifying the maximum number of packets that the queue for this class can accumulate. |
64
Policy map configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
Weighted fair queueing (WFQ) creates a queue for every class for which a class map is defined. Packets satisfying the match criteria for a class accumulate in the queue reserved for the class until they are transmitted, which occurs when the queue is serviced by the fair queueing process. When the maximum packet threshold you defined for the class is reached, enqueuing of any further packets to the class queue causes tail drop or, if Weighted Random Early Detection (WRED) is configured for the class policy, packet drop to take effect.
The following example configures a policy map called policy11 to contain policy for a class called acl203. Policy for this class is set so that the queue reserved for it has a maximum packet limit of 40.
policy-map policy11 class acl203 bandwidth 2000 queue-limit 40
| Command | Description |
class | Specifies the class whose queue limit is to be configured or modified. |
class class-default | Specifies the default class whose bandwidth is to be configured or modified. |
policy-map | Specifies the policy map to which the class belongs whose queue limit is to be configured or modified. |
To configure the Weighted Random Early Detection (WRED) and Distributed WRED (DWRED) on an interface to specify the exponential weight factor for the average queue size calculation for the queue, use the random-detect exponential-weighting-constant interface command.
To configure WRED (DWRED) as class policy in a policy map to specify the exponential weight factor for the average queue size calculation for the queue reserved for a class, use the random-detect exponential-weighting-constant policy map configuration command. To return the value to the default, use the no form of this command.
random-detect exponential-weighting-constant exponent
exponent | Exponent from 1 to 16 used in the average queue size calculation. |
The default exponential weight factor is 9.
Interface configuration when used on an interface.
Policy map configuration when used to specify class policy in a policy map.
| Release | Modification |
|---|---|
11.1 CC | This command was first introduced. |
WRED (DWRED) is a congestion avoidance mechanism that slows traffic by randomly dropping packets when there is congestion. WRED is only useful with protocols like TCP, which respond to dropped packets by decreasing the transmission rate.
Use this command to change the exponent used in the average queue size calculation for the WRED and DWRED services.
You can use the random-detect exponential-weighting-constant command to configure the exponential weight factor for the average queue size calculation for the queue for a class or for WRED (DWRED) on an interface.
You can configure WRED (DWRED) as part of the policy for a standard class or the default class. The WRED (DWRED) random-detect exponential-weighting-constant command and the WFQ queue-limit command are mutually exclusive for class policy.
If you configure WRED (DWRED), its packet drop capability is used to manage the queue when packets exceeding the configured maximum count are enqueued. If you configure the WFQ queue-limit command for class policy, tail drop is used.
Here are the valid uses of this command for specifying class policy within a policy map:
Note that if you use WRED (DWRED) packet drop instead of tail drop for one or more classes composing a policy map, you must ensure that WRED (DWRED) is not configured for the interface to which you attach that service policy. Attaching a service policy containing classes configured to use WRED (DWRED) to an interface disables WRED (DWRED) on that interface.
The WRED (DWRED) feature is supported on these Cisco router platforms:
The DWRED feature is not supported for class policy. DWRED is only supported on Cisco 7000 series routers with an RSP7000 card and Cisco 7500 series routers with a VIP2-40 or greater interface processor. A VIP2-50 interface processor is strongly recommended when the aggregate line rate of the port adapters on the VIP is greater than DS3. A VIP2-50 interface processor is required for OC-3 rates. To use DWRED, Distributed Cisco Express Forwarding (DCEF) switching must first be enabled on the interface. For more information on DCEF, refer to the Cisco IOS Switching Services Configuration Guide and the Cisco IOS Switching Services Command Reference.
The following example configures WRED on an interface with a weight factor of 10:
router(config)# interface Hssi0/0/0 router(config-if)# description 45Mbps to R1 router(config-if)# ip address 200.200.14.250 255.255.255.252 router(config-if)# random-detect router(config-if)# random-detect exponential-weighting-constant 10
The following example configures policy for a class named int10 to configure the exponential weight factor as 12. This is the weight factor used for the average queue size calculation for the queue for class int10. WRED packet drop is used for congestion avoidance for class int10, not tail drop.
policy-map policy12
class int10
bandwidth 2000 random-detect exponential-weighting-constant 12
| Command | Description |
bandwidth | Specifies the class whose queue limit is to be configured or modified. |
fair-queue | Specifies the default class whose bandwidth is to be configured or modified. |
random-detect | Specifies the policy map to which the class belongs whose queue limit is to be configured or modified. |
random-detect precedence | Configures the WRED (DWRED) parameters for a particular IP Precedence. |
show policy interface | Displays configurations for all classes configured for all service policies on the specified interface. |
To configure WRED as class policy in a policy map to specify the parameters for a particular IP precedence, use the random-detect precedence policy map configuration command. To return the values to the default for the precedence, use the no form of this command.
random-detect precedence precedence min-threshold max-threshold mark-prob-denominator
precedence | IP precedence number. The value range is 0 to 7 and RSVP. For Cisco 7000 series routers with an RSP7000 interface processor and Cisco 7500 series routers with a VIP2-40 interface processor (VIP2-50 interface processor strongly recommended), the precedence value ranges from 0 to 7 only; see Table 1. |
min-threshold | Minimum threshold in number of packets. The value range of this argument is 1 to 4096. When the average queue length reaches the minimum threshold, WRED drops some packets with the specified IP precedence. |
max-threshold | Maximum threshold in number of packets. The value range of this argument is the value of the min-threshold argument to 4096. When the average queue length exceeds the maximum threshold, WRED drops all packets with the specified IP precedence. |
mark-prob-denominator | Denominator for the fraction of packets dropped when the average queue depth is at the maximum threshold. For example, if the denominator is 512, one out of every 512 packets is dropped when the average queue is at the maximum threshold. The value range is 1 to 65536. The default is 10; one out of every ten packets is dropped at the maximum threshold. |
For all precedences, the mark-prob-denominator is 10, and the max-threshold is based on the output buffering capacity and the transmission speed for the interface.
The default min-threshold depends on the precedence. The min-threshold for IP precedence 0 corresponds to half of the max-threshold. The values for the remaining precedences fall between half the max-threshold and the max-threshold at evenly spaced intervals.
Table 1 lists the default minimum threshold value for each IP precedence.
| Minimum Threshold Value (Fraction of Maximum Threshold Value) | ||
|---|---|---|
| IP Precedence | WRED | DWRED |
0 | 9/18 | 8/16 |
1 | 10/18 | 9/16 |
2 | 11/18 | 10/16 |
3 | 12/18 | 11/16 |
4 | 13/18 | 12/16 |
5 | 14/18 | 13/16 |
6 | 15/18 | 14/16 |
7 | 16/18 | 15/16 |
RSVP | 17/18 | N/A |
Interface configuration when used on an interface.
Policy map configuration when used to specify class policy in a policy map.
| Release | Modification |
|---|---|
11.1 CC | This command was first introduced. |
When you configure the random-detect command on an interface, packets are given preferential treatment based on the IP Precedence of the packet. Use the random-detect precedence command to adjust the treatment for different precedences.
If you want WRED (DWRED) to ignore the precedence when determining which packets to drop, enter this command with the same parameters for each precedence. Remember to use reasonable values for the minimum and maximum thresholds.
Note that if you use the random-detect precedence command to adjust the treatment for different precedences within class policy, you must ensure that WRED (DWRED) is not configured for the interface to which you attach that service policy. Attaching a service policy containing classes configured to use WRED (DWRED) to an interface disables WRED (DWRED) on that interface.
The WRED feature is supported on these Cisco router platforms:
The DWRED feature is not support in class policy. The DWRED feature is only supported on Cisco 7000 series routers with an RSP7000 card and Cisco 7500 series routers with a VIP2-40 or greater interface processor. A VIP2-50 interface processor is strongly recommended when the aggregate line rate of the port adapters on the VIP is greater than DS3. A VIP2-50 interface processor is required for OC-3 rates. To use DWRED, Distributed Cisco Express Forwarding (DCEF) switching must first be enabled on the interface. For more information on DCEF, refer to the Cisco IOS Switching Services Configuration Guide and the Cisco IOS Switching Services Command Reference.
The following example enables WRED (DWRED) on the interface and specifies parameters for the different IP precedences:
interface Hssi0/0/0 description 45Mbps to R1 ip address 200.200.14.250 255.255.255.252 random-detect random-detect precedence 0 32 256 100 random-detect precedence 1 64 256 100 random-detect precedence 2 96 256 100 random-detect precedence 3 120 256 100 random-detect precedence 4 140 256 100 random-detect precedence 5 170 256 100 random-detect precedence 6 290 256 100 random-detect precedence 7 210 256 100 random-detect precedence rsvp 230 256 100
The following example configures policy for a class named acl10 included in the policy map called policy10. Class int101 has these characteristics: a minimum of 2000 kbps of bandwidth are expected to be delivered to this class in the event of congestion and a weight factor of 10 is used to calculate the average queue size. For congestion avoidance, WRED packet drop is used, not tail drop. IP Precedence is reset for levels 0 through 5.
policy-map policy10
class acl10
bandwidth 2000 random-detect exponential-weighting-constant 10 random-detect precedence 0 32 256 100 random-detect precedence 1 64 256 100 random-detect precedence 2 96 256 100 random-detect precedence 3 120 256 100 random-detect precedence 4 140 256 100 random-detect precedence 5 170 256 100
| Command | Description |
bandwidth | Specifies (or modifies) the bandwidth allocated for a class belonging to a policy map. |
fair-queue | Specifies the number of hashes queues to be reserved for use by the default class |
random-detect | Specifies the policy map to which the class belongs whose queue limit is to be configured or modified. |
random-detect precedence | Configures the WRED parameters for a particular IP Precedence. |
show policy interface | Displays configurations for all classes configured for all service policies on the specified interface. |
input | Attaches the specified policy map to the input interface. |
output | Attaches the specified policy map to the output interface. |
policy-map | The name of a service policy map (created using the policy-map command) to be attached. |
No service policy is specified.
Global configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
You can attach a single policy map to one or more interfaces to specify the service policy for those interfaces.
Currently a service policy specifies CBWFQ. The class policies comprising the policy map are then applied to packets that satisfy the class map match criteria for the class.
To successfully attach a policy map to an interface, the aggregate of the configured minimum bandwidths of the classes comprising the policy map must be less than or equal to 75 percent of the interface bandwidth.
Attaching a service policy and enabling CBWFQ on an interface renders ineffective any commands related to fancy queueing such as commands pertaining to fair queueing, custom queueing, priority queueing, and Weighted Random Early Detection (WRED). You can configure these features only after you remove the policy map from the interface.
You can modify a policy map attached to an interface, changing the bandwidth of any of the classes comprising the map. Bandwidth changes that you make to an attached policy map are effective only if the aggregate of the bandwidth amounts for all classes comprising the policy map, including the modified class bandwidth, is less than or equal to 75 percent of the interface bandwidth. If the new aggregate bandwidth amount exceeds 75 percent of the interface bandwidth, the policy map is not modified.
The following example attaches the service policy map called policy9 to the input interface Serial1:
interface Serial1 service-policy input policy9
The following example attaches the policy called policy9 to the output interface serial1 to specify the service policy for the interface and enable CBWFQ on it.
interface serial1 service-policy output policy9
| Command | Description |
policy-map | Specifies a policy map to be assigned to an interface. |
show policy | Displays configuration of all classes for a policy map. |
policy-map | (Optional) The name of the service policy map whose complete configuration is to be displayed. |
All existing policy map configurations are displayed.
Global configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
The show policy command displays the configuration of a service policy map created using the policy-map command. You can use the show policy command to display all class configurations comprising any existing service policy map, whether or not that service policy map has been attached to an interface.
The following example displays the contents of the po1 service policy map:
Router# show policy po1 Policy Map po1
Weighted Fair Queueing
Class class1
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class2
Bandwidth 937 (kbps) Max thresh 64 (packets) Class class3
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class4
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class5
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class6
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class7
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class8
Bandwidth 937 (kbps) Max thresh 64 (packets)
The following example displays the contents of all policy maps on the router:
Router# show policy Policy Map poH1
Weighted Fair Queueing
Class class1
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class2
Bandwidth 937 (kbps) Max thresh 64 (packets) Class class3
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class4
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class5
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class6
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class7
Bandwidth 937 (kbps) Max thresh 64 (packets)
Class class8
Bandwidth 937 (kbps) Max thresh 64 (packets) Policy Map policy2
Weighted Fair Queueing
Class class1
Bandwidth 300 (kbps) Max thresh 64 (packets)
Class class2
Bandwidth 300 (kbps) Max thresh 64 (packets) Class class3
Bandwidth 300 (kbps) Max thresh 64 (packets)
Class class4
Bandwidth 300 (kbps) Max thresh 64 (packets)
Class class5
Bandwidth 300 (kbps) Max thresh 64 (packets)
Class class6
Bandwidth 300 (kbps) Max thresh 64 (packets)
| Command | Description |
show policy class | Displays the configuration for the specified class of the specified service policy map. |
show policy interface | Displays the configuration of all classes configured for all service policy maps on the specified interface. |
policy-map | The name of a policy map that contains the class configuration to be displayed. |
class-name | The name of the class whose configuration is to be displayed. |
No default behavior or values.
Global configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
You can use the show policy class command to display any one class configuration for any service policy map, whether or not the specified service policy map has been attached to an interface.
The following example displays configurations for the class called class7 that belongs to the policy map po1.
Router# show policy po1 class class7
Class class7
Bandwidth 937 (kbps) Max Thresh 64 (packets)
| Command | Description |
show policy | Displays the configuration for all classes of the specified service policy map. |
show policy interface | Displays the configuration of all classes configured for all service policies on the specified interface. |
interface-name | Name of the interface whose policy configuration is to be displayed. |
No default behavior.
Global configuration
| Release | Modification |
|---|---|
12.0(5)T | This command was first introduced. |
The show policy interface command displays the configuration for classes on the specified interface only if a service policy has been attached to the interface.
The following example displays configurations for classes on the output interface e1/1:
Router# show policy interface e1/1
Ethernet1/1 output : po1 Weighted Fair Queueing Class class1 Output Queue: Conversation 264 Bandwidth 937 (kbps) Max Threshold 64 (packets) (total/discards/tail drops) 11548/0/0 Class class2 Output Queue: Conversation 265 Bandwidth 937 (kbps) Max Threshold 64 (packets) (total/discards/tail drops) 11546/0/0 Class class3 Output Queue: Conversation 266 Bandwidth 937 (kbps) Max Threshold 64 (packets) (total/discards/tail drops) 11546/0/0 Class class4 Output Queue: Conversation 267 Bandwidth 937 (kbps) Max Threshold 64 (packets) (total/discards/tail drops) 11702/0/0 Class class5 Output Queue: Conversation 268 Bandwidth 937 (kbps) Max Threshold 64 (packets) (total/discards/tail drops) 11701/0/0 Class class6 Output Queue: Conversation 269 Bandwidth 937 (kbps) Max Threshold 64 (packets) (total/discards/tail drops) 11702/0/0 Class class7 Output Queue: Conversation 270 Bandwidth 937 (kbps) Max Threshold 64 (packets) (total/discards/tail drops) 11857/0/0 Class class8 Output Queue: Conversation 271 Bandwidth 937 (kbps) Max Threshold 64 (packets) (total/discards/tail drops) 11858/1/0
| Command | Description |
show policy | Displays the configuration for all classes of the specified service policy map. |
show policy class | Displays the configuration for the specified class of the specified service policy map. |
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Wed Aug 16 20:50:00 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.