CBWFQ Inside GTS

On Cisco router platform, we can easily divide interface downstream bandwidth between two or more Customers and simultanously guarantee(prioritize or limit) its amount for definded queues.
Lets take example with two Customers :

  • CUSTOMER1 has overall bandwidth of 2Mbps with guarantee of 40% for GOLD, 20% for SILVER, 10% for BRONZE and 500Kbps limit for other traffic. Client`s IP network – 10.0.10.0/24
  • CUSTOMER2 has overall bandwidth of 6Mbps with priority queue of 10% for GOLD, 2Mbps limit for SILVER, 15% gurantee for BRONZE and 1Mbps limit for other traffic. Client`s IP network – 10.0.20.0/24
  • Any other traffic from FastEtherent inteface with destination address other than 10.0.10.0/24 and 10.0.20.0/24 will be put in 10Mbps limited queue
  • Traffic classification is based on IP Precedence markings: 5 goes to GOLD, 4,3 to SILVER, 2,1 to BRONZE, 7,6,0 to DEFAULT

To achive it we type following into configuration:


no policy-map PM_ALL
no policy-map PM_CUSTOMER1
no policy-map PM_CUSTOMER2
no class-map match-any CM_GOLD
no class-map match-any CM_SILVER
no class-map match-any CM_BRONZE
no class-map match-all PM_CUSTOMER1
no class-map match-all PM_CUSTOMER2
no ip access-list extended PM_CUSTOMER1
no ip access-list extended PM_CUSTOMER2

ip access-list extended PM_CUSTOMER1
 permit ip any 10.0.10.0 0.0.0.255
ip access-list extended PM_CUSTOMER2
 permit ip any 10.0.20.0 0.0.0.255

class-map match-any CM_GOLD
 match precedence 5
class-map match-any CM_SILVER
 match precedence 4
 match precedence 3
class-map match-any CM_BRONZE
 match precedence 2
 match precedence 1
class-map match-all PM_CUSTOMER2
 match access-group name PM_CUSTOMER2
class-map match-all PM_CUSTOMER1
 match access-group name PM_CUSTOMER1

policy-map PM_CUSTOMER1
 class CM_GOLD
    bandwidth percent 40
 class CM_SILVER
    bandwidth percent 20
 class CM_BRONZE
    bandwidth percent 10
 class class-default
    police 500000 conform-action transmit exceed-action transmit violate-action drop
policy-map PM_CUSTOMER2
 class CM_GOLD
    priority percent 10
 class CM_SILVER
   police 2048000 conform-action transmit exceed-action transmit violate-action drop
 class CM_BRONZE
    bandwidth percent 15
 class class-default
   police rate 1024000 conform-action transmit exceed-action transmit violate-action drop
policy-map PM_ALL
 class PM_CUSTOMER1
    shape average 2048000
  service-policy PM_CUSTOMER1
 class PM_CUSTOMER2
    shape average 6144000
  service-policy PM_CUSTOMER2
 class class-default
  police 10240000 conform-action transmit exceed-action transmit violate-action drop
interface FastEthernet0/0
 service-policy output PM_ALL

We can implement above example on almost every Cisco router platform or 3rd layer switch.
We need to check following features before:
Class Based Weighted Fair Queuing (CBWFQ)
Generic Traffic Shaping (GTS)
Low Latency Queueing (LLQ)


Cisco Feature Guide: Class-Based Shaping

Leave a Reply