Shaping before Queueing?

Hey Guys,

Was wondering if someone could help me out with a shaping question.

Could someone tell me, do shaping queues come into play before outbound CBWFQing?

I am looking at the figure on 377 of the QoS Exam Cert Guide.
In this figure, does the queueing happen before the shaping? It confuses me shaping happens before queueing in this document:
Traffic shaping in Cisco IOS - CT3

I understand CB Marking/CBWFQ really well, but I am getting a little confused when we combine CBWFQ with Shaping. The flow of events doesn't make sense. What is confusing in particular is the use of "service-policy queueVoip" under another policy map.

Comments

  • SepiraphSepiraph Member Posts: 179 ■■□□□□□□□□
    Shaping only comes into play here because you are looking at an example of hierarchical policy map, where you can combine shaping/policing together.

    Read this and it should be clear:
    Cisco IOS Quality of Service Solutions Configuration*Guide, Release*12.2 - Configuring the Modular Quality of Service Command-Line Interface* [Cisco IOS Software Releases 12.2 Mainline] - Cisco Systems
  • up2thetimeup2thetime Member Posts: 154
    Sepiraph wrote: »
    Shaping only comes into play here because you are looking at an example of hierarchical policy map, where you can combine shaping/policing together.

    Read this and it should be clear:
    Cisco IOS Quality of Service Solutions Configuration*Guide, Release*12.2 - Configuring the Modular Quality of Service Command-Line Interface* [Cisco IOS Software Releases 12.2 Mainline] - Cisco Systems

    Thanks!

    Just one thing... does the child policy always get applied to the class-default class?

    I all the examples, the "shape average" command has been issued under class-default. Why is it done this way? What if we wanted to shape another class...

    Router(config)# policy-map child


    Router(config-pmap)# class voice


    Router(config-pmap-c)# priority 50




    Router(config)# policy-map parent


    Router(config-pmap)# class class-default


    Router(config-pmap-c)# shape average 10000000


    Router(config-pmap-c)# service-policy child

    Using the same example from the Cisco link... supposed we wanted to add 3 more classes to policy-map child (one for web, one for ftp, and one for email). Why then do we put "service-policy child" under class-default? Won't that just shape the class-default class?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    You usually just break off what you do not want shaped (most often voice or mission critical data) and then the rest by way of class-default is shaped. Any queuing you want within the class-default can be done in the child policy.
    An expert is a man who has made all the mistakes which can be made.
  • up2thetimeup2thetime Member Posts: 154
    Hmm...

    Okay, so by doing this, we have configured the shaping queue to no longer be FIFO.
    In this case 2 shaping queues exist? One for the voice (given priority 50) and the other for class-default.
    So in the next Tc interval, the shaper will release priority 50 bits for voice, and 10000000 x .125 bits for the class-default?

    It seems that after queueing, traffic must pass through the shaper...correct?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    You usually only shape the class-default and within this shaped queue you do your other queues for specific traffic. So there are multiple, or a single depending on configuration, that lead to the shaping queue. An example config below (free hand so excuse any syntax errors).

    policy-map child
    class data_1
    bandwidth 50
    class data_2
    bandwidth 50

    policy-map parent
    class voice
    priority 10
    class class-default
    shape average 100000
    service policy child

    So in this example the class voice will not be shaped. There will be two queues at this level, the priority queue for voice and the shaped queue. Within the shaped queue there will be two additional queues, one for each data class.
    An expert is a man who has made all the mistakes which can be made.
  • up2thetimeup2thetime Member Posts: 154
    You usually only shape the class-default and within this shaped queue you do your other queues for specific traffic. So there are multiple, or a single depending on configuration, that lead to the shaping queue. An example config below (free hand so excuse any syntax errors).

    policy-map child
    class data_1
    bandwidth 50
    class data_2
    bandwidth 50

    policy-map parent
    class voice
    priority 10
    class class-default
    shape average 100000
    service policy child

    So in this example the class voice will not be shaped. There will be two queues at this level, the priority queue for voice and the shaped queue. Within the shaped queue there will be two additional queues, one for each data class.

    Thanks networker... I had to read that a few times, but I think it's coming together.

    Within the shaped queue, there will exist 2 classes (data1 and data1), and we have allotted 50K per second to each.
    Consider a 128Kpbs link.

    Please tell me if this is correct:

    Shaping is active and each Tc interval will be 125ms.
    In the first Tc, the shaper releases x number of bits to the FIFO software output queue.
    The question is how many bits does it release?

    In the first Tc:
    The shaper will look will not look at the voice class. It will only consider class-default, which actually points to policy-map child. So the shaper will need to look at what is contained in (class data1 and class data2).
    Upon looking at class data1, it notices that a guaranteed 50K of bandwidth is allowed per second.
    Since we are in the fist Tc, the shaper will actually release (0.125 x 50000)=6250 bits from class data1.
    It will do the same for class data2.

    Is the process correct....?

    Thank you.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Yep you got the gist of it. One thing to consider is the "shaping function" is not responsible for looking at the classes and diving up the bandwidth. A separate set of soft queues will be built and normal CBWFQ will be performed and the traffic from there is then shaped. So think of it basically as normal CBWFQ but rather than outputting the traffic to the hardware queue it is sent to another software queue for shaping. From there its again functioning like normal CBWFQ and gets its share of the bandwidth.

    QoS is pretty hard to wrap your head around at first but it all starts to come together eventually. All the math is the difficult part for me!
    An expert is a man who has made all the mistakes which can be made.
  • up2thetimeup2thetime Member Posts: 154
    Yep you got the gist of it. One thing to consider is the "shaping function" is not responsible for looking at the classes and diving up the bandwidth. A separate set of soft queues will be built and normal CBWFQ will be performed and the traffic from there is then shaped. So think of it basically as normal CBWFQ but rather than outputting the traffic to the hardware queue it is sent to another software queue for shaping. From there its again functioning like normal CBWFQ and gets its share of the bandwidth.

    QoS is pretty hard to wrap your head around at first but it all starts to come together eventually. All the math is the difficult part for me!



    It is! I had to go over the chapter 3 times!
    Thanks for your help!
Sign In or Register to comment.