Reference

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

CommandModePurpose
class-map match-all VOICEconfigCreates a class map to match voice traffic.
match dscp efconfig-cmapMatches packets marked with DSCP EF.
policy-map WAN-POLICYconfigCreates a policy map to define QoS actions per class.
class VOICEconfig-pmapReferences the class map inside the policy map.
priority percent 20config-pmap-cAssigns a strict priority queue with bandwidth guarantee for the class (LLQ).
class class-defaultconfig-pmapReferences the default class for unmatched traffic.
bandwidth percent 50config-pmap-cReserves a minimum bandwidth percentage for the class.
interface gigabitethernet0/1configEnters the interface to apply the policy.
service-policy output WAN-POLICYconfig-ifApplies the policy map in the outbound direction on the interface.
mls qos trust dscpconfig-ifConfigures 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.

Start a free lab