Cisco 3560 MLS QOS – Part 2

This is the second part of Cisco 3560 MLS QOS. Previously I’ve discused about Classification and Marking which can be found here.

For this second part, I’ll try to explain about the Ingress Queueing mechanism and how can we modify this to prioritize traffic.

Ingress Queueing.

Once the traffic being marked and classified, packets go into Queues. There are cos-input-q for L2-based marking queue and dscp-input-q for L3-based marking queue as shown below.

SW-3560# sh mls qos maps cos-input-q 
   Cos-inputq-threshold map:
              cos:  0   1   2   3   4   5   6   7  
              ------------------------------------
  queue-threshold: 1-3 1-2 2-1 2-3 2-2 2-3 2-2 2-2 

To change the cos-input-q map use command mls qos srr-queue input cos-map queue <Queue_Number> threshold <Threshold_Number> <COS_value>. Look at the example below.

! put COS 1 to Q1T2
mls qos srr-queue input cos-map queue 1 threshold 2 1

! put COS 0 to Q1T3
mls qos srr-queue input cos-map queue 1 threshold 3 0

! put COS 2 to Q2T1
mls qos srr-queue input cos-map queue 2 threshold 1 2

! put COS 4, 6, and 7 to Q2T2
mls qos srr-queue input cos-map queue 2 threshold 2 4 6 7

! put COS 3 and 5 to Q2T3
mls qos srr-queue input cos-map queue 2 threshold 3 3 5

SW-3560# sh mls qos maps cos-input-q 
   Cos-inputq-threshold map:
              cos:  0   1   2   3   4   5   6   7  
              ------------------------------------
  queue-threshold: 1-3 1-2 2-1 2-3 2-2 2-3 2-2 2-2 
SW-3560#sh mls qos maps dscp-input-q 
   Dscp-inputq-threshold map:
     d1 :d2    0     1     2     3     4     5     6     7     8     9 
     ------------------------------------------------------------
      0 :    01-03 01-03 01-03 01-03 01-03 01-03 01-03 01-03 01-01 01-02 
      1 :    01-02 01-02 01-02 01-02 01-02 01-02 02-01 02-01 02-01 02-01 
      2 :    02-01 02-01 02-01 02-01 02-03 02-03 02-03 02-03 02-03 02-03 
      3 :    02-03 02-03 01-03 02-02 02-02 02-02 02-02 02-02 02-02 02-02 
      4 :    02-03 02-03 02-03 02-03 02-03 02-03 02-03 02-03 02-02 02-02 
      5 :    02-02 02-02 02-02 02-02 02-02 02-02 02-02 02-02 02-02 02-02 
      6 :    02-02 02-02 02-02 02-02 

To Change the dscp-input-q use command mls qos srr-queue input dscp-map queue <Queue_Number> threshold <Threshold_Number> <DSCP_DECIMAL_value>. Look at the example below.

! put DSCP decimal 32 to Q1T3
mls qos srr-queue input dscp-map queue 1 threshold 3 32

! put DSCP decimal 16, 17, 18, 19, 20, 21, 22, and 23 to Q2T1
mls qos srr-queue input dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23

SW-3560#sh mls qos maps dscp-input-q 
   Dscp-inputq-threshold map:
     d1 :d2    0     1     2     3     4     5     6     7     8     9 
     ------------------------------------------------------------
      0 :    01-03 01-03 01-03 01-03 01-03 01-03 01-03 01-03 01-01 01-02 
      1 :    01-02 01-02 01-02 01-02 01-02 01-02 02-01 02-01 02-01 02-01 
      2 :    02-01 02-01 02-01 02-01 02-03 02-03 02-03 02-03 02-03 02-03 
      3 :    02-03 02-03 01-03 02-02 02-02 02-02 02-02 02-02 02-02 02-02 
      4 :    02-03 02-03 02-03 02-03 02-03 02-03 02-03 02-03 02-02 02-02 
      5 :    02-02 02-02 02-02 02-02 02-02 02-02 02-02 02-02 02-02 02-02 
      6 :    02-02 02-02 02-02 02-02 

Now let see what are those Q1 and Q2 are.

