// you’re reading...

QoS & VoIP

QOS: Applying CBWFQ to a sub-interface

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular tutorials, news, and study tips about networking, especially about Cisco CCIE related topics. Go ahead, subscribe to the rss feed! You can also receive updates from this blog via email. Thanks for visiting!

By default IOS does not let you apply CBWFQ directly to a sub interface. I ran into this scenario and worked my way around it in a workbook lab (IE Workbook Vol 2 - Lab 15). I thought it was pretty cool and hopefully it helps someone else out:

Lets take a look at the basic CBWFQ configuration:

class-map match-any TELNET
  match protocol telnet
class-map match-any FTP
  match protocol ftp
class-map match-any WWW
  match protocol http
!
!
policy-map QOS
  class WWW
   bandwidth percent 60
   queue-limit 30
  class FTP
   bandwidth percent 35
  class TELNET
   bandwidth percent 5

Pretty straight forward. We are giving 60 percent of the bandwidth to http traffic, 35% of the bandwidth to ftp, and 5% of the bandwidth to telnet traffic in times of congestoin. I tried applying it to a sub-interface:

R5(config)#int f0/0.52
R5(config-subif)#service-policy out QOS
 CBWFQ : Not supported on sub-interfaces

Uh Oh! CBWFQ is not supported on sub-interfaces. Lets try something to get around this:

policy-map PARENT
  class class-default
   service-policy QOS

We’ve used hierarchical policy-map, with a PARENT policy-map calling the QOS policy map (it’s child). The QOS policy map will apply to all traffic on the PARENT policy map. This way i’m not directly applying CBWFQ to the sub-interface as the parent policy map doesn’t technically have CBWFQ enabled on it (the child policy map, QOS, does!) Let’s try apply it to the sub-interface and see if it works:

R5(config)#int f0/0.52
R5(config-subif)#service-policy out PARENT
 CBWFQ : Hierarchy supported only if shaping is configured in this class

Still no good, but it says that it should work as long as shaping is applied! Let’s try it:

policy-map PARENT
  class class-default
   shape average percent 100
   service-policy QOS
R5(config)#int f0/0.52
R5(config-subif)#service-policy out PARENT

Woohoo no errors! Lets check it:

R5#sh policy-map int f0/0.52
 FastEthernet0/0.52 

  Service-policy output: PARENT

    Class-map: class-default (match-any)
      596 packets, 49791 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
      Traffic Shaping
           Target/Average   Byte   Sustain   Excess    Interval  Increment
             Rate           Limit  bits/int  bits/int  (ms)      (bytes)
        100000000/100000000 625000 2500000   2500000   25        312500   

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping
        Active Depth                         Delayed   Delayed   Active
        -      0         596       49791     0         0         no

      Service-policy : QOS

        Class-map: WWW (match-any)
          0 packets, 0 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: protocol http
            0 packets, 0 bytes
            5 minute rate 0 bps
          Queueing
            Output Queue: Conversation 265
            Bandwidth 60 (%) Max Threshold 30 (packets)
            (pkts matched/bytes matched) 0/0
        (depth/total drops/no-buffer drops) 0/0/0

        Class-map: FTP (match-any)
          0 packets, 0 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: protocol ftp
            0 packets, 0 bytes
            5 minute rate 0 bps
          Queueing
            Output Queue: Conversation 266
            Bandwidth 35 (%) Max Threshold 64 (packets)
            (pkts matched/bytes matched) 0/0
        (depth/total drops/no-buffer drops) 0/0/0

        Class-map: TELNET (match-any)
          0 packets, 0 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: protocol telnet
            0 packets, 0 bytes
            5 minute rate 0 bps
          Queueing
            Output Queue: Conversation 267
            Bandwidth 5 (%) Max Threshold 64 (packets)
            (pkts matched/bytes matched) 0/0
        (depth/total drops/no-buffer drops) 0/0/0

        Class-map: class-default (match-any)
          596 packets, 49791 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: any 

Looks good.

Summary:

You can’t apply CBFWQ to a sub-interface directly. You have to create a parent policy-map and apply shaping before it can be applied to a sub-interface. Cool huh? I’m going to have to write a proper tutorial on this one when I have some time, right now i’m trying to fit in 12 hours of labs a day for the next 30 days.

Related posts

Discussion

2 comments for “QOS: Applying CBWFQ to a sub-interface”

  1. Thx a alot.,

    Posted by the_rain | May 28, 2008, 12:24 pm
  2. Thank you

    Posted by VB | October 21, 2008, 2:26 pm

Post a comment


Twitter Feed...

Follow me...

View Arden Packeer's profile on LinkedIn Arden Packeer ClaimID Add to Technorati Favorites TwitterCounter for @ardenpackeer