QoSInterface Config

mls qos cos [value]

Sets the default CoS (Class of Service) value for incoming packets on an interface when the packet does not already carry a CoS marking, used to prioritize traffic at Layer 2.

Syntax·Interface Config
mls qos cos [value]

When to Use This Command

  • Assigning a default CoS value to untagged traffic on an access port connected to a legacy device that does not mark packets.
  • Setting a higher default CoS for voice VLAN traffic to ensure voice quality on a switch port.
  • Configuring a default CoS for traffic from a specific department to match a QoS policy.
  • Overriding the default CoS of 0 on a trunk port to prioritize certain VLAN traffic.

Command Examples

Set default CoS to 5 on an interface

mls qos cos 5
Switch(config-if)# mls qos cos 5
Switch(config-if)#

The command sets the default CoS value to 5 for all incoming packets that do not already have a CoS marking. No output is shown if successful; the prompt returns without error.

Verify default CoS configuration

show mls qos interface gigabitethernet0/1
GigabitEthernet0/1
  trust state: not trusted
  trust mode: untrusted
  trust enabled: no
  COS override: no
  default COS: 5
  pass-through: none
  untagged frames: not trusted
  DSCP mutation map: default
  trust device: none
  qos mode: port-based

The output shows the QoS settings for the interface. 'default COS: 5' confirms the configured value. 'trust state: not trusted' indicates the interface does not trust incoming CoS markings, so the default CoS is applied.

Understanding the Output

The 'show mls qos interface' command displays the QoS configuration for a specific interface. Key fields include: 'trust state' indicates whether the interface trusts incoming CoS/DSCP markings; 'trust mode' shows the trust mode (untrusted, trusted, etc.); 'default COS' shows the CoS value assigned to untagged or unmarked frames; 'COS override' indicates if the interface overrides incoming CoS with the default; 'qos mode' shows whether QoS is port-based or VLAN-based. A default COS of 0 is typical for best-effort traffic, while values 5-7 are used for high-priority traffic like voice. If the default COS is set incorrectly, low-priority traffic might be treated as high priority, causing congestion for critical applications.

CCNA Exam Tips

1.

CCNA exam tip: 'mls qos cos' only applies when 'mls qos' is globally enabled; otherwise, the command is accepted but has no effect.

2.

CCNA exam tip: The default CoS is applied only to untagged frames; tagged frames retain their original CoS unless 'mls qos trust cos' is configured.

3.

CCNA exam tip: CoS values range from 0 to 7; common values: 5 for voice, 4 for video, 0 for best effort.

4.

CCNA exam tip: On a trunk port, 'mls qos cos' sets the default CoS for the native VLAN only if the native VLAN frames are untagged.

Common Mistakes

Mistake: Forgetting to enable 'mls qos' globally before configuring interface QoS commands; the command is accepted but QoS does not function.

Mistake: Setting a default CoS on a trunk port expecting it to apply to all VLANs; it only applies to untagged frames (native VLAN).

Mistake: Confusing 'mls qos cos' with 'mls qos trust cos'; the former sets a default, the latter trusts incoming markings.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions