Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

QoS HQF (3 Level) Configuration

I would like to share a 2 level QoS config first and then the same config using 3 level -

!

! Example 1

!

class-map match-any C-EF

match  dscp cs5  ef

!

class-map match-any C-AF4

match  dscp cs4  af41  af42  af43

!

class-map match-any C-AF3

match  dscp cs3  af31  af32  af33

!

class-map match-any C-AF2

match  dscp cs2  af21  af22  af23

!

class-map match-any C-AF1

match  dscp cs1  af11  af12  af13

!

policy-map CHILD-POLICY-1

class C-EF

  priority percent 20

class C-AF4

  bandwidth remaining percent 25

class C-AF3

  bandwidth remaining percent 25

class C-AF2

  bandwidth remaining percent 24

class C-AF1

  bandwidth remaining percent 24

!

policy-map 2-LEVEL

class class-default

  shape average 10000000

  service-policy CHILD-POLICY-1

!

interface FastEthernet0

service-policy output 2-LEVEL

!

#show policy-map interface fastEthernet0

FastEthernet0

  Service-policy output: 2-LEVEL

    Class-map: class-default (match-any)

      9 packets, 1271 bytes

      30 second offered rate 0 bps, drop rate 0 bps

      Match: any

      Queueing

      queue limit 64 packets

      (queue depth/total drops/no-buffer drops) 0/0/0

      (pkts output/bytes output) 9/1313

      shape (average) cir 10000000, bc 40000, be 40000

      target shape rate 10000000

      Service-policy : CHILD-POLICY-1

        queue stats for all priority classes:

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 0/0

        Class-map: C-EF (match-any)

          0 packets, 0 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match:  dscp cs5 (40) ef (46)

            0 packets, 0 bytes

            30 second rate 0 bps

          Priority: 20% (2000 kbps), burst bytes 50000, b/w exceed drops: 0

        Class-map: C-AF4 (match-any)

          0 packets, 0 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match:  dscp cs4 (32) af41 (34) af42 (36) af43 (38)

            0 packets, 0 bytes

            30 second rate 0 bps

          Queueing

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 0/0

          bandwidth remaining 25% (2000 kbps)

        Class-map: C-AF3 (match-any)

          0 packets, 0 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match:  dscp cs3 (24) af31 (26) af32 (28) af33 (30)

            0 packets, 0 bytes

            30 second rate 0 bps

          Queueing

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 0/0

          bandwidth remaining 25% (2000 kbps)

        Class-map: C-AF2 (match-any)

          0 packets, 0 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match:  dscp cs2 (16) af21 (18) af22 (20) af23 (22)

            0 packets, 0 bytes

            30 second rate 0 bps

          Queueing

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 0/0

          bandwidth remaining 24% (1920 kbps)

        Class-map: C-AF1 (match-any)

          0 packets, 0 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match:  dscp cs1 (8) af11 (10) af12 (12) af13 (14)

            0 packets, 0 bytes

            30 second rate 0 bps

          Queueing

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 0/0

          bandwidth remaining 24% (1920 kbps)

        Class-map: class-default (match-any)

          9 packets, 1271 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match: any

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 9/1313

!

! Example 2

!

class-map match-any C-EF

match  dscp cs5  ef

!

class-map match-any C-AF4

match  dscp cs4  af41  af42  af43

!

class-map match-any C-AF3

match  dscp cs3  af31  af32  af33

!

class-map match-any C-AF2

match  dscp cs2  af21  af22  af23

!

class-map match-any C-AF1

match  dscp cs1  af11  af12  af13

!

class-map match-any C-AF4-AF3

match  dscp cs4  af41  af42  af43 cs3  af31  af32  af33

!

class-map match-any C-AF2-AF1

match  dscp cs2  af21  af22  af23 cs1  af11  af12  af13

!

policy-map AF4-AF3-CHILD

class C-AF4

  bandwidth remaining percent 50

class C-AF3

  bandwidth remaining percent 49

!

policy-map AF2-AF1-CHILD

class C-AF2

  bandwidth remaining percent 50

class C-AF1

  bandwidth remaining percent 49

!

policy-map CHILD-POLICY-2

class C-EF

  priority percent 20

class C-AF4-AF3

  bandwidth remaining percent 50

  service-policy AF4-AF3-CHILD

class C-AF2-AF1

  bandwidth remaining percent 48

  service-policy AF2-AF1-CHILD

!

policy-map 3-LEVEL

class class-default

  shape average 10000000

  service-policy CHILD-POLICY-2

!

interface FastEthernet0

service-policy output 3-LEVEL

!

#show policy-map interface fastEthernet0

