06-07-2012 11:47 PM - edited 03-07-2019 07:08 AM
Hi,
I am new to configure QoS on 3560 switch i have taken the template from cisco configuration guide since we have different QoS configuration on each model.
below is the configuration :
configure terminal
mls qos
end
mls qos map cos-dscp 0 8 16 26 32 46 48 56
no mls qos srr-queue input cos-map
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
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
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
Buffer Allocation for a ports four output queues
mls qos queue-set output 1 buffers 10 10 26 54
mls qos queue-set output 2 buffers 16 6 17 61 -
under respective interface :
srr-queue bandwidth share 10 10 60 20
srr-queue bandwidth shape 10 0 0 0
queue-set 2
mls qos trust device cisco-phone
mls qos trust cos
auto qos voip cisco-phone
According to above configuration of shaped round robin , i made the calculation whereas
BW limit for Q1 ( Mbps ): 1/10 * 1000 = 100 Mbps
BW limit for Q2 ( Mbps) : { 10/(10+60+20) } * ( 1000-100) Mbps = 108 Mbps
BW limit for Q3 ( Mbps) : { 60/(10+60+20) } * ( 1000-100) Mbps = 603 Mbps
BW limit for Q4 ( Mbps) : { 20/(10+60+20) } * ( 1000-100) Mbps = 207 Mbps
As per the default configuration , we have changed the mapping value of cos 5 & cos 3 , this is done with the help of existing configuration in same model in my network set-up but i am failed to understand the outcome of this entire configuration
I am sorry to ask basic question but i want to learn QoS and this is first step for me.
Currently all the cisco phones are connected to this switch and configuration with only one vlan that is voice vlan .
Doubts :
1) what is the outcome of this configuration , i mean, what will be the expected output ? end of the day we need to prioritize the voice traffic but why other commands including threshold and buffers are mentioned with respectives queues , if I need to explain that what am i expecting out of this configuration ?
2) this is LAN QoS which i understood but again , do i need to configure policy-map along with class-map which is MQC on this switch ?
3) i have edge router where i have MQC already configured but confusion with this switch which is working as a Access switch .
4) I referred the cisco QoS document for the respetive model whereas we have policy-map configured on the same switch with class-map .
My understanding is if we have configured the LAN QoS , and mapped the CoS value with DSCP , we need not to have MQC.
Please put light on this ......
Thanks in advance.
Solved! Go to Solution.
06-08-2012 01:39 AM
Hi Vinod,
if am not wrong you have used port based Qos policing. As per your configuration you have made the cisco ip phone as the trsuted one in the interafaces and also you have only voice vlan configured to the switch. The output of your current configuration will be whatever you have marked (cos value) in the ip phone will get trusted and send that same cos mapping out.
mls qos map cos-dscp 0 8 16 26 32 46 48 56
<--------Cos Value------> 0 1 2 3 4 5 6 7
The required DSCP value for the voice payload is DSCP EF -- 46(dscp value) as per the rfc standard.
If you have configured the cos 5 for the ip phones. then the same will be trusted and will go out. if you changed the dscp value. You need to have the change in the configurations as well. But its advised not to change the default dscp values.
Hope this helps.
Please reply if you have any concern
Do rating if this information helps.
by
Karthik
06-08-2012 01:00 PM
Hi Vinod, there are few mistakes in your config but let me start my reply by answering your questions.
1) what is the outcome of this configuration , i mean, what will be the expected output ? end of the day we need to prioritize the voice traffic but why other commands including threshold and buffers are mentioned with respectives queues , if I need to explain that what am i expecting out of this configuration ?
Every interface on the switch has Ingress and Egress Queues and
Ingress queue: (global config)
the Ingress Queue has two queues-- Queue1 and Queue2 -- Queue2 is the priority queue by default.By default the Ingress queue buffer is shared 90% by Queue1 and 10% by Queue2--- You would need to point your voice packets to Queue2 since its the priority queue.Below are the commands which map the incomming voice packets with COS value 3, 5 and DSCP values 40 to 46- to Queue2 and the rest of them to Queue1 ---This is the mistake in your config-
mls qos srr-queue input cos-map queue 1 0 1 2 6 7
mls qos srr-queue input cos-map queue 2 3 5
mls qos srr-queue input dscp-map queue 1 0 1 2 3 4 5 6 7
mls qos srr-queue input dscp-map queue 1 8 9 10 11 12 13 14 15
mls qos srr-queue input dscp-map queue 1 16 17 18 19 20 21 22 23
mls qos srr-queue input dscp-map queue 1 24 25 26 27 28 29 30 31
mls qos srr-queue input dscp-map queue 1 32 33 34 35 36 37 38 39
mls qos srr-queue input dscp-map queue 2 40 41 42 43 44 45 46 47
mls qos srr-queue input dscp-map queue 1 48 49 50 51 52 53 54 55
mls qos srr-queue input dscp-map queue 1 56 57 58 59 60 61 62 63
You can change the bandwidths and priorities assigned to the queus by using the below commands
mls qos srr-queue input bandwidth 90 10
There will 3 thresholds on each queue.You can change threshold1 and threshold2 but the thereshold 3 is fixed at 100%.Below commands set the thresholds on the queues- queue1's threshold 1 is set to 30% and threshold 2 is set to 50%.Queue2's threshold 1 is set to 70% and threshold 2 is set to 80% of the queue bandwidth.Threshold values help to more granually shape the traffic inside a queue.
mls qos srr-queue input threshold 1 30 50
mls qos srr-queue input threshold 2 70 80
The below command allow the cos1 traffic in queue1 untill they reach threshold 1 (you can change these values based on your requirements)
mls qos srr-queue input cos-map queue 1 threshold 1 1
mls qos srr-queue input cos-map queue 1 threshold 2 2 --- queue1-allows cos2 traffic until it reaches threshold2
mls qos srr-queue input cos-map queue 2 threshold 3 3 5---queue2-allows cos3 and cos5 traffic untill it reaches threshold3-means 100%
Below are the same commands for DSCP
mls qos srr-queue input dscp-map queue 2 threshold 3 46
Egress Queue:
There are 4 queues and two queue sets in egress queue buffer, the queue set has the option to configure the buffer size and threshold value for the 4 queues.
You have to configure the thresholds and buffers based on your requiremetns, below is an example config which configures queue1 as the pririty queue
under respective interface :
srr bandwidth shape 5 0 0 0
srr-queue bandwidth share 1 4 2 1
mls qos trust device cisco-phone
mls qos trust cos
auto qos voip cisco-phone
priority-queue out
global config mode:
mls qos queue-set output 1 buffers 20 40 30 10
mls qos queue-set output 1 threshold 1 5 20 100 200
mls qos queue-set output 1 threshold 2 50 80 100 100
mls qos queue-set output 1 threshold 3 50 80 100 150
mls qos queue-set output 1 threshold 4 30 70 100 250
mls qos srr-queue output dscp-map queue 1 threshold 3 46
mls qos srr-queue output dscp-map queue 1 threshold 1 26 20 10 0
mls qos srr-queue output dscp-map queue 2 threshold 3 26
mls qos srr-queue output dscp-map queue 2 threshold 1 20 10 0
mls qos srr-queue output dscp-map queue 3 threshold 3 20 10
mls qos srr-queue output dscp-map queue 3 threshold 1 0
mls qos srr-queue output dscp-map queue 4 threshold 3 0
mls qos srr-queue output dscp-map queue 4 threshold 2 46 26
mls qos srr-queue output dscp-map queue 4 threshold 1 20 10
According to the above config
queue 1 is the priority queue with 200 Mbps bandwidth (assuming 1G link on the router) and it will start dropping packets with af31,af22,af11 and default markings when it reaches 5% of its allocated bandwidth.
queue 2 ,3 and 4 share the remaining bandwidth (457.14 Mbps (4/7)*(1000-200) ,228.57 Mbps and 114.xx Mbps).
queue 2 will start to drop the packets with af22,af11 and default markings when it reaches 50% of its allocated bandwidth.
queue 3 will start dropping packets with default markings when it reaches 50% of its allocated bandwidth.
Queue 4 will start dropping packets with ef and af31 markings when it reaches 70% and af22 and af11 markings when it reaches 30% of its allocated bandwidth
you can change the thresholds and percentages based on your requirements.Below is the document which explains QoS in detail
http://www.cisco.com/en/US/products/hw/switches/ps5023/products_tech_note09186a0080883f9e.shtml
2) this is LAN QoS which i understood but again , do i need to configure policy-map along with class-map which is MQC on this switch ?
You don't need to you can't apply both port based QoS config and MQC to the same interface.
3) i have edge router where i have MQC already configured but confusion with this switch which is working as a Access switch .
4) I referred the cisco QoS document for the respetive model whereas we have policy-map configured on the same switch with class-map .
You can configure both port based and MQC on the same switch but you can't apply both to the same interface on that switch.
You can just use Autoqos command, it will configure everything for you.Below are the commands that are required to configure autoqos
Under the interface where the phones are connected
mls qos trust cos
auto qos voip cisco-phone (if you are using cisco phones)
auto qos voip trust (phones other than cisco)
06-08-2012 01:39 AM
Hi Vinod,
if am not wrong you have used port based Qos policing. As per your configuration you have made the cisco ip phone as the trsuted one in the interafaces and also you have only voice vlan configured to the switch. The output of your current configuration will be whatever you have marked (cos value) in the ip phone will get trusted and send that same cos mapping out.
mls qos map cos-dscp 0 8 16 26 32 46 48 56
<--------Cos Value------> 0 1 2 3 4 5 6 7
The required DSCP value for the voice payload is DSCP EF -- 46(dscp value) as per the rfc standard.
If you have configured the cos 5 for the ip phones. then the same will be trusted and will go out. if you changed the dscp value. You need to have the change in the configurations as well. But its advised not to change the default dscp values.
Hope this helps.
Please reply if you have any concern
Do rating if this information helps.
by
Karthik
06-08-2012 04:10 AM
Also i dont think you require MQC for the same.
06-08-2012 01:00 PM
Hi Vinod, there are few mistakes in your config but let me start my reply by answering your questions.
1) what is the outcome of this configuration , i mean, what will be the expected output ? end of the day we need to prioritize the voice traffic but why other commands including threshold and buffers are mentioned with respectives queues , if I need to explain that what am i expecting out of this configuration ?
Every interface on the switch has Ingress and Egress Queues and
Ingress queue: (global config)
the Ingress Queue has two queues-- Queue1 and Queue2 -- Queue2 is the priority queue by default.By default the Ingress queue buffer is shared 90% by Queue1 and 10% by Queue2--- You would need to point your voice packets to Queue2 since its the priority queue.Below are the commands which map the incomming voice packets with COS value 3, 5 and DSCP values 40 to 46- to Queue2 and the rest of them to Queue1 ---This is the mistake in your config-
mls qos srr-queue input cos-map queue 1 0 1 2 6 7
mls qos srr-queue input cos-map queue 2 3 5
mls qos srr-queue input dscp-map queue 1 0 1 2 3 4 5 6 7
mls qos srr-queue input dscp-map queue 1 8 9 10 11 12 13 14 15
mls qos srr-queue input dscp-map queue 1 16 17 18 19 20 21 22 23
mls qos srr-queue input dscp-map queue 1 24 25 26 27 28 29 30 31
mls qos srr-queue input dscp-map queue 1 32 33 34 35 36 37 38 39
mls qos srr-queue input dscp-map queue 2 40 41 42 43 44 45 46 47
mls qos srr-queue input dscp-map queue 1 48 49 50 51 52 53 54 55
mls qos srr-queue input dscp-map queue 1 56 57 58 59 60 61 62 63
You can change the bandwidths and priorities assigned to the queus by using the below commands
mls qos srr-queue input bandwidth 90 10
There will 3 thresholds on each queue.You can change threshold1 and threshold2 but the thereshold 3 is fixed at 100%.Below commands set the thresholds on the queues- queue1's threshold 1 is set to 30% and threshold 2 is set to 50%.Queue2's threshold 1 is set to 70% and threshold 2 is set to 80% of the queue bandwidth.Threshold values help to more granually shape the traffic inside a queue.
mls qos srr-queue input threshold 1 30 50
mls qos srr-queue input threshold 2 70 80
The below command allow the cos1 traffic in queue1 untill they reach threshold 1 (you can change these values based on your requirements)
mls qos srr-queue input cos-map queue 1 threshold 1 1
mls qos srr-queue input cos-map queue 1 threshold 2 2 --- queue1-allows cos2 traffic until it reaches threshold2
mls qos srr-queue input cos-map queue 2 threshold 3 3 5---queue2-allows cos3 and cos5 traffic untill it reaches threshold3-means 100%
Below are the same commands for DSCP
mls qos srr-queue input dscp-map queue 2 threshold 3 46
Egress Queue:
There are 4 queues and two queue sets in egress queue buffer, the queue set has the option to configure the buffer size and threshold value for the 4 queues.
You have to configure the thresholds and buffers based on your requiremetns, below is an example config which configures queue1 as the pririty queue
under respective interface :
srr bandwidth shape 5 0 0 0
srr-queue bandwidth share 1 4 2 1
mls qos trust device cisco-phone
mls qos trust cos
auto qos voip cisco-phone
priority-queue out
global config mode:
mls qos queue-set output 1 buffers 20 40 30 10
mls qos queue-set output 1 threshold 1 5 20 100 200
mls qos queue-set output 1 threshold 2 50 80 100 100
mls qos queue-set output 1 threshold 3 50 80 100 150
mls qos queue-set output 1 threshold 4 30 70 100 250
mls qos srr-queue output dscp-map queue 1 threshold 3 46
mls qos srr-queue output dscp-map queue 1 threshold 1 26 20 10 0
mls qos srr-queue output dscp-map queue 2 threshold 3 26
mls qos srr-queue output dscp-map queue 2 threshold 1 20 10 0
mls qos srr-queue output dscp-map queue 3 threshold 3 20 10
mls qos srr-queue output dscp-map queue 3 threshold 1 0
mls qos srr-queue output dscp-map queue 4 threshold 3 0
mls qos srr-queue output dscp-map queue 4 threshold 2 46 26
mls qos srr-queue output dscp-map queue 4 threshold 1 20 10
According to the above config
queue 1 is the priority queue with 200 Mbps bandwidth (assuming 1G link on the router) and it will start dropping packets with af31,af22,af11 and default markings when it reaches 5% of its allocated bandwidth.
queue 2 ,3 and 4 share the remaining bandwidth (457.14 Mbps (4/7)*(1000-200) ,228.57 Mbps and 114.xx Mbps).
queue 2 will start to drop the packets with af22,af11 and default markings when it reaches 50% of its allocated bandwidth.
queue 3 will start dropping packets with default markings when it reaches 50% of its allocated bandwidth.
Queue 4 will start dropping packets with ef and af31 markings when it reaches 70% and af22 and af11 markings when it reaches 30% of its allocated bandwidth
you can change the thresholds and percentages based on your requirements.Below is the document which explains QoS in detail
http://www.cisco.com/en/US/products/hw/switches/ps5023/products_tech_note09186a0080883f9e.shtml
2) this is LAN QoS which i understood but again , do i need to configure policy-map along with class-map which is MQC on this switch ?
You don't need to you can't apply both port based QoS config and MQC to the same interface.
3) i have edge router where i have MQC already configured but confusion with this switch which is working as a Access switch .
4) I referred the cisco QoS document for the respetive model whereas we have policy-map configured on the same switch with class-map .
You can configure both port based and MQC on the same switch but you can't apply both to the same interface on that switch.
You can just use Autoqos command, it will configure everything for you.Below are the commands that are required to configure autoqos
Under the interface where the phones are connected
mls qos trust cos
auto qos voip cisco-phone (if you are using cisco phones)
auto qos voip trust (phones other than cisco)
06-10-2012 09:40 PM
Hi ,
I am very happy to see such descriptive reply. even i understood some of basic in very good manner.
this gives me encouragement to learn QoS.
Thanks ,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide