Quality of service

Unanswered Question
Jul 2nd, 2007

Hi all, with COS, does this actually provide you with a mechanism to prioritize the traffic as it stands for class of service, not quiality of service, and this all happens at layer 2 ?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
mohammedmahmoud Mon, 07/02/2007 - 01:07


Layer 2 Classification and Marking uses the CoS 3 User Priority bits which resides in an Ethernet Frame Header (inside the 802.1Q Tag Field or the ISL header) -> 3 bits -> 8 values - The same as IP Precedence - Layer 2 to layer 3 marking mapping is applicable on Cisco switches.


Mohammed Mahmoud.

mohammedmahmoud Mon, 07/02/2007 - 02:02


Yes, and also we can map the cos to the DSCP in order to be further used on the layer 3 devices in the path.


Mohammed Mahmoud.

carl_townshend Mon, 07/02/2007 - 03:19

thanks for that

so, what is the way of identifying this traffic at layer 2, and also how is it normally done, do you basically identify the traffic then apply a cos value to it ? which gives it priority ?

Pavel Bykov Mon, 07/02/2007 - 03:21

QoS is actually a whole system of traffic flow architecture.

CoS marks are part of QoS, and can be used for QoS operations like congestion management (prioritizing traffic) or congestion avoidance (dropping aggressive traffic) just like other markings.

CoS only IDENTIFIES traffic. QoS doesn't do anything to it until you tell it to.

carl_townshend Mon, 07/02/2007 - 04:45

I thought that you can prioritize using cos ? so what is the layer 2 version of qos, can anyone explain to me what services apply at layer 2 and layer 3 then, im confused here?

many thanks

mohammedmahmoud Mon, 07/02/2007 - 05:21


CoS is used for layer 2 marking (User Priority bits which resides in an Ethernet Frame Header - inside the 802.1Q Tag Field or the ISL header), while IPP/DSCP are used for layer 3 marking (inside the IP header).

Layer 2 devices can take actions based on CoS (although newer Cisco switches understand also layer3 QoS), and layer 3 devices can take actions based on IPP and DSCP.


Mohammed Mahmoud.

carl_townshend Mon, 07/02/2007 - 05:49

thanks for that

So , can you tell me firstly, how the switch identifies the traffic, and second, how it applies the policy to it ?

mohammedmahmoud Mon, 07/02/2007 - 05:56

Hi Carl,

During classification, the switch performs a lookup and assigns a QoS label to the packet, after a packet is classified and has a DSCP-based or CoS-based QoS label assigned to it now the network device can act upon these values.

The following document is perfect for your question:



Mohammed Mahmoud.

carl_townshend Tue, 07/03/2007 - 22:34


So soon as the switch has classified the traffic, by assigning say priority 5, does the switch automatically then prioritize it ? what happens once it has been given the priority ?

mohammedmahmoud Tue, 07/03/2007 - 22:57


Classification and Marking just classifies the traffic and tags it, what ever QoS configuration you need further can be configured based on this classification and marking, but it must be explicitly configured, please refer to the examples in the document i've provided you above.

I hope that i've been informative, please do come back if you have further questions.


Mohammed Mahmoud.

carl_townshend Wed, 07/04/2007 - 00:34

Hi there

So are you saying once you have actually tagged the traffic the switch or router wont actually do anything? what needs to be done after then ?



mohammedmahmoud Wed, 07/04/2007 - 02:57

Hi Carl,

What you need to do then is to configure the required QoS tools (Policing, shaping, ...), while referencing to the earlier marking.


Mohammed Mahmoud.

Pavel Bykov Wed, 07/04/2007 - 04:19

For router to do something with it, you need to use L3 marking. Switches have COS>DSCP maps, if you are using COS. This map converts COS (Layer 2) to DSCP (Layer3) marking, and enables device to do something with it.

But COS, DSCP, IPP are all just bits - they are marks. No device does anything to them, unless you tell it to. (Except default behaviour for routing traffic in routers, and queues in switches, that are hardware dependant).

So for basic QoS you need to classify and mark traffic (like mentioned CoS, DSCP etc), and create policy for every marking.

Pavel Bykov Wed, 07/04/2007 - 04:22

CoS is three bits, 1 or 0. It does not do anything. It's just there. DSCP and IPP does not do anything either. It's a MARK.

You have to configure a device to say prioritize packets that have CoS 010 over packets that have CoS 000.

Pavel Bykov Wed, 07/04/2007 - 04:31

Imagine 20 people standing in a line.


You see that some people wear blue sweaters, and some white.


You take a red brush, and stroke white sweaters with red color, and take a black brush, and stroke blue sweaters with black color.

Congestion management:

For every person that has red strokes on them, you allow two other people through that have black strokes on them

Congestion avoidance:

If there are more than 5 people with red strokes on them, kill one person


If more that 6 people with black strokes try to enter at once, kill other people


If more that 6 people with black strokes try to enter at once, make other people wait until all people pass


If a person with red stroke weight more than 400 pounds, cut them in half


If you want people with black strokes that weight 100 pounds to pass ahead of people with red strokes that weight 400 pounds, but it takes too long for large person to get through, you cut the large person in half, let one half pass, than let person with black stroke pass, than let the other half of a person with a red stroke pass, and connect two parts of that person into one again.

CoS is marking, but that's it.

For QoS to function, all other mechanisms have to be set up.

carl_townshend Tue, 07/10/2007 - 14:30

can you tell me the difference between

classification and marking ? im a little confused ?

Michael Stuckey Wed, 07/07/2010 - 07:56

I always look at classification as "Identify/matching" something and Marking as "changing" what I identified.

You could match several different markings and change them all to just one marking.

You could identify(classify) AF21, AF20, AFxx and change(mark) them all to be just AF21.

When you make changes you also have the opportunity to control allocated bandwidth for it to.

You will see match, match, match in class-maps and under policies you will see set, set, set for those class map identifications.

nqtran1979 Wed, 07/07/2010 - 09:11

I think everyone is making this more difficult than it is.

the original question is: does CoS provide you with a mechanism to prioritize the traffic.

Answer: yes it does

Explanation: by default cisco switches remark everything it recieves to CoS 0 (best effort) and then sends it out. When you configure the switches to trust the CoS markings (that has been done before it reaches the switch) and/or remark them to CoS (whatever) you can then enable priority (outbound) queueing aswell as all the extra settings such as bandwidth assigned to each out-going queue etc ... just like QoS and Routed interfaces. I won't go into detail to what type of queueing is allowed as that differs between switches. There's also in-coming priority queues that you can configure ... again read Cisco docs on the particular switches you are using and its capabilities.


This Discussion