cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
445
Views
1
Helpful
3
Replies

COS Help

Raymond Brown
Level 1
Level 1

I've recently been tasked with configuring a cisco switch and in the process I'm trying to understand the config on the current switch.  I'm stumped with the QOS/COS commands.  I've done a little research but was wondering if someone can explain to me what this config is actually doing.  Any help would be aprreciated.  It is currently a layer 2 switch and I plan to make it a layer 3 switch and am wondering how or if this will affect QOS or vice versa.

 

Thanks In Advance

 

 

 

mls qos map cos-dscp 0 8 16 24 32 46 48 56
mls qos srr-queue input bandwidth 70 30
mls qos srr-queue input threshold 1 80 90
mls qos srr-queue input priority-queue 2 bandwidth 30
mls qos srr-queue input cos-map queue 1 threshold 2 3
mls qos srr-queue input cos-map queue 1 threshold 3 6 7
mls qos srr-queue input cos-map queue 2 threshold 1 4
mls qos srr-queue input dscp-map queue 1 threshold 2 24
mls qos srr-queue input dscp-map queue 1 threshold 3 48 49 50 51 52 53 54 55
mls qos srr-queue input dscp-map queue 1 threshold 3 56 57 58 59 60 61 62 63
mls qos srr-queue input dscp-map queue 2 threshold 3 32 33 40 41 42 43 44 45
mls qos srr-queue input dscp-map queue 2 threshold 3 46 47
mls qos srr-queue output cos-map queue 1 threshold 3 4 5
mls qos srr-queue output cos-map queue 2 threshold 1 2
mls qos srr-queue output cos-map queue 2 threshold 2 3
mls qos srr-queue output cos-map queue 2 threshold 3 6 7
mls qos srr-queue output cos-map queue 3 threshold 3 0
mls qos srr-queue output cos-map queue 4 threshold 3 1
mls qos srr-queue output dscp-map queue 1 threshold 3 32 33 40 41 42 43 44 45
mls qos srr-queue output dscp-map queue 1 threshold 3 46 47
mls qos srr-queue output dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23
mls qos srr-queue output dscp-map queue 2 threshold 1 26 27 28 29 30 31 34 35
mls qos srr-queue output dscp-map queue 2 threshold 1 36 37 38 39
mls qos srr-queue output dscp-map queue 2 threshold 2 24
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 0 1 2 3 4 5 6 7
mls qos srr-queue output dscp-map queue 4 threshold 1 8 9 11 13 15
mls qos srr-queue output dscp-map queue 4 threshold 2 10 12 14
mls qos queue-set output 1 threshold 1 100 100 50 200
mls qos queue-set output 1 threshold 2 125 125 100 400
mls qos queue-set output 1 threshold 3 100 100 100 400
mls qos queue-set output 1 threshold 4 60 150 50 200
mls qos queue-set output 1 buffers 15 25 40 20
mls qos
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 100,200,300,400,450,500,600,700 priority 0
auto qos srnd4

 

 

All of the ports are configured with:

 

interface GigabitEthernet0/1
srr-queue bandwidth share 1 30 35 5
queue-set 2
priority-queue out
mls qos trust dscp
auto qos trust dscp
spanning-tree portfast
!

1 Accepted Solution

Accepted Solutions

Hi

 

If you run Layer 2, it won't affect your actual QoS config. The layer 3 packet will be tagged with DSCP value and your actual config is taking care of such packets.

 

However, if you run Layer 3 (including SVI...), you can use class-map and service-policy to manage the traffic. It will be easier to classify some traffic and tag it with the right DSCP. Unless all DSCP are set correctly on end devices, then no need of that.