FastEthernet0

  Service-policy output: 3-LEVEL

    Class-map: class-default (match-any)

      162 packets, 17737 bytes

      30 second offered rate 0 bps, drop rate 0 bps

      Match: any

      Queueing

      queue limit 64 packets

      (queue depth/total drops/no-buffer drops) 0/0/0

      (pkts output/bytes output) 162/18081

      shape (average) cir 10000000, bc 40000, be 40000

      target shape rate 10000000

      Service-policy : CHILD-POLICY-2

        queue stats for all priority classes:

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 0/0

        Class-map: C-EF (match-any)

          0 packets, 0 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match:  dscp cs5 (40) ef (46)

            0 packets, 0 bytes

            30 second rate 0 bps

          Priority: 20% (2000 kbps), burst bytes 50000, b/w exceed drops: 0

        Class-map: C-AF4-AF3 (match-any)

          0 packets, 0 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match:  dscp cs3 (24) af31 (26) af32 (28) af33 (30) cs4 (32) af41 (34) af42 (36) af43 (38)

            0 packets, 0 bytes

            30 second rate 0 bps

          Queueing

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 0/0

          bandwidth remaining 50% (4000 kbps)

          Service-policy : AF4-AF3-CHILD

            Class-map: C-AF4 (match-any)

              0 packets, 0 bytes

              30 second offered rate 0 bps, drop rate 0 bps

              Match:  dscp cs4 (32) af41 (34) af42 (36) af43 (38)

                0 packets, 0 bytes

                30 second rate 0 bps

              Queueing

              queue limit 64 packets

              (queue depth/total drops/no-buffer drops) 0/0/0

              (pkts output/bytes output) 0/0

              bandwidth remaining 50% (2000 kbps)

            Class-map: C-AF3 (match-any)

              0 packets, 0 bytes

              30 second offered rate 0 bps, drop rate 0 bps

              Match:  dscp cs3 (24) af31 (26) af32 (28) af33 (30)

                0 packets, 0 bytes

                30 second rate 0 bps

              Queueing

              queue limit 64 packets

              (queue depth/total drops/no-buffer drops) 0/0/0

              (pkts output/bytes output) 0/0

              bandwidth remaining 49% (1960 kbps)

            Class-map: class-default (match-any)

              0 packets, 0 bytes

              30 second offered rate 0 bps, drop rate 0 bps

              Match: any

              queue limit 64 packets

              (queue depth/total drops/no-buffer drops) 0/0/0

              (pkts output/bytes output) 0/0

        Class-map: C-AF2-AF1 (match-any)

          0 packets, 0 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match:  dscp cs1 (8) af11 (10) af12 (12) af13 (14) cs2 (16) af21 (18) af22 (20) af23 (22)

            0 packets, 0 bytes

            30 second rate 0 bps

          Queueing

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 0/0

          bandwidth remaining 48% (3840 kbps)

          Service-policy : AF2-AF1-CHILD

            Class-map: C-AF2 (match-any)

              0 packets, 0 bytes

              30 second offered rate 0 bps, drop rate 0 bps

              Match:  dscp cs2 (16) af21 (18) af22 (20) af23 (22)

                0 packets, 0 bytes

                30 second rate 0 bps

              Queueing

              queue limit 64 packets

              (queue depth/total drops/no-buffer drops) 0/0/0

              (pkts output/bytes output) 0/0

              bandwidth remaining 50% (1920 kbps)

            Class-map: C-AF1 (match-any)

              0 packets, 0 bytes

              30 second offered rate 0 bps, drop rate 0 bps

              Match:  dscp cs1 (8) af11 (10) af12 (12) af13 (14)

                0 packets, 0 bytes

                30 second rate 0 bps

              Queueing

              queue limit 64 packets

              (queue depth/total drops/no-buffer drops) 0/0/0

              (pkts output/bytes output) 0/0

              bandwidth remaining 49% (1881 kbps)

            Class-map: class-default (match-any)

              0 packets, 0 bytes

              30 second offered rate 0 bps, drop rate 0 bps

              Match: any

              queue limit 64 packets

              (queue depth/total drops/no-buffer drops) 0/0/0

              (pkts output/bytes output) 0/0

        Class-map: class-default (match-any)

          162 packets, 17737 bytes

          30 second offered rate 0 bps, drop rate 0 bps

          Match: any

          queue limit 64 packets

          (queue depth/total drops/no-buffer drops) 0/0/0

          (pkts output/bytes output) 162/18081

In both examples (2-Level and 3-Level), the five classes (EF/AF4/AF3/AF2/AF1) are allocated almost the same amount of bandwidth. During the congestion period, if there is no traffic in the AF4 Class the unused bandwidth (2000 kbps) will be shared between AF3, AF2, and AF1 classes (first example - 2-Level).

But in the 2nd example (3-Level), if there is no traffic in the AF4 class during the congestion period, the unused bandwidth (2000 kbps) will be used by the AF3 class first because AF3 and AF4 are under the same parent class C-AF4-AF3 (4000 Kbps). The unused bandwidth from AF4 class will not be shared with AF2 and AF1 as long as AF3 class needs 50% (4000 Kbps) of the link bandwidth.

Please confirm if my understanding is correct.

  • WAN Routing and Switching
Everyone's tags (2)
1 REPLY
Super Bronze

Re: QoS HQF (3 Level) Configuration

Disclaimer

The    Author of this posting offers the information contained within this    posting without consideration and with the reader's understanding that    there's no implied or expressed suitability or fitness for any  purpose.   Information provided is for informational purposes only and  should not   be construed as rendering professional advice of any kind.  Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In    no event shall Author be liable for any damages whatsoever  (including,   without limitation, damages for loss of use, data or  profit) arising  out  of the use or inability to use the posting's  information even if  Author  has been advised of the possibility of such  damage.

Posting

In both examples (2-Level and 3-Level), the five classes (EF/AF4/AF3/AF2/AF1) are allocated almost the same amount of bandwidth. During the congestion period, if there is no traffic in the AF4 Class the unused bandwidth (2000 kbps) will be shared between AF3, AF2, and AF1 classes (first example - 2-Level). 

But in the 2nd example (3-Level), if there is no traffic in the AF4 class during the congestion period, the unused bandwidth (2000 kbps) will be used by the AF3 class first because AF3 and AF4 are under the same parent class C-AF4-AF3 (4000 Kbps). The unused bandwidth from AF4 class will not be shared with AF2 and AF1 as long as AF3 class needs 50% (4000 Kbps) of the link bandwidth.

Please confirm if my understanding is correct.

I believe your understanding is incorrect.

What CBWFQ really does is assign a weight to the flows.  It uses that weight relative to other flows for bandwidth scheduling.

In both your 2 layer and 3 layer polices, your four classes would get about the same weight, so they will all be processed alike regardless of whether the defining policy was 2 layer or 3 layer.

545
Views
0
Helpful
1
Replies