Welcome to our next lesson on Quality of Service. In our last session, we outlined the four fundamental mechanisms that make QoS possible: classification, marking, queuing, and policing/shaping. We established that marking is the crucial step of applying a "tag" to traffic so that network devices can quickly understand its priority without re-inspecting it.
Today, we will delve into the specifics of that marking process. This lesson focuses on the two most important marking standards in modern networks: Class of Service (CoS) at Layer 2 and Differentiated Services Code Point (DSCP) at Layer 3. You will learn where these values reside within a packet, how they are structured, and why DSCP is the preferred method for maintaining consistent QoS across a routed enterprise network. Understanding these details is essential before we move on to configuring QoS policies.
The Need for Layered Marking
Before we compare CoS and DSCP, it's important to understand why we need more than one type of marking. A packet's journey from source to destination involves different network layers. A Layer 2 switch operates on Ethernet frames, while a Layer 3 router operates on IP packets. A switch might not be able to read the IP header, and a router will discard and rebuild the Ethernet frame as a packet moves between subnets. This means a marking placed in the Ethernet header will be lost at the first router hop.
This reality necessitates a layered approach to marking.
This article from NetworkAcademy.IO provides a clear explanation and excellent diagrams illustrating the different scopes of Layer 2 and Layer 3 markings.
Please read the two sections titled Marking the Ethernet Header and Marking the IP header. As you read, pay close attention to the diagrams that show where the CoS marking is lost and how the DSCP marking persists end-to-end.
As you saw, CoS is effective within a Layer 2 segment but disappears at a router boundary. DSCP, living in the IP header, travels with the packet from source to destination. Let's now dissect each of these in more detail.
Layer 2 Marking: Class of Service (CoS)
Class of Service is our tool for prioritizing traffic within a switched LAN environment.
- Location: CoS uses a 3-bit field called the Priority Code Point (PCP). This field is located inside the 802.1Q tag, which is added to an Ethernet frame when it travels over a VLAN trunk.
- Structure: Being 3 bits long, CoS provides possible priority levels, numbered 0 through 7. By convention, higher values represent higher priority. For example, voice traffic is typically marked with CoS 5, while default, best-effort traffic is CoS 0.
- Scope: Its biggest limitation is that it only exists on 802.1Q trunk links. When a frame reaches a router, the router strips the Layer 2 header (including the 802.1Q tag) and builds a new one for the next hop. The CoS value is lost in this process.
The image below shows exactly where the CoS bits, also referred to as 802.1p User Priority, are located within the 802.1Q tag structure.

