07-04-2022 11:39 PM
Hi all,
I'm trying to wrap my head around the connection/relationship between CoS (Class of Service) and QoS (Quality of Service). I read the explanation on this link, but did not fully understand yet. Can anyone help me clarify? I recently realized both existed and wanted to find out what the difference is (if any) and how they work. I want to take a CCNA, so that's the level of understanding i'm going for.
My knowledge of the two terms is only that CoS is used in the 'PCP' (Priority Code Point) field of the 802.1Q tag and QoS is used in the IPv4 header 'DSCP' field and the IPv6 header 'Traffic Class' field.
In the link, it says that "Class of Service (CoS) is a technique to group similar type of data together, and assign labels with “priority levels” to each group." which sound exactly how i imagined it would be; There is a field in a header, where the bits in the field marks how important the encapsulated data is. This is enforced by switches and it happens at Layer 2.
Then this about QoS: "QoS is a mechanism to manipulate network traffic according to the prioritization levels of frames. Priority levels are defined by CoS, and QoS use these values to handle traffic in the communication path according to organization’s policy. By this way, existing network resources can be used in an effective manner, to optimize data transmission."
What is meant by manipulate?
"Priority levels are defined by CoS, and QoS use these values to handle traffic in the communication path according to organization’s policy" I understand this as CoS is only marking the traffic and QoS is a term for the function within the network devices that actually enforces CoS, but that does not make sense.
Any help and clarification would be very much appreciated, thank you in advance.
07-05-2022 12:40 AM
Hello,
I think you got almost everything right already. Basically, QoS is the overall, general term for anything related to changing the traffic flow pattern for certain, specified traffic types. Whenever you 'manipulate' traffic (prioritize, rate-limit, shape), you perform QoS.
CoS is part of QoS. Similar to TCP and UDP being part of the IP protocol (where IP is the top, and TCP and UDP are part of the IP protocol)...
Not sure if that helps a lot, I am pretty sure you will get more comprehensive answers. I don't know what kind of questions they are asking in the CCNA exam, but as long as you are aware of the fact that QoS is just the overall term, and CoS is (the layer 2) part of it, you have the basic understanding.
07-05-2022 01:17 AM
As Georg says QOS is the overall term for classifying, marking and the manipulating the traffic eg. policing, shaping etc.
CoS is really just the L2 marking part of QOS in the same way DSCP is the L3 marking part of QOS.
Jon
07-05-2022 07:45 AM - edited 07-05-2022 12:25 PM
As you've correctly noted, CoS comes from 'PCP' (Priority Code Point) field within the 802.1Q tag (developed in 802.1p). (To me, L2's PCP is very much is like IP's early ToS's priority bits.)
QoS, as the other posters have noted, is a higher level concept, which strives to accomplished what it's named, i.e. guarantee a "Quality of Service", unlike, and beyond/above, IP's traditional "best effort" level of service.
As to being confused by the article you referenced, that's understandable, as the article is trying to cover a lot of ground in a short article, and possibly how some of the information is presented is inaccurate, at least IMO.
One example of the latter is "In computer networks, there are several ways to improve the quality of data transmission. The obvious way is to expand the bandwidth and improve the speed." Yea, a very commonly employed approach that often fails.
"What is meant by manipulate?"
It means, QoS, to accomplish its goals, often needs to actively "do something" to frames/packets flowing across the network.
"I understand this as CoS is only marking the traffic and QoS is a term for the function within the network devices that actually enforces CoS, but that does not make sense."
What specifically doesn't make sense?
BTW, QoS doesn't need to enforce CoS marking or even consider CoS/ToS markings to accomplish it goals. Markings are just an efficient way for network devices to determine how a frame/packet should be treated.
08-07-2023 01:50 AM
Hello Joseph,
Sorry for not answering. Since i created the post, i've been continuing my studying and understanding of the different terms. Despite my efforts, i still cannot wrap my head around this. Let me try from a clean slate:
We have the Priority Code Point (PCP) field which is part of the 802.1Q tag, which again is part of the Ethernet Frame.
We also have Class of Service (CoS), which my notes say is "the layer 2 marking part of QoS"
At last, we also have the Differentiated Services Code Point (DSCP) field, which my notes say is "the layer 3 marking part of QoS"
1. I see 2 terms for QoS in an Ethernet Frame, which is PCP and CoS. I don't see a CoS field in the Ethernet Frame, so can you explain to me what CoS is? Is it just a term (and not a field at all) for QoS at layer 2? Is there a difference between PCP and CoS?
2. As far as i understand we have 2 fields doing the same thing, PCP and DSCP. But to me, that sounds very counter-effective. If one field says this data is priority 1 and another field says it is priority 5, how is the data treated? Does the fields work together in some way?
3. Does all 3 fields do exactly the same? If not, can you tell me the difference, preferably with examples?
4. Is there any more terms for QoS, relevant to someone studying for the CCNA?
I thank you for all your time
08-07-2023 06:17 AM
First, understand, COS and QoS are logical concepts. They are very similar, conceptually, QoS is more granular.
Second, DSCP is a QoS treatment model, using IP's ToS with specific markings.
Third, Ethernet's PCP is a field that can support COS/QoS, that comes, I believe, with its own usage meanings. Likewise, IP's ToS too came with its own usage meaning, which have been revised multiple times (e.g. DSCP and its revisions - see RFCs).
Your questions:
#1 PCP is the physical field, COS is a logical concept.
#2 Two fields doing same thing? Almost, but at different layers of the OSI model! If both are being used, normally they would try to accomplish similar purpose, at their layer, but it's possible they might be working at cross purposes, this latter, likely in error, but maybe intentional crossing an administrative boundary.
#3 Only two fields. Do PCP and ToS accomplish exactly the same? Maybe, maybe not. Remember PCP only has a 3 bit marking, ToS has a 6 bit marking. Difference example, for bandwidth allocation, perhaps COS 1 and CS1 or AF1x get the same, but CS1, AF11, AF12 and AF13, get different drop treatments.
#4 Possibly, but the CCNA knowledge testing outline would be the best guide.
08-07-2023 07:39 AM - edited 08-07-2023 08:07 AM
Hello @trane.m ,
1)
your understanding is correct a normal untagged ethernet frame misses a CoS field, only 802.1Q tagged frames have the CoS 3 bits in the 802.1Q header also named 802.1p.
CoS are the values in the 802.1p field wihin an 802.1Q header.
This has some implications for example in VOIP if we want to be able to provide VOIP frames a better treatment we use a Voice Vlan or at least we use an 802.1p field with vlan 0 with the first option preferred.
2) 3)
CoS and DSCP are marking fields at different OSI layers Layer 2 and Layer 3 respectively.
CoS marking is single hop it applies to a LAN segment but once the IP packet is routed to a different L3 network CoS marking is removed or change.
DSCP is a 6 bits field in the IPv4 or Ipv6 header and it can travel end to end during all the journey of the packet and it can be used to provide a differentiated service to the packet at each router / multilayer switch hop.
>> 3. Does all 3 fields do exactly the same? If not, can you tell me the difference, preferably with examples?
PCP and CoS are the same thing, DSCP is a layer 3 concept as explained above
4)
Differentiated Services Framework is the basic idea behind the usage of DSCP.
There are L2 specific marking fields like Frame Relay FR-DE or ATM CLP they are a single bit value and they are used to signal frames or ATM cells that should be dropped first in case of congestion. But this is just to give you an example.
Hope to help
Giuseppe
08-07-2023 09:24 AM - edited 08-07-2023 12:02 PM
Ah, @Giuseppe Larosa, nice mention of FR and ATM! Perhaps a closer match to PCP would be MPLS EXP? Regardless, again, nice idea to mention other L2 technologies.
Again, I consider, CoS (or COS) more generic than just in reference to Ethernet L2's PCP. Admittedly, CoS is often use as a synonym to Ethernet's PCP, but, for example, Wiki has articles on CoS (referenced in Wiki's 802.1p article) and QoS on their own, the articles also help to distinguish how the latter is a bit more comprehensive. (BTW, Wiki technical articles are usually pretty accurate, and/or good overview and/or provide good additional references.) Techopedia has a broader slant on CoS too.
I mention this, distinction, because when Giuseppe writes "CoS are the values in the 802.1p field wihin an 802.1Q header.", that's fine, but you might notice he did not write something like ". . . are just the values . . ." CoS is a term where context is important. (Often the case with so many, many terms we use.)
"This has some implications for example in VOIP if we want to be able to provide VOIP frames a better treatment we use a Voice Vlan or at least we use an 802.1p field with vlan 0 with the first option preferred."
Hmm, yes and no. CoS/QoS markings/tags are just that, i.e. they, alone, guarantee no treatment differences. Ditto with a Voice VLAN. However, both, certainly make it easier to do so. Also, a pure L2 device is very limited in its analysis of a frame's content, i.e. probably any pure L2 device could not identify a VoIP frame vs. any other. "Smart/enhanced" L2 switches, might be able to identify a VoIP frame, but again, tagging makes this so much easier.
"DSCP is a 6 bits field in the IPv4 or Ipv6 header and it can travel end to end during all the journey of the packet and it can be used to provide a differentiated service to the packet at each router / multilayer switch hop."
Here again, Giuseppe uses an important word, "can". L3 ToS can be ignored, changed/reset, per hop. Oh, and when ToS (or L2 CoS) isn't ignored, its treatment may differ per each transit device too.
08-08-2023 12:03 AM
Hello Joseph and Giuseppe,
Thank you for your responses and elaboration.
I envy your knowledge and ability to distinguish the terms.
PCP, CoS, ToS, DS, DSCP, QoS and now you mention even more that i have no idea what is.
I've taken some notes from both of you and will have to think about it and revisit the topic a couple of times, before i know whether i understand it or not. I will be back, hopefully before another year has passed
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