Using Class-Based Weighted Fair Queuing
Problem
You want to use Class-Based Weighted Fair Queuing on an interface.
Solution
There are three steps to configuring Class-Based Weighted Fair Queuing (CBWFQ) on a router. First, you have to create one or more class maps that describe the traffic types. Then you create a policy map that tells the router what to do with these traffic types. Finally, you need to attach this policy map to one or more of the router’s interfaces:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#class-map
Router(config-cmap)#
highprec
description
Router(config-cmap)#
Highest priority Prec=5
match ip precedence
Router(config-cmap)#
5
exit
Router(config)#class-map
Router(config-cmap)#
medhiprec
description
Router(config-cmap)#
Medium-high priority Prec=4
match ip precedence
Router(config-cmap)#
4
exit
Router(config)#class-map med
Router(config-cmap)#
loprec
description
Router(config-cmap)#
Medium-low priority Prec=2,3
match ip precedence
Router(config-cmap)#
2 3
exit
Router(config)#policy-map
Router(config-pmap)#
cbwfqpolicy
class
Router(config-pmap-c)#
highprec
bandwidth percent
Router(config-pmap-c)#
25
exit
Router(config-pmap)#class
Router(config-pmap-c)#
medhiprec
bandwidth percent
Router(config-pmap-c)#
25
exit
Router(config-pmap)#class med
Router(config-pmap-c)#
loprec
bandwidth percent
Router(config-pmap-c)#
25
exit
Router(config-pmap)#class class-default
Router(config-pmap-c)#fair-queue
Router(config-pmap-c)#
512
queue-limit ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.