Applying A QoS Policy on A Subinterface

Published by Keyboard Banger on

When you try to apply a Cisco QoS policy on a subinterface, you may get the following error message

CBWFQ : Not supported on subinterfaces

In this case, we need to use the concept of hierarchical policy, or parent and child policies. The parent policy is like a container. The child policy is the one that you wanted to apply in the first place. So for example if you want to apply a policy named “WAN_Policy”, this will be your child policy that will go under the parent policy.

In practice, what we need to do is:

  • create a parent policy. Let’s name it Shaping,
  • call the default class under the parent policy and configure traffic shaping for it. Recall that the default class is named class-default. Traffic shaping needs to be configured with an adequate CIR. CIR depends on the contracted bandwidth. In my case, I want to apply the QoS policy on a GigaEthernet interface connected to the WAN, and with a CIR of 20Mbps.
  • this is the tricky part: attach the child policy WAN_Policy to the parent policy Shaping.

Here is what the configuration will look like.

Policy-map Shape
 class class-default
  Average Rate Traffic Shaping
  cir 20000000 (bps)
  service-policy WAN_Policy
Policy-map WAN_Policy

(here goes the class definition of the policy. It depends what you’ve set on your device)

  class X1
  class X2
  class class-default

The last thing is to apply the parent policy to the subinterface:

Interface Gi0/0.1122
service-policy output Shaping

You should replace Gi0/0.1122 with your interface number

Categories: Networking Basics

Keyboard Banger

Keyboard Banger is a network engineer from Africa. He has been working in network support and administration since 2008. He started writing study notes about certification exams and technology topics a couple of years ago. When he's not writing articles, he can be found wandering on technical forums.


Leave a Reply

Your email address will not be published. Required fields are marked *