To solidify your understanding of CoS, let's watch a brief segment that explains its function and limitations.
CCNA R&S version 3 Topics: QoS Traffic Markings
This video from Kevin Wallace Training, LLC, offers a concise explanation of Layer 2 marking.
Watch the segment from the beginning until the router boundary. He provides a clear breakdown of CoS, its 3-bit structure, and the critical fact that it gets rewritten to zero when crossing a router.
Layer 3 Marking: Differentiated Services Code Point (DSCP)
To overcome the limitations of CoS, we use DSCP for end-to-end QoS. Since it resides in the IP header, it remains intact as the packet is forwarded by routers across the internetwork.
- Location: DSCP is a 6-bit field within the 8-bit Type of Service (ToS) byte in the IPv4 header, or the Traffic Class byte in the IPv6 header.
- Structure: With 6 bits, DSCP offers possible values (0-63), providing much more granular classification than CoS.
- Scope: As part of the IP header, DSCP markings persist end-to-end, from the source network all the way to the destination network.
These 64 values are not just arbitrary numbers; the IETF has defined standards for them called Per-Hop Behaviors (PHBs). A PHB is a named DSCP value that tells a router how to treat a packet. These fall into several important categories.
CCNA R&S version 3 Topics: QoS Traffic Markings
Let's return to the Kevin Wallace video for a detailed exploration of DSCP. This is the core of the lesson, as it breaks down the complex world of DSCP values into understandable parts. Given your background, the discussion of binary conversions should be straightforward.
First, watch the introduction to Layer 3 markings, which discusses the move from the old IP Precedence standard to the more versatile DSCP: from CoS to DSCP. Next, watch the detailed breakdown of the main DSCP categories: DSCP PHBs. Pay close attention to the descriptions of Default (DF), Expedited Forwarding (EF), Class Selector (CS), and Assured Forwarding (AF). Finally, to truly understand how these values work, watch the practical examples of converting between AF names and their decimal values: AF conversion examples. This will solidify your understanding of the relationship between the class, drop probability, and the final DSCP value.
Let's summarize those key DSCP categories:
- Default Forwarding (DF): DSCP 0. This is standard best-effort traffic.
- Expedited Forwarding (EF): DSCP 46. This PHB offers the lowest latency, jitter, and loss. It is almost exclusively reserved for voice traffic.
- Class Selector (CS): A set of 8 values (CS0-CS7) that provide backward compatibility with the older IP Precedence standard. The name corresponds to the old IPP value (e.g., CS3 is equivalent to IPP 3). Note that CS0 is the same as DF.
- Assured Forwarding (AF): The most flexible and commonly used category. It is defined by the format
AFxy, wherexis one of four classes (1-4) andyis one of three drop precedences (1-3). A higher class number means higher priority. A higher drop precedence means the packet is more likely to be dropped during congestion. For example,AF41(high priority, low drop chance) would be treated better thanAF13(low priority, high drop chance).
Making CoS and DSCP Work Together
In a typical enterprise network, traffic flows through both switches and routers. To provide a consistent QoS experience, we need a way for the Layer 2 (CoS) and Layer 3 (DSCP) markings to interoperate. This is achieved through mapping.
A QoS-aware switch can be configured to map values between the two systems.
- When a packet with a DSCP value arrives at a switch, the switch can read the DSCP value and map it to a corresponding CoS value. It then uses this CoS value to prioritize the frame across its internal trunk links.
- When that frame is ready to be sent to a router, the switch can map the CoS value back to the original (or a new) DSCP value, ensuring the Layer 3 marking is preserved for the next leg of the journey.
This mapping most often occurs at the trust boundary.

The following reading provides a concise summary and directly addresses how and why these two marking systems are used together.
DSCP vs CoS & Trust Boundary - CCNP Enterprise
This article from NetworkJourney has an excellent FAQ section that cleanly summarizes the key points of this lesson.
Please read the first four questions in the FAQ section: The main difference Why we need both The trust boundary Mapping values Focus on how these concepts create a cohesive, end-to-end QoS strategy. The table of common DSCP values at the end is also a useful reference.
Conclusion
In this lesson, we have dissected the two primary traffic marking mechanisms used in QoS. You now have a detailed understanding of their structure, scope, and respective roles in a network.
Key Takeaways:
- Class of Service (CoS) is a Layer 2 marking that uses 3 bits in the 802.1Q VLAN tag, providing 8 levels of priority. Its scope is limited to local trunk links and is lost when traffic crosses a router.
- Differentiated Services Code Point (DSCP) is a Layer 3 marking that uses 6 bits in the IP header, providing 64 levels of priority. Its scope is end-to-end, making it the standard for enterprise-wide QoS.
- DSCP values are defined by Per-Hop Behaviors (PHBs), with key categories being EF (for voice), AF (for tiered data/video), and CS (for IP Precedence compatibility).
- Switches can map between CoS and DSCP values to ensure that priority is handled consistently across both Layer 2 and Layer 3 network segments, typically enforced at the QoS trust boundary.
With this theoretical framework in place, you are now ready to apply it. In the next lesson, we will move to the command line and learn how to configure a Cisco router to classify specific traffic types and mark them with the appropriate DSCP values.