SW-3560#sh mls qos input-queue 
Queue     :       1       2
----------------------------------------------
buffers   :      67      33
bandwidth :      90      10
priority  :       0      10
threshold1:       8      34
threshold2:      16      66

From the above input-queue details, Q1T2 means that the Queue 1 can hold as much as Threshold 2 (which is 16 in this case) of Queue 1 Buffers 67. Once it reaches more than Threshold 16% of 67 Buffers, packets will be dropped. Buffers are the percentage value for each Queue.

For Q1T1, it will starts dropping packets once it reaches 8% of 67 Buffers.

So, what is the Threshold value For Q2T3? Threshold 3 will have 100% as default. Any Q uses T3 means that the packets will never get droppped. This makes sense why putting the DSCP EF packets or any other delay sensitive packets here.

Start – Update June 13th, 2013.

From http://www.cisco.com/en/US/docs/solutions/Enterprise/WAN_and_MAN/QoS_SRND/QoSDesign.html

The Catalyst 2970/3560/3750 also supports two configurable ingress queues (normal and expedite). Ingress scheduling, however, is rarely—if ever—required, as it only becomes enabled if the combined input rates from any/all switch ports exceed the switch fabric’s capacity. Such cases are extremely difficult to achieve, even in controlled lab environments. In the extreme case where such a scenario develops in a production environment, the default settings of the ingress queues are acceptable to maintain VoIP quality and network availability.

End – Update June 13th, 2013.

Next is the Bandwidth parameters. This is the composition of how much of Q1 and Q2 can be transfered to the internal ring for the next process. Packets will be alternately taken from Q1 and Q2 and 90:10 described the weight composition for each Queue (not a percentage). This means the same with 18:2 or 9:1. For example, both Queue 1 and Queue 2 can take 1000 packets each, 900 will be transfered to the internal ring and 100 will be transfered to the internal ring. If Q1 is not fully occupied (e.g not using the 90 portion of it), the Q2 can transfer more than 10 portion from Q2.

The Priority however, will change the amount of packets taken from Q1 and Q2. Q2 (in this scenario) will be prioritized until it reaches maximum packets (100). Then the rest 900 will be shared between Q1 and Q2 for 810:90 as per 90:10 ratio.

Start – Update May 7th, 2013.

For Example, For every 1000 packets coming in:

  • 10% of it (100 packets) is prioritized out of 100% (1000 packets).
  • 90% of it (900 packets is shared between Q1 and Q2 out of 100% (1000 packets).
  • Out of that 90% (900 packets), 10% of it (90 packets) is for Q2 (addition to 10% priority), 90% (810 packets) is for Q1.
  • Therefore for Q2 the total packets are 100 + 90 = 190 packets. 100 packets are prioritized and minimum 90 packets are guaranteed.
  • for the Q1 the total packets are minimum 810 packets guaranteed.

End – Update May 7th, 2013.

Below are the example if you want to modify the input-queue.

mls qos srr-queue input buffers 67 33
mls qos srr-queue input bandwidth 90 10
! NOTE. 
! - max PQ BW is 40.
! - We can use Q2 or Q2 as PQ.
mls qos srr-queue input priority-queue 2 bandwidth 10
mls qos srr-queue input threshold 1 8 16
mls qos srr-queue input threshold 2 34 66

SW-3560#sh mls qos input-queue 
Queue     :       1       2
----------------------------------------------
buffers   :      67      33
bandwidth :      90      10
priority  :       0      10
threshold1:       8      34
threshold2:      16      66

Related Links
Cisco 3560 MLS QOS – Part 1
Cisco 3560 MLS QOS – Part 2
Cisco 3560 MLS QOS – Part 3 – Final

3 thoughts on “Cisco 3560 MLS QOS – Part 2

  1. Jesus Gil

    David:

    The following line is correct?

    For Q2T1, it will starts dropping packets once it reaches 8% of 67 Buffers.

    I think is

    For Q1T1, it will starts dropping packets once it reaches 8% of 67 Buffers.

  2. Pingback: Cisco 3560 MLS QOS - Part 1 | David Sudjiman

Leave a Reply