Let me take an example to clarify:

 If you have a voice client on your laptop like Cisco Jabber. the default DSCP on windows will be 0. If you want to trust that traffic and put it in your priority queue you have 2 solutions:

 - Keep trust DSCP and configure (through GPO for example) your windows to tag this specific application with DSCP EF (voice traffic). No change on your actual config except if you face some drops you'll need to fine tune it.

 - You can do a class-map with policy-map and apply it to your port (let's assume port g1/2). In the example the acl I show you is any any for simplicity but you can tweak it for prod (don't copy/paste this config, it's just to illustrate quickly how class-map and policy-map works for access switches like yours):

 

access-list 100 permit udp any any range 16384 32767 ==> Catch all rtp traffic

class-map match-any PC-Phone --> Classify all your Cisco jabber traffic on your laptop

   match access-group 100

class-map match-all VoiP --> class-map for voice std traffic

   match ip dscp ef

class-map match-all Multimedia --> class-map for voice signaling and multimedia std traffic

   match ip dscp cs3  af31

 

policy-map VOICE

   class VoiP

      set dscp ef

   class Multimedia

      set dscp cs3

 

   class PC-Video

      set dscp af41

   class class-default

      set dscp default

int g1/2

 service-policy input VOICE

 

Thanks 

 

PS: Please don't forget to rate and select as validated answer if this answered your question


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

View solution in original post

3 Replies 3

Francesco Molino
VIP Alumni
VIP Alumni

Hi

 

Quite all values are expressed in weights (you can refer to Cisco documentation to know the calculation) but for simplicity if the sum of all numbers is 100, we can take them as percentage.

For your information, access switches like 2960, 3750,... have 2 queue in input and 4 queues in output. 

With recent IOS version, the input queue are not configurable anymore.

 

Here a sample of your commands with some explanations. With the Cisco doc aside that explanation, I'm sure you'll understand each of them.

 

 

 

 

COS Values                  0 1   2   3   4   5   6  7

mls qos map cos-dscp 0 8 16 24 32 46 48 56

à Define the DSCP value for each COS value from 0 to 7


mls qos srr-queue input bandwidth 70 30

à Minimum bandwidth for Queue 1 (70) and Queue 2 (30) in case of congestion


mls qos srr-queue input threshold 1 80 90

à Assign threshold for Queue 1 threshold 1 (80) and threshold 2 (90). Threshold 3 has a value of 100 not configurable.


mls qos srr-queue input priority-queue 2 bandwidth 30

à Make the queue 2 as priority queue (this is default behavior) and assign 30% of bandwidth


mls qos srr-queue input cos-map queue 1 threshold 2 3

à Attach traffic with COS 3 to queue 1 threshold 2 (For input traffic)


mls qos srr-queue input cos-map queue 1 threshold 3 6 7

à Attach traffic with COS 6 and 7 to queue 1 threshold 3 (For input traffic)


mls qos srr-queue input cos-map queue 2 threshold 1 4

à Attach traffic with COS 4 to queue 2 threshold 1 (For input traffic)


mls qos srr-queue input dscp-map queue 1 threshold 2 24

à Attach traffic with DSCP 24 to queue 1 threshold 2 (For input traffic). Same for all others…

 

mls qos srr-queue output cos-map queue 1 threshold 3 4 5

à Attach traffic with COS 4 and 5 to queue 1 threshold 3 (For output traffic). Same applies for all similar configs “output cos-map….”


mls qos srr-queue output dscp-map queue 1 threshold 3 46 47

à Attach traffic with DSCP 46 and 47 to queue 1 threshold 3 (For output traffic). Same applies for all similar configs “output dscp-map….”


mls qos queue-set output 1 buffers 15 25 40 20

à Split the buffer among the queues. Buffer is the same as storage space for the interface. The number 1 is corresponding to a queue-set (like a queue profile)

 

mls qos queue-set output 1 threshold 1 100 100 50 200

à for each queue (threshold 1,2…) within the queue-set 1 (output 1), you need to define 4 values: Threshold 1, Threshold 2, Reserved and Maximum.

·      Threshold 1: Max threshold for queue 1

·      Threshold 2: Max threshold for queue 2

·      Reserved: Buffer reservation for that queue

·      Maximum: Buffer space that can be used from the common pool in case the queue buffer is full



auto qos srnd4

à Activate the auto QoS on the switch

 

interface GigabitEthernet0/1
srr-queue bandwidth share 1 30 35 5

à Percentage of bandwidth for Queue 2 (30), queue 3 (35) and queue 4 (5)

Queue 1 is ignored as the command priority-queue out is applied on the interface.


queue-set 2
à Assign queue-set 2 to the interface (queue profile 2)
priority-queue out
(activate priority queue on the interface)
mls qos trust dscp
(Trust the dscp value send by the device connected to that interface) Only applies to input queue
auto qos trust dscp
(Same as before but done through auto qos feature) Only applies to input queue. Not needed as the line above is doing the same thing.

 

Thanks

 

PS: Please don't forget to rate and select as validated answer if that answered your question


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Thank You Francesco for such a speedy response.  This is very detailed and high level, but it seems I need to do some more reading on QOS terms.  I have never configured it so a lot of the terms are foreign to me.  I do have another question.

 

This is configured on a 3560x switch that's currently configured for layer 2 only.  If I use if for routing, will it affect the current qos config?  Does anything have to be configured on the connected router/firewall for this to work properly?

Hi

 

If you run Layer 2, it won't affect your actual QoS config. The layer 3 packet will be tagged with DSCP value and your actual config is taking care of such packets.

 

However, if you run Layer 3 (including SVI...), you can use class-map and service-policy to manage the traffic. It will be easier to classify some traffic and tag it with the right DSCP. Unless all DSCP are set correctly on end devices, then no need of that.

Let me take an example to clarify:

 If you have a voice client on your laptop like Cisco Jabber. the default DSCP on windows will be 0. If you want to trust that traffic and put it in your priority queue you have 2 solutions:

 - Keep trust DSCP and configure (through GPO for example) your windows to tag this specific application with DSCP EF (voice traffic). No change on your actual config except if you face some drops you'll need to fine tune it.

 - You can do a class-map with policy-map and apply it to your port (let's assume port g1/2). In the example the acl I show you is any any for simplicity but you can tweak it for prod (don't copy/paste this config, it's just to illustrate quickly how class-map and policy-map works for access switches like yours):

 

access-list 100 permit udp any any range 16384 32767 ==> Catch all rtp traffic

class-map match-any PC-Phone --> Classify all your Cisco jabber traffic on your laptop

   match access-group 100

class-map match-all VoiP --> class-map for voice std traffic

   match ip dscp ef

class-map match-all Multimedia --> class-map for voice signaling and multimedia std traffic

   match ip dscp cs3  af31

 

policy-map VOICE

   class VoiP

      set dscp ef

   class Multimedia

      set dscp cs3

 

   class PC-Video

      set dscp af41

   class class-default

      set dscp default

int g1/2

 service-policy input VOICE

 

Thanks 

 

PS: Please don't forget to rate and select as validated answer if this answered your question


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question
Review Cisco Networking products for a $25 gift card