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

Hierarchical QOS

Hi I am trying to work out how to setup QOS so that you have two shapers within the one policy and apply two separate customer classes.

The policy

Cust 1

Shape bandwidth to 20Mbps

Class Gold 20% bandwidth

Class Sliver 30% bandwidth

Class Bronze 50% bandwidth

Cust 2

Shape bandwidth to 30Mbps

Class Gold 20% bandwidth

Class Sliver 30% bandwidth

Class Bronze 50% bandwidth

Apply the policy to a single GigE sub-interface, I tried this and the config accepted it but when the traffic was passed it could not match.

I did the normal single hierarchical QOS and it all worked where you have single policy with all the classes and then assign this to a second policy default class and shape the default class however this only lets you shape a single policy.

Is it possible to create multiple policy maps at the child level and assign them to a parent policy shaping each individual child policy.

Here is the config I was testing when I do a ping no traffic is matched on access-list 99 but matched under the default-class.

!

!

!

class-map match-all cust1-gold

match access-group 99

class-map match-all cust2-gold

class-map match-all cust1-parent

class-map match-all cust2-parent

class-map match-all cust2-silver

class-map match-all cust1-silver

!

!

policy-map parent

class cust1-parent

shape average 10000

class cust2-parent

shape average 20000

policy-map cust2-child

class cust2-gold

bandwidth percent 40

class cust1-gold

class cust2-silver

bandwidth percent 60

policy-map cust1-child

class cust1-gold

bandwidth percent 40

class cust1-silver

bandwidth percent 60

!

!

interface Ethernet1/1.119

encapsulation dot1Q 119

ip address 143.119.2.12 255.255.255.248

service-policy output parent

access-list 99 permit any

7 REPLIES
Super Bronze

Re: Hierarchical QOS

If I remember correctly, "rules" for QoS policies are a often different when applied to a subinterface. Generally a shaper is required so the policy "knows" the bandwidth to be used by the subinterface. This may explain what's happening.

Starting with 12.4(20)T, QoS policies have been enhanced also providing "HQF Multiple Policy Support", although I'm unsure this will support what you're trying to accomplish. See http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/qos_hqf_mply_support.html and http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/qos_frhqf_support_ps6441_TSD_Products_Configuration_Guide_Chapter.html for more info.

Cisco Employee

Re: Hierarchical QOS

Hi,

It should work if you apply your configuration on the physical interface instead.

Also I think you should configure specific match statement at least in custx-parent class to differentiate the traffic from both customers.

Also you didn't call your child policy in your parent class.

HTH

Laurent.

Community Member

Re: Hierarchical QOS

Here is the updated config.

Is it possible to achieve this policy where you have two customers in a child policy attatched to a parent policy shaping each child policy.

When I ping all the traffic is going into the default-class.

!

class-map match-all cust1-gold

match access-group 99

class-map match-all cust2-gold

class-map match-all cust1-parent

class-map match-all cust2-parent

class-map match-all cust2-silver

class-map match-all cust1-silver

!

access-list 99 permit any

!

!

policy-map cust1-child

class cust1-gold

bandwidth percent 40

class cust1-silver

bandwidth percent 60

policy-map cust2-child

class cust2-gold

bandwidth percent 40

class cust2-silver

bandwidth percent 60

policy-map parent

class cust1-parent

shape average 10000

service-policy cust1-child

class cust2-parent

shape average 20000

service-policy cust2-child

!

interface Ethernet1/0

ip address 192.168.80.9 255.255.255.252

half-duplex

service-policy output parent

!

R10#

R10#show policy-map interface

Ethernet1/0

Service-policy output: parent

Class-map: cust1-parent (match-all)

0 packets, 0 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: none

Traffic Shaping

Target/Average Byte Sustain Excess Interval Increment

Rate Limit bits/int bits/int (ms) (bytes)

10000/10000 2000 8000 8000 800 1000

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 0 0 0 0 0 no

Service-policy : cust1-child

Class-map: cust1-gold (match-all)

0 packets, 0 bytes

5 minute offered rate 0 bps, drop rate 0 bps

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

Class-map: cust1-silver (match-all)

0 packets, 0 bytes

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

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

0 packets, 0 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: any

Class-map: cust2-parent (match-all)

0 packets, 0 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: none

Traffic Shaping

Target/Average Byte Sustain Excess Interval Increment

Rate Limit bits/int bits/int (ms) (bytes)

20000/20000 2000 8000 8000 400 1000

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 0 0 0 0 0 no

Service-policy : cust2-child

Class-map: cust2-gold (match-all)

0 packets, 0 bytes

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

