Services
QoS
QoS classifies, marks, and prioritizes traffic to manage congestion and ensure critical applications like voice and video receive proper treatment.
What you need to know
- DSCP EF (Expedited Forwarding, value 46) is used for voice traffic requiring low latency and jitter.
- AF41 (value 34) is a common marking for interactive video traffic.
- CS values (Class Selector, e.g. CS3 = 24 for signaling) provide backward compatibility with legacy IP Precedence.
- The trust boundary is the point (typically the access-layer switch port or endpoint) where markings from a device are trusted or overwritten.
- MQC (Modular QoS CLI) uses class-map to classify, policy-map to define actions, and service-policy to apply the policy to an interface.
- Queuing methods manage congestion after classification: e.g. low-latency queuing (LLQ) gives strict priority to voice.
- Marking should occur as close to the source as possible, but only within a trusted boundary.
Configuration commands
| Command | Mode | Purpose |
|---|---|---|
| class-map match-all VOICE | config | Creates a class map to match voice traffic. |
| match dscp ef | config-cmap | Matches packets marked with DSCP EF. |
| policy-map WAN-POLICY | config | Creates a policy map to define QoS actions per class. |
| class VOICE | config-pmap | References the class map inside the policy map. |
| priority percent 20 | config-pmap-c | Assigns a strict priority queue with bandwidth guarantee for the class (LLQ). |
| class class-default | config-pmap | References the default class for unmatched traffic. |
| bandwidth percent 50 | config-pmap-c | Reserves a minimum bandwidth percentage for the class. |
| interface gigabitethernet0/1 | config | Enters the interface to apply the policy. |
| service-policy output WAN-POLICY | config-if | Applies the policy map in the outbound direction on the interface. |
| mls qos trust dscp | config-if | Configures a switch port to trust incoming DSCP markings (sets trust boundary). |
Verify it
- show policy-map interface gigabitethernet0/1
- show class-map
- show mls qos interface gigabitethernet0/1
- show running-config | section policy-map
- show queueing interface gigabitethernet0/1
Common mistakes
- Applying the service-policy in the wrong direction (input vs output) for the intended traffic flow.
- Extending the trust boundary too far into the network, allowing end users to mark their own traffic as high priority.
- Confusing DSCP decimal values with IP Precedence values when writing ACLs or match statements.
- Forgetting that class-default catches all unmatched traffic and can starve if not given adequate bandwidth.
- Using match-any when match-all was intended (or vice versa) in a class-map, changing which packets match.
Practise QoS in a real CLI
Generated labs, graded against the simulated network state.