This feature addresses the following goals:
Queuing can ensure that any traffic class does not starve other traffic types.
Respect the bandwidth guarantees for each traffic class.
Optimize the utilization of the uplink bandwidth.
Class-based weighted fair queuing (CBWFQ) extends the standard weighted fair queuing (WFQ) functionality to provide user-defined traffic classes. For CBWFQ, you define traffic classes based on match criteria including protocols and cos values. Packets that satisfy the match criteria for a class constitute the traffic for that class. A queue is reserved for each class, and traffic that belongs to a class is directed to the queue for that class.
Once a class has been defined according to its match criteria, you can assign its characteristics. To characterize a class, you assign a bandwidth. The bandwidth assigned to a class is the guaranteed bandwidth delivered to the class during congestion.
The traffic that does not match any of the configured classes is given best-effort treatment. Once a packet is classified, all of the standard mechanisms that can also be used to differentiate service among the classes apply.
For CBWFQ, 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 egress interface are classified according to the match criteria filters you define, and then each one is assigned the appropriate weight. The weight for a packet that belongs to a specific class is derived from the bandwidth that you assigned to the class when you configured it; the weight for a class is user-configurable.
After the weight for a packet 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—configuring CBWFQ—has three processes:
Defining traffic classes to specify the classification policy (class maps).
This process determines how many types of packets are to be differentiated from one another.
Associating policies—that is, class characteristics—with each traffic class (policy maps).
This process entails configuration of policies to be applied to packets that belong to one of the classes that were previously defined through a class map. For this process, you configure a policy map that specifies the policy for each traffic class.
Attaching policies to interfaces (service policies).
A queuing policy map can be applied only on an uplink in the egress (outbound) direction.
This process requires that you associate an existing policy map, or service policy, with an interface to apply the particular set of policies for the map to that interface.
Policy maps prioritize network traffic by class. You create policy maps to define how to treat each class of traffic so that it is prioritized for the best quality of service.