cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Join Customer Connection to register!
984
Views
0
Helpful
0
Replies
felix.kessels
Beginner

QoS / CoS Marking of Catalyst c3560/c3750 Series Switches generated Frames/Packets

Hi all,

It started with a simple Question:

'How does a c3560 mark it's generated Frames when mls qos is enabled?'

This answer should be Simple: All Frames which are necessary to operate like STP Packets, should be marked with CoS 7

CoS marking because it's layer2.

Protocols like CDP, DTP, VTP should not be marked, because they are additions

Ok We enable QoS and we want that all CoS 6 and CoS 7 marked Frames go into the Expedit Queue1 threshold3 so that these Frames will have priority over all other frames. So we do have to remark those Frames. ( Even the Best Practice Guides SRND4 dicate you should use Q2T3 we do want to change this behavior)

So this should be the relevant config

!

mls qos srr-queue output cos-map queue 1 threshold 3 7

mls qos

!

interface GigabitEthernet0/1

switchport trunk encapsulation dot1q

switchport mode trunk

switchport nonegotiate

carrier-delay msec 0

srr-queue bandwidth share 1 35 40 15

srr-queue bandwidth shape 10 0 0 0

priority-queue out

mls qos trust dscp

spanning-tree portfast trunk

!

SHUT

!

So let's verify

Switch#sh mls qos maps  cos-output-q

   Cos-outputq-threshold map:

              cos:  0   1   2   3   4   5   6   7 

              ------------------------------------

  queue-threshold: 4-1 4-1 4-1 4-1 4-1 3-1 2-1 1-3

Switch#

Ok Looks Good ;-) lets check interface counters and mls qos statistics

Switch#sh int g0/1 | i packets

  5 minute input rate 0 bits/sec, 0 packets/sec

  5 minute output rate 0 bits/sec, 0 packets/sec

     0 packets input, 0 bytes, 0 no buffer

     0 input packets with dribble condition detected

     0 packets output, 0 bytes, 0 underruns

Switch#

Switch#sh mls qos interface gigabitEthernet 0/1 statistics

GigabitEthernet0/1 (All statistics are in packets)

! Snip - we are only interested in output packets

dscp: outgoing

-------------------------------

  0 -  4 :           0            0            0            0            0 

  5 -  9 :           0            0            0            0            0 

10 - 14 :           0            0            0            0            0 

15 - 19 :           0            0            0            0            0 

20 - 24 :           0            0            0            0            0 

25 - 29 :           0            0            0            0            0 

30 - 34 :           0            0            0            0            0 

35 - 39 :           0            0            0            0            0 

40 - 44 :           0            0            0            0            0 

45 - 49 :           0            0            0            0            0 

50 - 54 :           0            0            0            0            0 

55 - 59 :           0            0            0            0            0 

60 - 64 :           0            0            0            0 

cos: outgoing

-------------------------------

  0 -  4 :           0            0            0            0            0 

  5 -  7 :           0            0            0 

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

-----------------------------------------------

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

Let's start that interface, let it run for a view seconds (stp bpdu are by default transmitted every 2 seconds) and shut it again..

and now we check the counters again.

Switch#sh interfaces g0/1 | i packets output

     153 packets output, 14296 bytes, 0 underruns

Switch#sh interfaces g0/1 | i packets      

     7 packets input, 686 bytes, 0 no buffer

     0 input packets with dribble condition detected

     153 packets output, 14296 bytes, 0 underruns

Switch#sh mls qos interface g0/1 statistics

GigabitEthernet0/1 (All statistics are in packets)

  dscp: outgoing

-------------------------------

  0 -  4 :           0            0            0            0            0 

  5 -  9 :           0            0            0            0            0 

10 - 14 :           0            0            0            0            0 

15 - 19 :           0            0            0            0            0 

20 - 24 :           0            0            0            0            0 

25 - 29 :           0            0            0            0            0 

30 - 34 :           0            0            0            0            0 

35 - 39 :           0            0            0            0            0 

40 - 44 :           0            0            0            0            0 

45 - 49 :           0            0            0            0            0 

50 - 54 :           0            0            0            0            0 

55 - 59 :           0            0            0            0            0 

60 - 64 :           0            0            0            0 

cos: outgoing

-------------------------------

  0 -  4 :           0            0            0            0            0 

  5 -  7 :           0            0            0 

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

-----------------------------------------------

queue 0:           0           0           0

queue 1:           7           0         153

queue 2:           0           0           0

queue 3:           0           0           0

Ok  So after Reading https://supportforums.cisco.com/docs/DOC-8093

We do know that these Output may start as Base 0 so queue 0 in output should be queue 1 , and so on. There is also a bug Report CSCua16688   which mentioned this.

Since Q1 is the PQ on 3560 I would expect the output to be on queue 0 : and I would have expected that there is a match in cos:outgoing.....

Ok maybe I'm wrong with the Queue Number... let's change this      quickly:

mls qos srr-queue output cos-map queue 2 threshold 2 7

Switch#sh mls qos maps cos-output-q

   Cos-outputq-threshold map:

              cos:  0   1   2   3   4   5   6   7 

              ------------------------------------

  queue-threshold: 4-1 4-1 4-1 4-1 4-1 3-1 2-1 2-2

Switch#

Clear all counters !!!

and shut no shut that interface

Switch#sh

*Mar  4 20:56:40.508: %SYS-5-CONFIG_I: Configured from console by consoleint g0/1 | i packet

  5 minute input rate 0 bits/sec, 0 packets/sec

  5 minute output rate 1000 bits/sec, 2 packets/sec

     5 packets input, 490 bytes, 0 no buffer

     0 input packets with dribble condition detected

     113 packets output, 11081 bytes, 0 underruns

Switch#

show mls qos interface g0/1 stat

!snip

  cos: outgoing

-------------------------------

  0 -  4 :           1            0            0            0            0 

  5 -  7 :           0            0            0 

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

-----------------------------------------------

queue 0:           0           0           0

queue 1:           5           0         112

queue 2:           0           0           0

queue 3:           1           0           0

  output queues dropped:

queue:    threshold1   threshold2   threshold3

-----------------------------------------------

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

Policer: Inprofile:            0 OutofProfile:            0

Switch#

This does not make sense to me. I Do accept that IOS marks the frames with CoS, and that It will not show up in the qos statistics, but obviously I can not influence to which Output Queue that Frame is sent to. For me it does look like that the IOS bypasses the CoS marking and sends all STP traffic to Q2T3, regardless which Queue is configured.

1. So can somebody confirm this behavior ?

2. Is there anywhere an official list, which explains how IOS marks self generated Frames/Packets?

3. Is there anywhere a document which documents this behavior?

By the way,  a packet capture on a pc directly attached to an interface also confirms this behavior. Packets which do flow from e..g g0/2 input to g0/1 out, which follow the whole classification, marking and queuing flow will count int cos:output and output queue enqueued.

This was tested on a WS-C3560G-24PS-S running

Cisco IOS Software, C3560 Software (C3560-IPBASEK9-M), Version 12.2(58)SE2, RELEASE SOFTWARE (fc1)

0 REPLIES 0