Class-map: cust2-silver (match-all)

0 packets, 0 bytes

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

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

0 packets, 0 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: any

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

218 packets, 22135 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: any

R10#

Super Bronze

Re: Hierarchical QOS

Laurent's suggestion does (it appears and as expected) support all the original hiearchal policy. However, also keep in mind, the policy sees more than just the original subinterface traffic (i.e you may need to adjust class-maps).

"When I ping all the traffic is going into the default-class. "

That's likely because all you class-maps but one (cust1-gold) don't have any match criteria. To get traffic into the two shaped classes, cust1-parent or cust2-parent, you'll need to match the traffic and then break it out with more matching in your subordinate child classes.

Community Member

Re: Hierarchical QOS

Hi many thanks for the reply.

This is a test, the only traffic I am sending is the ping to see if the class match that is why I only have one ACL to test the concept.

From my second config is the supported.

Thanks

Bill

CCIE 3906

Community Member

Re: Hierarchical QOS

Hi

I think I have worked this out, the first class map matches the traffic and because it then feeds into the second class map that does not have a match it goes into the default class.

What I did was have a catch all match in the parent and the more secific match in the child and it worked where I was able to see all traffic in the parent and the counters for each child class incriment for the telnet and the ping.

Thanks to all those who helped.

Here is the sample config.

!

!

class-map match-all cust1-gold

match access-group 199

class-map match-all cust2-gold

class-map match-all cust1-parent

match access-group 99

class-map match-all cust2-parent

class-map match-all cust2-silver

class-map match-all cust1-silver

match access-group 198

!

!

policy-map cust1-child

class cust1-gold

bandwidth percent 40

class cust1-silver

bandwidth percent 60

policy-map cust2-child

class cust2-gold

bandwidth percent 40

class cust2-silver

bandwidth percent 60

policy-map parent

class cust1-parent

shape average 10000

service-policy cust1-child

class cust2-parent

shape average 20000

service-policy cust2-child

!

!

ccess-list 99 permit any

ccess-list 198 permit tcp any any eq telnet

ccess-list 199 permit icmp any any

R10#show policy-map interface

Ethernet1/0

Service-policy output: parent

Class-map: cust1-parent (match-all)

37 packets, 2496 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: access-group 99

Traffic Shaping

Target/Average Byte Sustain Excess Interval Increment

Rate Limit bits/int bits/int (ms) (bytes)

10000/10000 2000 8000 8000 800 1000

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 0 37 2496 0 0 no

Service-policy : cust1-child

Class-map: cust1-gold (match-all)

5 packets, 570 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: access-group 199

Queueing

Output Queue: Conversation 25

Bandwidth 40 (%)

Bandwidth 4 (kbps)Max Threshold 64 (packets)

(pkts matched/bytes matched) 0/0

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

Class-map: cust1-silver (match-all)

32 packets, 1926 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: access-group 198

Queueing

Output Queue: Conversation 26

Bandwidth 60 (%)

Bandwidth 6 (kbps)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)

0 packets, 0 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: any

Class-map: cust2-parent (match-all)

0 packets, 0 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: none

Traffic Shaping

Target/Average Byte Sustain Excess Interval Increment

Rate Limit bits/int bits/int (ms) (bytes)

20000/20000 2000 8000 8000 400 1000

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

20 packets, 2049 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: any

R10#

Community Member

Re: Hierarchical QOS

Hi Taking this concept one step further say if you wanted to have two customers cust 1 and cust 2, you want to give then bandwidth allocation to each of their traffic profiles and then allocate a garanteed bandwidth to the overall link.

To do this you could setup the parent class with equal shaping up to the speed of the link and then assign a percentage bandwidth to the parent.

You need the shaping command because the config does not let you put bandwidth percentage on its own in the parent without the shaping.

Is my think correct.

Here is the config using shared bandwidth in the parent class with percentages garanteed to each customer.

!

class-map match-all cust1-gold

match access-group 199

class-map match-all cust2-gold

class-map match-all cust1-parent

match access-group 99

class-map match-all cust2-parent

class-map match-all cust2-silver

class-map match-all cust1-silver

match access-group 198

!

!

policy-map cust1-child

class cust1-gold

bandwidth percent 40

class cust1-silver

bandwidth percent 60

policy-map parent

class cust1-parent

bandwidth percent 20

shape average 10000

service-policy cust1-child

class cust2-parent

bandwidth percent 80

shape average 10000

policy-map cust2-child

class cust2-gold

bandwidth percent 40

class cust2-silver

bandwidth percent 60

!

Thanks

Bill

383
Views
0
Helpful
7
Replies
CreatePlease to create content