The terms CoS & QoS are often used interchangably, particularly in the SP space when providing "Class of Service profiles" etc as part of Product sets. I'm looking to re-affirm my understanding that CoS is just one way in which traffic can be marked at layer 2, whilst QoS determines what you actually do to that traffic at layer 3?

Can anyone provide more real world implementation examples of distinguishing between the two terms or alternatively advise me of any overlap?


QoS is an umbrella term which covers the use of features such as policing, shaping, traffic classification, and advanced queuing mechanisms.

CoS is a form of QoS limited to layer-2 Ethernet and it uses 3-bits (8 values) of the 802.1Q tag to differentiate your traffic. Therefore no trunking, no CoS.

DSCP is the most commonly acted upon value at layer-3 and it is found in 6-bits (64 values) of the IP header. Typically only 14 of the values are used and are referred to using the notations of best effort, expedited forwarding (EF), and assured forwarding (AF). AF values are in the form AFxy, where x is 1-4 and refers to the precedence and y is 1-3 and refers to the drop probability.

Telco vendors (such as AT&T specifically) use the term CoS to define the bandwidth allocation classes that they support in their MPLS offerings. Basically they turned CoS into a marketing term. Typically a Telco uses DSCP to know which of their CoS classes your traffic is supposed to be a part of.

Another important point for configuring these features is that in a Cisco switch or router you need to use a command such as 'mls qos trust dscp' or 'mls qos trust cos' or else the device will reset the QoS marking to zero. There are some exceptions based on model, configuration, and IOS version but this has been true for everything within the last few years in my experience. This configuration is required because the device needs to know which marking you want it to act upon since it cannot use both. I like using DSCP. I haven't found a solid reason to use CoS over it but I'm sure someone has one.

  • All answers to this question have been very helpful but this one really helped to click-in regarding the marketing spiel Telcos can put out :-) thanks.
    – MattE
    May 11 '13 at 9:11
  • A reason to use CoS tagging (local to New Zealand, at least) is that for some data services the carriers use the CoS tags added on the CPE heading outbound to determine if traffic is meant to be treated as if it's in the CIR or EIR components of a circuit. The caveat with the setup we have in NZ is that if your CoS tagged CIR traffic exceeds the CIR, it immediately drops traffic instead of just having the excess portion of it rollover into the EIR/PIR pool.
    – bdx
    Mar 24 '15 at 0:31

Class of Service is a layer 2 identifier, usually in conjunction with an 802.1q tag (You shouldn't see CoS referenced on an access port, only a trunk port). DiffServ would be the corresponding identifier on a layer 3 link. Quality of Service is a superset of both controlling how both layer 2 and layer 3 links classify, police, and queue traffic on different types of links.

  • 5
    To expand on this, CoS is specific to Ethernet. Frame Relay, for example, doesn't provide a CoS field in its header; it has only a one-bit "discard eligible" field. May 7 '13 at 22:38
  • Thank you for this. I'm in a 98% ethernet job, so this differentiation sometimes escapes me.
    – nicotine
    May 7 '13 at 22:54
  • Nice concise answer.
    – lobi
    Jul 8 '16 at 16:55

CoS operates on Layer 2, whereas QoS operates on Layer 3.

CoS is a means of adding a priority to the VLAN header that can later me interpreted by QoS mechanisms to handle the traffic accordingly.

A real world example might be a VoIP VLAN on a network, which would usually be marked with a CoS flag as CS7. Routers QoS engines can then interpret that and prioritise that traffic higher in policing or profiling situations.

CoS can be used independently of QoS implementations to pass appropriately tagged traffic to other networks you have no control over.

Here is a good white paper giving a detailed introduction to the topic.


In the Juniper world they are more interchangeable. As all QoS config is done under the class of service stanza of the config. An example of the config is:

class-of-service {
    forwarding-classes {
        queue 0 assured-forwarding;
        queue 1 best-effort;
        queue 2 expedited-forwarding;
    interfaces {
        ge-0/0/3 {
            unit 0 {
                scheduler-map 1st;
                shaping-rate 100m;
    scheduler-maps {
        1st {
            forwarding-class assured-forwarding scheduler test1;
            forwarding-class best-effort scheduler test2;
            forwarding-class expedited-forwarding scheduler test3;
    schedulers {
        test1 {
            transmit-rate 45m;
            buffer-size percent 45;
            priority low;
        test2 {
            transmit-rate 45m;
            buffer-size percent 45;
            priority low;
        test3 {
            transmit-rate 10m;
            buffer-size percent 10;
            priority low;
  • 1
    Agree with Steve, it depends on your vendor, Juniper does use the term more interchangeably an almost exclusively uses CoS. May 8 '13 at 20:46

QoS (Quality of Service) is a set of measures intended to provide guarantees not previously provided on packet switched networks. These are used for traffic shaping and to try to get quality guarantees hopefully in some cases approximating circuit-switched protocols over packet switched networks. It is significantly more complex than this in implementation but that's the basic purpose.

CoS stands for Class of Service and is intended to designate certain ethernet traffic for QoS purposes. For example in a switched network, this might be used to differentiate TDMoE which is very latency sensitive from ordinary packet switched traffic (TDMoE would likely be carrying telephone voice data between phone switches/gateways). This could then be used to ensure QoS guarantees could be met. This gives you an idea of how the concepts interrelate.

The way I look at it is that QoS is really aimed at trying to offer the sorts of very robust guarantees that are typical of connection-switched networks (like the PSTN). Over ethernet this allows you to take a trunk in a switched network, and then utilize the portion of the bandwidth unused by TDMoE for example, and use that for packet-switched communications.

So the way I would describe it is that QoS is the set of techniques and approaches to solving a specific set of problems, while class of service is a designation to data transmissions (particularly on the ethernet protocol level) in order to manage it according to QoS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.