CBWFQ and shaping

Combing CBWFQ with shaping is a common thing to do. CBWFQ allows for fair distribution of bandwidth among traffic classes while shaping helps to deal with congestion.

Configuration

Here is an example of what it could look like.

R1(config)#class-map HIGH_PRIORITY R1(config-cmap)#match dscp ef R1(config)#policy-map CBWFQ R1(config-pmap)#class HIGH_PRIORITY R1(config-pmap-c)#priority percent 10 R1(config-pmap-c)#exit R1(config-pmap)#class class-default R1(config-pmap-c)#fair-queue R1(config)#policy-map SHAPING R1(config-pmap)#class class-default R1(config-pmap-c)#service-policy CBWFQ R1(config-pmap-c)#shape average 1000000 R1(config-pmap-c)#exit R1(config-pmap)#exit R1(config)#interface GigabitEthernet 0/0 R1(config-if)#service-policy output SHAPING

This example has nested policy-maps. The SHAPING policy-map shapes our traffic and contains the CBWFQ policy-map.

The CBWFQ policy-map has a priority queue and uses CBWFQ for all other traffic.