The Multi-Vendor Networking Forum and Resources
Cisco Catalyst Switch QOS Configuration





QOS
on Cisco switches can be very challenging. Each product line is different and may use different commands and priority queue. In chassis switches the number of egress queue's vary based on the line card used. If you want to use QOS in your network, you need to make sure you purchase the line card that has the QOS features built into it.

I have found that most Catalyst switch ports only have 2 or 4 egress hardware queues. These hardware queues use FIFO and no longer look at the DSCP markings. Due to this, an EF packet may get sent after an AF13 packet if the AF13 packet arrives into the queue first. You will get better QOS out of a line card that has more hardware queues.

***I use the 10,10,60,20 method on the LAN. You may want to adjust it to fit your needs.
10% = Priority traffic (For me, Voice)
10% = Network Management (Voice Control, Network management like SSH, RDP, SNMP etc..)
60% = Business critical traffic
20% = Everything else

**Your COS to Queue mappings may need adjusting depending on your needs. I found these to work just fine for me.


The configuration given here is an easy to use and generic configuration. I recommend that you read the product configuration guide for the software release that you are running. Cisco's QOS ability is very extensive and you really need to setup a custom policy to meet your needs. The below policy may not fit your needs.




 




Catalyst 3560 Configuration

Global Configuration

mls qos   Enables QOS on the switch
mls qos map cos-dscp 0 8 16 24 32 46 48 56 Sets the COS-DSCP values
   
mls qos srr-queue output cos-map queue 1 threshold 3 5  COS 5, in Q1, Threshold 3
mls qos srr-queue output cos-map queue 2 threshold 2 6 7  COS 6,7, in Q2, Threshold 2
mls qos srr-queue output cos-map queue 2 threshold 3 4  COS 4, in Q2, Threshold 3
mls qos srr-queue output cos-map queue 3 threshold 3 3  COS 3, in Q3, Threshold 3
mls qos srr-queue output cos-map queue 4 threshold 1 2  COS 2, in Q4, Threshold 1
mls qos srr-queue output cos-map queue 4 threshold 3 0 1  COS 0,1, in Q4, Threshold 3


Cos-dscp map:
cos:     0   1   2   3   4   5  6    7
----------------------------------------
dscp: 00 08 16 24 32 46 48 56




Interface configuration

interface range FastEthernet1/1 - # END USER PORTS
   
srr-queue bandwidth share 10 10 60 20 Allocates Bandwidth per queue in Percent
 srr-queue bandwidth shape 10 0 0 0 Max bandwidth on priority queue
priority-queue out Enables Priority queue
   
   
mls qos trust dscp Uplink ports PORTS, LWAP's
  Keeps current markings on ingress packets

Back to the Top



Catalyst 4500 Configuration
  ***Different line cards with different supervisors and IOS will have different features. This is a generic configuration, I suggest you read the configuration guide for your hardware and IOS version for all features***



Catalyst 4500—Queuing and Dropping
qos dbl ! Globally enables DBL
qos dbl exceed-action ecn ! Optional: Enables DBL to mark RFC 3168 ECN bits in the IP ToS Byte
qos map dscp 16 17 18 19 20 21 22 23 to tx-queue 1 ! Maps DSCP CS1 (Scavenger) and AF11/AF12/AF13 (Bulk) to Q1
qos map dscp 32 33 34 35 36 37 38 39 to tx-queue 4 ! Maps DSCP CS4 and AF41/AF42/AF43 to Q4
qos map dscp 46 to tx-queue 3 ! Maps DSCP EF (VoIP) to Q3 (PQ)
qos map cos 1 to dscp 8 COS to DSCP Mapping
qos map cos 2 to dscp 16
qos map cos 3 to dscp 24
qos map cos 4 to dscp 32
qos map cos 5 to dscp 46
qos map cos 6 to dscp 48
qos map cos 7 to dscp 56
policy-map DBL ! Enables DBL on all traffic flows
class class-default
dbl
 
 
interface range FastEthernet2/1 - 48 END USER PORTS - FastEthernet
tx-queue 3  ! Enables Q3 as PQ
priority high
shape percent 10  ! Shapes PQ to 10%

interface range GigabitEthernet1/1 - 2 END USER PORTS - Gigabit Ethernet
service-policy output DBL ! Applies DBL policy, On Some platforms, this drops the port.
 tx-queue 2
bandwidth percent 60  ! Q2 gets 60%
tx-queue 3
priority high  ! Enables Q3 as PQ
bandwidth percent 10  ! PQ gets 10%
shape percent 10  ! Shapes PQ to 10%
tx-queue 4
bandwidth percent 10  ! Q4 gets 10%

Back to the Top





Catalyst 6500 Configuration

  ***Different line cards with different supervisors and IOS will have different features. This is a generic configuration, I suggest you read the configuration guide for your hardware and IOS version for all features***

Below you will find the configuration for some of the line cards. If your line card is not listed, the best thing to do is to issue the following command
      "
show int <type> <slot/port> capabilities" Click here to see the output



WS-X6516-GBIC 16 port 1000mb GBIC 1P2Q2T DEFAULTS After Change
queue thresh cos-map  queue thresh cos-map
 wrr-queue cos-map 2 1 3      ---------------------------------------     ---------------------------------------
 wrr-queue cos-map 2 2 4 6 7     1     1      0 1      1     1      0 1 
    1     2      2 3      1     2      2 
    2     1      4 6      2     1      3 
    2     2      7      2     2      4 6 7 
    3     1      5      3     1      5 
WS-X6748-SFP 48 port 1000mb SFP 1P3Q8T    
queue thresh cos-map  queue thresh cos-map
    ---------------------------------------     ---------------------------------------
 wrr-queue cos-map 1 1 2     1     1      0      1     1      2 
 wrr-queue cos-map 1 5 0     1     2      1      1     2      
 wrr-queue cos-map 1 8 1     1     3           1     3      
 wrr-queue cos-map 2 8 3     1     4           1     4      
 wrr-queue cos-map 3 7 4     1     5           1     5      0 
    1     6           1     6      
    1     7           1     7      
Queue, Threshold, COS Value     1     8           1     8      1 
Queue 4 = Priority Queue with COS 5 in it by default     2     1      2      2     1      
      2     2      3 4      2     2      
Apply to port 1,2,25,26 only, it will config all on the ports on the asic     2     3           2     3      
    2     4           2     4      
    2     5           2     5      
wrr-queue bandwidth 0 60 10     2     6           2     6      
priority-queue queue-limit 10     2     7           2     7      
    2     8           2     8      3 
Q1=0%, Q2=60%,Q3=10%, Priority Q=10%     3     1      6 7      3     1      6 7 
    3     2           3     2      
    3     3           3     3      
    3     4           3     4      
    3     5           3     5      
    3     6           3     6      
    3     7           3     7      4
    3     8           3     8      
    4     1      5      4     1      5 
WS-X6348-RJ-45
48 port 10/100 mb RJ45 2Q2T    
queue thresh cos-map queue thresh cos-map
 wrr-queue cos-map 1 1 0 1 2     ---------------------------------------     ---------------------------------------
 wrr-queue cos-map 1 2 3     1     1      0 1      1     1      0 1 2 
 wrr-queue cos-map 2 1 6 7     1     2      2 3      1     2      3 
 wrr-queue cos-map 2 2 4 5     2     1      4 5      2     1      6 7 
wrr-queue bandwidth percent 80 20     2     2      6 7      2     2      4 5 
WS-X6148A-GE-45AF  & WSX6148A-45AF 48-port 10/100/1000 RJ45 1P3Q8T    
queue thresh cos-map
    ---------------------------------------
 wrr-queue cos-map 1 1 2     1     1      0 
 wrr-queue cos-map 1 5 0     1     2      1 
 wrr-queue cos-map 1 8 1     1     3      
 wrr-queue cos-map 2 8 3     1     4      
 wrr-queue cos-map 3 7 4     1     5      
    1     6      
    1     7      
Queue, Threshold, COS Value     1     8      
Queue 4 = Priority Queue with COS 5 in it by default     2     1      2 
      2     2      3 4 
Apply to port 1,2,25,26 only, it will config all on the ports on the asic     2     3      
    2     4      
    2     5      
wrr-queue bandwidth 0 60 10     2     6      
    2     7      
priority-queue cos-map 1 5     2     8      
Q1=0%, Q2=60%,Q3=10%, Priority Q=10%     3     1      6 7 
    3     2      
    3     3      
    3     4      
    3     5      
    3     6      
    3     7      
    3     8      
    4     1      5 
WS-X6516A-GBIC SFM-capable 16 port 1000mb GBIC 1P2Q2T    
 wrr-queue cos-map 1 1 0 1 2
 wrr-queue cos-map 1 2 3
 wrr-queue cos-map 2 1 6 7
 wrr-queue cos-map 2 2 4 5
wrr-queue bandwidth percent 80 20
priority-queue queue-limit 10
Priority Queue = 3
WS-SUP32-GE-3B  -- Tremont/RCDC Supervisor Engine 32 8GE 1P3Q8T    
 wrr-queue cos-map 1 1 2
 wrr-queue cos-map 1 5 0
 wrr-queue cos-map 1 8 1
 wrr-queue cos-map 2 8 3
 wrr-queue cos-map 3 7 4
wrr-queue bandwidth 0 60 10
WS-X6408A-GBIC 8 port 1000mb GBIC Enhanced QoS 1P2Q2T    
 wrr-queue cos-map 1 1 0 1 2
 wrr-queue cos-map 1 2 3
 wrr-queue cos-map 2 1 6 7
 wrr-queue cos-map 2 2 4 5
priority-queue cos-map 1 5
wrr-queue bandwidth percent 80 20

Back to the Top