QoS Classification and Marking

What is QoS Classification and Marking?

To use Quality of Service for a traffic, firstly traffic need to be identified. With this identification, traffic types are classified and then they are marked with an understandable way by the network. This process is basically called “QoS Classification and Marking“. Another important mechanisms are Qos Traffic Policing and QoS Traffic Shaping. We will talk about this in the next lesson.

 

The identification mechanism used by QoS can be divide into two important process. These process are :

  • Data Classification
  • Data Marking (Data Coloring)

 

Now, let’s go a little deeply on QoS Classification and Marking, and talk about these two important QoS Process more.

 

classification-and-marking

 


You can download Various Cheat Sheets on Special Pages!


 

QoS Classification in a Network

There are carious of traffic types in a network. These traffic types can be data, voice, video streaming etc. Without QoS, all these traffic types are behaved similarly. But behaving similarly to all the traffic types is not a proper way. Because, different traffic types need different threatments.

 

For example, voice traffic must be fast but security is in the second plane for voice traffic. Beside, pure data, ftp can be slower than a voice traffic.

 

Because of the fact that different types of traffics need different threatments, first of all we need to categorize the type of our traffic. Identifying and categorizing the type of the traffic is called “Classification”. After this process, we know that, we have a voice traffic, or video, or what else.

 

QoS Classification Process can be done by checking the different fileds of a packet. There are fields that shows the traffic types in a packet like IP Precedence, DSCP. Beside, incoming interfaces, source and destination addresses can also be used for Classification.

 

QoS Classification is done close to the source. This is because, early determination of the type and threat as required through the network.

 


QoS Marking in a Network

After classification, traffic type determination must be showed also in the packet. To do this, a field in a packet header is changed. This changes explains that, the packet is belong to a specific type of traffic. The name of this process is called “Marking”. It is also called “Data Marking“ or “Coloring”.

 

QoS Classification Process is a must before Marking Process. Because, you can not mark something about its characteristic without knowing what is it.

 

Data Marking can be done in different levels with different field changes. With this changes, the traffic is quickly recognized anywhere in the network.

 

In Layer 2, in Ethernet Header, Class of Service field is used for Data Marking (Data Coloring).

In Layer 2.5, in MPLS Header, Type of Service (Experimental) field is used for Data Marking (Data Coloring).

In Layer 3, in IP Header, Type of Service IP Precedence and DSCP fields are used for Data Marking (Data Coloring).

In Upper Layers, NBAR and Deep Packet Inspection are used for Data Marking (Data Coloring).

 


Common QoS Marking Types

Layer 2 Marking – CoS (Class of Service)

Layer 2 marking, CoS is mainly used inside LANs used in VLAN-tagged Ethernet frames (802.1Q). It uses 3-bit field (Values from 0 to 7).

ip-precedence-bits

 


Layer 3 Marking – DSCP (DiffServ)

Layer 3 marking, DSCP, is used in IP packets. It uses 6-bit field  to create possible values from 0 to 63. DSCP works across the entire network. Used by routers and Layer 3 switches

 

  • Default Class
    • CS0 (0) – Best effort

 

  • Expedited Forwarding (EF)
    • EF (46) → Voice traffic
    • Low delay, low jitter, strict priority

 

  • Assured Forwarding (AF)
    • Format: AFxy
      x = class (1–4)
      y = drop precedence (1–3)
    • Example:AF11 Low priority in class 1
      AF21 Medium priority
      AF41 High priority (video)

 

  • Class Selector (CS)
    • Backward compatibility with CoS/IP precedence:
    • DSCP Use
      CS6 Routing protocols
      CS7 Network control

 

dscp-bits
 

In Cisco CCNA and CCNP ENCOR Certification Courses, Traffic Classification and Marking is an important QoS Lesson.

 


CoS and DSCP Mapping

When traffic moves between Layer 2 and Layer 3, mapping is required. In other words we need to map CoS to DSCP.

CoS DSCP
0 CS0 (0)
1 CS1 (8)
2 AF21 (18)
3 AF31 (26)
4 AF41 (34)
5 EF (46)
6 CS6 (48)
7 CS7 (56)

 


Frequently Asked Questions

What is the difference between classification and marking?

Classification and marking are two improtant process for QoS (Quality of Service). While Classification is used to identify the traffic, Marking is used to assign priority. Another difference is about action. Classification match packets while Marking set QoS value. The other difference is about results. With Classification we group traffic into classes. With Marking, packets are labeled.

As a summary:

  • Classificaiton is Recognizing.
  • Marking is Labelling.

 


Which fields are used for classification?

In classicification process, traffic can be classified based on the below parameters:

  • Source/Destination IP address
  • Port numbers (e.g., TCP/UDP ports)
  • Protocol (HTTP, FTP, VoIP)
  • VLAN ID
  • Application type

 


What are common marking methods?

There are two common marking methods. The first one is CoS (Class of Service) which works on layer 2. The other one is DSCP (Differentiated Services Code Point) which works for layer 3.

 


Why we use DSCP Marking?

We use DSCP to prioritize traffic across the network with DiffServ QoS model. By doing this we provide consistent end-to-end QoS.

 


Why we use CoS Marking?

We use Class of Service (CoS) in switches to prioritize traffic. It is mainly used in Local Area Networks, on VLAN tagged Ethernet frames (802.1Q).

 


What is Re-marking?

Re-marking is changing the QoS value of a packet as it moves through the network. For example an access switch can marks the traffic and according to another policy, core router re-mark the traffic again.

 


What is the difference between Layer 2 and Layer 3 marking?

Layer 2 (CoS) marking scope is local area network while Layer 3 (DSCP) marking scope is End-to-end. Switches use Layer 2 marking while routers use Layer 3 marking. Layer 2 marking uses 3 bits and layer 3 marking use 6 bits.

 


What tools are used for classification in Cisco devices?

In Cisco devices, the below common tools are used for classification.

  • ACLs (Access Control Lists)
  • Class-maps
  • NBAR (Network-Based Application Recognition)

 


What is NBAR?

NBAR is a Cisco feature that classifies traffic based on application-level information, not just ports.

 

Lesson tags: QoS, classification, marking, Quality of service, DiffServ, DSCP, CoS
Back to: CCIE Enterprise Infrastructure > QoS

Leave a Reply

Your email address will not be published. Required fields are marked *

CCIE Enterprise Infrastructure

Collapse
Expand