3560 QoS

The Cisco IP Phone marks the voice payload with CoS 5 and DSCP EF

2 ingress queues . Each queue supports 3 thresholds

debug auto qos !before running the below cmd

On port
======
!trust QoS Markings if cisco ip phone. CDP must be enabled
auto qos voip cisco-phone
!trust QoS Markings if softphone on PC. CDP must be enabled
auto qos voip cisco-softphone
!trust QoS Markings. Other SW or Router
auto qos voip trust

Global
=====
mls qos

!Mapping of policed DSCP values (24 26 46) to marked-down DSCP values (0) that exceeds the configured policing rate.
mls qos map policed-dscp 24 26 46 to 0
!map COS values 0-7 to DSCP 0 8 16 24 32 46 48 56
mls qos map cos-dscp 0 8 16 24 32 46 48 56
!Assign shaped round robin (SRR) weights to an ingress queue.
!The ratio of the weights is the ratio of the frequency in which the SRR scheduler
!dequeues packets from ingress queues 1 and 2.
mls qos srr-queue input bandwidth 90 10
!Assign weighted tail-drop (WTD) threshold percentages to ingress queue 1
!If threshold 1 (8) is exceeded, packets with CoS or DSCPs assigned to this threshold are dropped
!until the threshold is no longer exceeded.
!However, packets assigned to threshold 2 (16) continue to be queued and sent as long as the second
!threshold is not exceeded.
!NOTE: threshold 3 is 100% by default and cannot be change
mls qos srr-queue input threshold 1 8 16
mls qos srr-queue input threshold 2 34 66

!Allocate the buffers between the ingress queues
!Queue 1 get 67% and queue 2 gets 33%
mls qos srr-queue input buffers 67 33
!Map class of service (CoS) values to an ingress queue
!Queue 1 threshold ID 2 COS value 1
mls qos srr-queue input cos-map queue 1 threshold 2 1
mls qos srr-queue input cos-map queue 1 threshold 3 0
mls qos srr-queue input cos-map queue 2 threshold 1 2
mls qos srr-queue input cos-map queue 2 threshold 2 4 6 7
mls qos srr-queue input cos-map queue 2 threshold 3 3 5

!Map Differentiated Services Code Point (DSCP) values to an ingress queue
!Queue 1 threshold ID 2 DSCP values 9 10 11 12 13 14 15
mls qos srr-queue input dscp-map queue 1 threshold 2 9 10 11 12 13 14 15
mls qos srr-queue input dscp-map queue 1 threshold 3 0 1 2 3 4 5 6 7
mls qos srr-queue input dscp-map queue 1 threshold 3 32
mls qos srr-queue input dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23
mls qos srr-queue input dscp-map queue 2 threshold 2 33 34 35 36 37 38 39 48
mls qos srr-queue input dscp-map queue 2 threshold 2 49 50 51 52 53 54 55 56
mls qos srr-queue input dscp-map queue 2 threshold 2 57 58 59 60 61 62 63
mls qos srr-queue input dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31
mls qos srr-queue input dscp-map queue 2 threshold 3 40 41 42 43 44 45 46 47
mls qos srr-queue output cos-map queue 1 threshold 3 5
mls qos srr-queue output cos-map queue 2 threshold 3 3 6 7
mls qos srr-queue output cos-map queue 3 threshold 3 2 4
mls qos srr-queue output cos-map queue 4 threshold 2 1
mls qos srr-queue output cos-map queue 4 threshold 3 0
mls qos srr-queue output dscp-map queue 1 threshold 3 40 41 42 43 44 45 46 47
mls qos srr-queue output dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31
mls qos srr-queue output dscp-map queue 2 threshold 3 48 49 50 51 52 53 54 55
mls qos srr-queue output dscp-map queue 2 threshold 3 56 57 58 59 60 61 62 63
mls qos srr-queue output dscp-map queue 3 threshold 3 16 17 18 19 20 21 22 23
mls qos srr-queue output dscp-map queue 3 threshold 3 32 33 34 35 36 37 38 39
mls qos srr-queue output dscp-map queue 4 threshold 1 8
mls qos srr-queue output dscp-map queue 4 threshold 2 9 10 11 12 13 14 15
mls qos srr-queue output dscp-map queue 4 threshold 3 0 1 2 3 4 5 6 7

!Configure two threshold values. Weighted tail-drop expressed as a percentage of the allocated memory.
!Amount of memory to be guaranteed (reserved) for the queue,
!expressed as a percentage of the allocated memory
!The maximum memory the queue can have before the packets are dropped.
!Queue 1 Threshold 1 drop threshold1 is 138
!Queue 1 Threshold 1 drop threshold2 is 138
!Reserved threshold 92
!Maximum threshold 138
mls qos queue-set output 1 threshold 1 138 138 92 138
mls qos queue-set output 1 threshold 2 138 138 92 400
mls qos queue-set output 1 threshold 3 36 77 100 318
mls qos queue-set output 1 threshold 4 20 50 67 400
mls qos queue-set output 2 threshold 1 149 149 100 149
mls qos queue-set output 2 threshold 2 118 118 100 235
mls qos queue-set output 2 threshold 3 41 68 100 272
mls qos queue-set output 2 threshold 4 42 72 100 242

!Allocate buffers to a queue-set (four egress queues per port)
!Queue 1 10% Queue 2 10% Queue 3 26% Queue 4 54%
!A queue-set is applyed to a Port. Default is queue-set 1
mls qos queue-set output 1 buffers 10 10 26 54
mls qos queue-set output 2 buffers 16 6 17 61
mls qos

Ref: http://www.cisco.com/en/US/products/hw/switches/ps5023products_tech_note09186a0080883f9e.shtml

Tags: , ,

About Alexis Katsavras

Working as Freelance Cisco Unified Communications Consultant in the UK. www.NetPacket.co.uk