set dscp [value]
Sets the Differentiated Services Code Point (DSCP) value in the IP header for packets matching a class map in a policy map, used to mark traffic for QoS classification.
set dscp [value]When to Use This Command
- Mark VoIP traffic with DSCP EF (46) to ensure low-latency queuing.
- Set DSCP AF41 (34) for business-critical data to guarantee bandwidth.
- Re-mark DSCP from default (0) to CS3 (24) for internal management traffic.
- Apply DSCP marking to traffic from a specific subnet to differentiate service levels.
Command Examples
Mark VoIP traffic with DSCP EF
set dscp efRouter(config-pmap-c)# set dscp ef Router(config-pmap-c)#
The command sets DSCP to EF (46) for all packets matching the class. No output is shown; the prompt confirms the command is accepted.
Set DSCP AF41 for business-critical data
set dscp af41Router(config-pmap-c)# set dscp af41 Router(config-pmap-c)#
Sets DSCP to AF41 (34) for assured forwarding class 4, low drop probability. No output is displayed.
Understanding the Output
The 'set dscp' command does not produce any output on the CLI; it simply configures the marking action within a policy-map class. To verify the configuration, use 'show policy-map [policy-name]' or 'show running-config | section policy-map'. In the policy-map output, you will see the class and its associated set dscp action. For example: 'class VOICE set dscp ef'. The DSCP value can be specified by name (e.g., ef, af41, cs3) or by number (0-63). A correct configuration shows the DSCP value under the class; a missing or incorrect set command means no marking occurs. In production, verify with 'show policy-map interface' to see actual packet counts and marking statistics.
CCNA Exam Tips
CCNA 200-301 expects you to know DSCP values: EF=46, AF41=34, CS3=24, default=0.
Remember that 'set dscp' is configured in policy-map class config mode, not globally.
The exam may ask which DSCP value to use for VoIP: always EF (46).
Be able to distinguish between 'set dscp' and 'set precedence'—DSCP is more granular.
Common Mistakes
Using 'set dscp' in global config mode instead of policy-map class config mode.
Typing an invalid DSCP name (e.g., 'ef1' instead of 'ef') or number outside 0-63.
Forgetting to apply the policy-map to an interface with 'service-policy' command.
Related Commands
policy-map [name]
Creates or modifies a QoS policy-map that defines a set of class-maps and associated actions (e.g., bandwidth, priority, drop) to apply to traffic on Cisco IOS routers.
service-policy [input|output] [policy]
Applies a QoS policy map to an interface for inbound or outbound traffic classification, marking, policing, shaping, or queuing.
show policy-map
Displays the configuration and statistics of all policy maps applied to interfaces, used to verify QoS policies and monitor traffic class counters.
show policy-map interface
Displays the current QoS policy applied to an interface, including per-class statistics such as packets matched, bytes, and actions taken, used to verify and troubleshoot QoS configurations.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions