How to configure Queuing on Cisco 3560 and 3750 switch

QoS (Quality of Service) on Cisco Catalyst switches is not as easy as configuring it on routers. The big difference is that on routers QoS runs in software while on our switches it’s done in hardware. Since switching is done in hardware (ASICs) we also have to do our congestion management (queuing) in hardware. The downside of this is that QoS is in effect immediately. In this lesson I will give you an overview of all the different commands and an explanation of how QoS works. If you are totally new to LAN QoS do yourself a favor and watch this video:

QoS (Quality of Service) on Cisco Catalyst switches is not as easy as configuring it on routers. The big difference is that on routers QoS runs in software while on our switches it's done in hardware. Since switching is done in hardware (ASICs) we also have to do our congestion management (queuing)

The first 54 minutes are about classification, marking and policing so if you only care about congestion management and queuing you can skip the first part. Having said that let’s walk through the different commands.

Priority Queue

If your switch supports ingress queuing then on most switches (Cisco Catalyst 3560 and 3750) queue 2 will be the priority queue by default. Keep in mind that there are only 2 ingress queues. If we want we can make queue 1 the priority queue and we can also change the bandwidth. Here’s how to do it:

Switch(config)#mls qos srr-queue input priority-queue 1 bandwidth 20

The command makes queue 1 the priority queue and limits it to 20% of the bandwidth of the total internal ring bandwidth.

For our egress queuing we have to enable the priority queue ourselves! It’s not enabled by default. Here’s how you can do it:

Switch(config)#interface fa0/1
Switch(config-if)#priority-queue out

The command above will enable the outbound priority queue for interface fa0/1. By default queue 1 is the priority queue!

Queue-set

The queue-set is like a template for QoS configurations on our switches. There are 2 queue-sets that we can use and by default all interfaces are assigned to queue-set 1. If you plan to make changes to buffers etc. it’s better to use queue-set 2 for this. If you change queue-set 1 you will apply you new changes to all interfaces.

This is how you can assign an interface to a different queue-set:

Switch(config)#interface fa0/2
Switch(config-if)#queue-set 2

Above we put interface fa0/2 in queue-set 2. Keep in mind that we only have queue-sets for egress queuing, not for ingress.

Buffer Allocation

For each queue we need to configure the assigned buffers. The buffer is like the ‘storage’ space for the interface and we have to divide it among the different queues. This is how to do it:

mls qos queue-set output <queue set> buffers Q1 Q2 Q3 Q4

Above you see the mls qos command. First we select the queue-set and then we can divide the buffers between queue 1,2,3 and 4. For queue 1,3 and 4 you can select a value between 0 and 99. If you type 0 you will disable the queue. You can’t do this for queue 2 because it is used for the CPU buffer. Let’s take a look at an actual example:

Switch(config)#mls qos queue-set output 2 buffers 33 17 25 25

This will divide the buffer space like this:

  • 33% for queue 1.
  • 17% for queue 2.
  • 25% for queue 3.
  • 25% for queue 4.

Besides dividing the bufferspace between the queues we also have to configure the following values per queue:

  • Threshold 1 value
  • Threshold 2 value
  • Reserved value
  • Maximum value

The command to configure these values looks like this:

mls qos queue-set output <queue-set> threshold <queue number> T1 T2 RESERVED MAXIMUM

First you need to select a queue-set, select the queue number and finally configure a threshold 1 and 2 value, reserved value and the maximum value.

Here’s an example:

Switch(config)#mls qos queue-set output 2 threshold 3 33 66 100 300

In the example above we configure queue-set 2. We select queue 3 and set the following values:

  • Threshold 1 = 33%
  • Threshold 2 = 66%
  • Reserved = 100%
  • Maximum = 300%

This means that threshold 1 can go up to 33% of the queue. Threshold 2 can go up to 66% of the queue. We reserve 100% buffer space for this queue and in case the queue is full we can borrow more buffer space from the common pool. 300% means we can get twice our queue size from the common pool.

Assign marked packets/frames to correct queue

You now know how to configure the buffers and thresholds but we still have to tell the switch which CoS and DSCP values have to go to which queue. Here’s the command for it:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 662 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

501 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Forum Replies

  1. Hi Joey,

    Configuration-wise, WRR (Weighted Round Robin) and SRR (Shaped Round Robin) are very similar. You can use the examples in this lesson:

    Something to k

    ... Continue reading in our forum

  2. Hello Sze Jie K

    I’ll attempt to answer your questions below:

    Yes. When a port is set to untrusted (by default) it does not trust the CoS values of the incoming frames, so those are reset to the value set in the command.

    ... Continue reading in our forum

  3. Hi Sze Jie K,

    Let me jump in on this. You are using a 3560 or 3750?

    Once you enable QoS, all CoS/DSCP values get assigned to 4 different queues. You can’t change or disable these. If you want to mimic something where only voice traffic gets priorited then you could configure something like this:

    Q1: 10% of bandwidth
    Q2: 80% of bandwidth
    Q3/Q4: each 5% of bandwidth

    You can assign the CoS/DSCP values that you use for Voice to Q1 and everything else to Q2. It’s a pain to configure QoS on these switches as it affects all your traffic. It’s not as easy as on a route

    ... Continue reading in our forum

  4. These switches only have one priority queue, the other queues are served in (weighted) round robin so Q2 doesn’t have a higher priority than Q3.

    ... Continue reading in our forum

35 more replies! Ask a question or join the discussion by visiting our Community Forum