1. Introduction
Quality of Service (QoS) ensures that critical traffic like VoIP, video streaming, and business applications get higher priority over less important traffic like bulk data transfers or web browsing.
Key Concepts
- Classification: Identifying and categorizing network traffic.
- Marking: Assigning a priority value (like DSCP or CoS) to traffic.
2. QoS Classification
What is Classification?
Classification identifies and groups network traffic based on parameters such as:
✅ Source/Destination IP or Port
✅ Application type (VoIP, Video, Web, FTP)
✅ Protocol (TCP, UDP, ICMP)
✅ Interface (LAN, WAN, VPN)
Traffic Classification Methods
| Method | Example |
|---|---|
| Access Control Lists (ACLs) | Match traffic based on IP, protocol, or port |
| Class Maps | Define traffic classes in QoS policies |
| Network-Based Application Recognition (NBAR) | Identifies applications dynamically (Skype, Zoom, etc.) |
| 802.1p (CoS) | Layer 2 VLAN tagging |
| Differentiated Services Code Point (DSCP) | Layer 3 IP header marking |
📌 Example of Traffic Classification Using ACLs:
ip access-list extended VOICE-TRAFFIC
permit udp any any range 16384 32767
📌 Using Class Maps to Classify Traffic:
class-map MATCH-VOICE
match access-group name VOICE-TRAFFIC
3. QoS Marking
What is Marking?
Marking assigns priority values to packets so that network devices (routers, switches) can prioritize traffic accordingly.
Common Marking Methods
| Marking Type | Layer | Bits | Value Range |
|---|---|---|---|
| 802.1p (CoS) | Layer 2 (VLAN) | 3 bits | 0-7 |
| DSCP (Differentiated Services Code Point) | Layer 3 (IP) | 6 bits | 0-63 |
| IP Precedence | Layer 3 (IP) | 3 bits | 0-7 |
📌 Marking Traffic with DSCP (Layer 3):
class-map MATCH-VOICE
match ip dscp 46 # Expedited Forwarding (EF) for VoIP
📌 Marking Traffic with CoS (Layer 2 VLAN):
class-map MATCH-VIDEO
match cos 5 # High priority video
4. DSCP Marking Values
DSCP values define traffic priority levels:
| DSCP Class | DSCP Value | Traffic Type |
|---|---|---|
| EF (Expedited Forwarding) | 46 | VoIP (Low Latency) |
| AF41, AF42, AF43 | 34, 36, 38 | Video Streaming |
| AF31, AF32, AF33 | 26, 28, 30 | Mission-Critical Apps |
| AF21, AF22, AF23 | 18, 20, 22 | Bulk Data |
| CS0 (Default) | 0 | Best Effort |
📌 Example Configuration – Mark VoIP Traffic as EF (DSCP 46):
policy-map MARK-VOICE
class MATCH-VOICE
set dscp ef
📌 Trust DSCP on a Switch Port:
interface GigabitEthernet1/0/1
mls qos trust dscp
5. Applying Classification and Marking on an Interface
1️⃣ Create an ACL to Match VoIP Traffic
ip access-list extended VOICE-TRAFFIC
permit udp any any range 16384 32767
2️⃣ Create a Class Map
class-map MATCH-VOICE
match access-group name VOICE-TRAFFIC
3️⃣ Create a Policy Map to Mark Traffic
policy-map MARK-VOICE
class MATCH-VOICE
set dscp ef
4️⃣ Apply QoS Policy to an Interface
interface GigabitEthernet1/0/1
service-policy input MARK-VOICE
6. Summary
| Step | Command |
|---|---|
| Classify Traffic | class-map MATCH-VOICE |
| Mark DSCP Values | set dscp ef |
| Mark CoS Values | set cos 5 |
| Apply to Interface | service-policy input MARK-VOICE |
Conclusion:
- Classification helps identify network traffic.
- Marking assigns priority values (DSCP, CoS).
- Proper QoS policies ensure that voice, video, and critical data traffic get prioritized over non-essential traffic.
Leave a comment