Implement the DiffServ QoS Model
Configuring CBWFQ and LLQ
Describing Advanced
Queuing Mechanisms
Queuing Methods Combined
Basic methods are combined to create more versatile queuing
mechanisms.
Class-Based Weighted
Fair Queuing
Class-Based Weighted Fair Queuing
• CBWFQ is a mechanism that is used to guarantee bandwidth
to classes.
• CBWFQ extends the standard WFQ functionality to provide
support for user-defined traffic classes:
– Classes are based on user-defined match criteria.
– Packets satisfying the match criteria for a class constitute
the traffic for that class.
• A queue is reserved for each class, and traffic belonging to a
class is directed to that class queue.
CBWFQ Architecture
and Benefits
CBWFQ Architecture
Classification
• Classification uses class maps.
• Availability of certain classification options depends on the Cisco
IOS version.
• Some classification options depend on type of interface and
encapsulation where service policy is used.
• For example:
– Matching on Frame Relay discard-eligible bits can be used only
on interfaces with Frame Relay encapsulation.
– Matching on MPLS experimental bits has no effect if MPLS is not
enabled.
– Matching on ISL priority bits has no effect if ISL is not used.
Scheduling
• CBWFQ guarantees bandwidth according to weights assigned to
traffic classes.
• Weights are internally calculated from bandwidth or its percentage.
• Bandwidth availability can be defined by specifying:
– Bandwidth (in kbps)
– Percentage of bandwidth (percentage of available interface
bandwidth)
– Percentage of remaining available bandwidth
• One service policy can not have mixed types of weights.
• The show interface command can be used to display the available
bandwidth.
Available Bandwidth
Available bandwidth is calculated according to the
following formula:
CBWFQ Benefits and Drawbacks
Benefits • Custom-defined classifications
• Minimum bandwidth allocation
• Finer granularity and scalability
Drawback • Voice traffic can still suffer unacceptable
delay.
Configuring and
Monitoring CBWFQ
Configuring CBWFQ
router(config-pmap-c)#
bandwidth bandwidth
• Allocates a fixed amount of bandwidth to a class.
• Sets the value in kilobits per second.
router(config-pmap-c)#
bandwidth percent percent
• Allocates a percentage of bandwidth to a class.
• The configured (or default) interface bandwidth is used to
calculate the guaranteed bandwidth.
router(config-pmap-c)#
bandwidth remaining percent percent
• Allocates a percentage of available bandwidth to a class.
Configuring CBWFQ (Cont.)
router(config-pmap-c)#
queue-limit queue-limit
• Sets the maximum number of packets that this queue can hold.
• The default maximum is 64.
router(config-pmap-c)#
fair-queue [number-of-dynamic-queues]
• The class-default class can be configured to use WFQ.
• The number of dynamic queues is a power of 2 in the range from
16 to 4096, specifying the number of dynamic queues.
Example of CBWFQ
Router(config)#access-list 101 permit udp host 10.10.10.10 host
10.10.10.20 range 16384 20000
Router(config-if)#access-list 102 permit udp host 10.10.10.10 host
10.10.10.20 range 53000 56000
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
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-c)#exit
Router(config-pmap)#class class2
Router(config-pmap-c)#bandwidth 2000
Router(config-pmap-c)#exit
Router(config-pmap)#class class-default
Router(config-pmap-c)#fair-queue
Router(config-pmap-c)#exit
Monitoring CBWFQ
router>
show policy-map interface [interface]
• Displays parameters and statistics of CBWFQ
Router#show policy-map interface
FastEthernet0/0
Service-policy output: policy1
Class-map: class1 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 101
Queueing
Output Queue: Conversation 265
Bandwidth 3000 (kbps) Max Threshold 30 (packets)
(pkts matched/bytes matched) 0/0
(depth/total drops/no-buffer drops) 0/0/0
<...part of the output omitted...>
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
Flow Based Fair Queueing
<...rest of the output omitted...>
Low Latency Queuing
Low Latency Queuing
• A priority queue is added to CBWFQ for real-time traffic.
• High-priority classes are guaranteed:
– Low-latency propagation of packets
– Bandwidth
• High-priority classes are also policed when congestion
occurs—they then cannot exceed their guaranteed
bandwidth.
• Lower-priority classes use CBWFQ.
LLQ Architecture and
Benefits
LLQ Architecture
LLQ Benefits
• High-priority classes are guaranteed:
– Low-latency propagation of packets
– Bandwidth
• Configuration and operation are consistent across all media
types.
• Entrance criteria to a class can be defined by an ACL.
– Not limited to UDP ports as with IP RTP priority
– Defines trust boundary to ensure simple classification and
entry to a queue
Configuring and
Monitoring LLQ
Configuring LLQ
router(config-pmap-c)#
priority bandwidth [burst]
• Allocates a fixed amount of bandwidth (in kilobits per second) to
a class and ensures expedited forwarding.
• Traffic exceeding the specified bandwidth is dropped if
congestion exists; otherwise, policing is not used.
router(config-pmap-c)#
priority percent percentage [burst]
• Allocates a percentage of configured or default interface
bandwidth to a class and ensures expedited forwarding.
• Traffic exceeding the specified bandwidth is dropped if
congestion exists.
Configuring LLQ (Cont.)
class-map voip
match ip precedence 5
!
class-map mission-critical
match ip precedence 3 4
!
class-map transactional
match ip precedence 1 2
!
policy-map Policy1
class voip
priority percent 10
class mission-critical
bandwidth percent 30
class transactional
bandwidth percent 20
class class-default
fair-queue
Monitoring LLQ
router>
show policy-map interface interface
• Displays the packet statistics of all classes that are configured for all
service policies on the specified interface or subinterface
router>show policy-map interface fastethernet 0/0
FastEthernet0/0
Service-policy output: LLQ
Class-map: LLQ (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Weighted Fair Queueing
Strict Priority
Output Queue: Conversation 264
Bandwidth 1000 (kbps) Burst 25000 (Bytes)
(pkts matched/bytes matched) 0/0
(total drops/bytes drops) 0/0
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Summary
• Basic queuing mechanisms can be used to build more
advanced queuing mechanisms such as CBWFQ and LLQ.
• CBWFQ is a mechanism that is used to overcome the
deficiencies of WFQ.
• CBWFQ extends the standard WFQ functionality to provide
support for traffic classes. Classes are based on user-
defined match criteria.
• CBWFQ provides a minimum bandwidth guarantee according
to traffic classes.
Summary (Cont.)
• LLQ is implemented within CBWFQ by the addition of a
priority queue that is serviced using a strict-priority
scheduler for time-sensitive traffic such as voice and video.
• The LLQ scheduler guarantees both low latency and
bandwidth for the traffic in the priority queue.
• In the event of congestion, if the priority-queue traffic
exceeds the bandwidth guarantee, a congestion-aware
policer is used to drop the exceeds traffic.