Differentiated Services Codepoint (DSCP) mapping
A codepoint must have an 802.1p priority assignment
(0 - 7) before you can configure a policy for prioritizing packets.
If a codepoint you want to use shows No-override
in
the Priority
column of the DSCP map (show
qos dscp-map
), then you must assign a 0 - 7 priority before
proceeding (qos dscp-map priority
command).
The DSCP Policy Table associates an 802.1p priority with a specific ToS byte codepoint in an IPv4 packet. This enables you to set a LAN policy that operates independently of 802.1Q VLAN-tagging.
In
the default state, most of the 64 codepoints do not assign an 802.1p
priority, as indicated by No-override
in Partial display from the default DSCP Policy Table.
You can use the following command to list the current DSCP Policy table.
Syntax:
show qos dscp-map
Displays the DSCP Policy Table.
Partial display from the default DSCP Policy Table
DSCP codepoint | DSCP value | 802.1p tag | DSCP policy name |
---|---|---|---|
000000 | 0 | cs0 | |
000001 | 1 | No-override | |
000010 | 2 | No-override | |
000011 | 3 | No-override | |
000100 | 4 | No-override | |
000101 | 5 | No-override | |
000110 | 6 | No-override | |
000111 | 7 | No-override | |
001000 | 8 | 1 | cs1 |
001001 | 9 | No-override | |
001010 | 10 | No-override | af11 |
001011 | 11 | No-override |
Configuring DSCP policies for codepoints
Use the following commands to configure or reconfigure DSCP policies for codepoints.
Syntax:
qos dscp-map
<codepoint>
priority
<0-7> [name <ascii-string>
]
(Optional) This command is required only if an 802.1p priority is not already assigned to the specified
in the DSCP Policy table (see Partial display from the default DSCP Policy Table).
<codepoint>
Valid values for a DSCP codepoint are as follows:
A binary value for the 6-bit codepoint from
000000
to111111
.A decimal value from
0
(low priority) to63
(high priority) that corresponds to a binary DSCP bit setAn ASCII standard (hexadecimal) name for a binary DSCP bit set.
The following are assigned by default:
af11
(001010)af43
(100110)af12
(001100)ef
(101110)af13
(001110)cs0
(000000)af21
(010010)cs1
(001000)af22
(010100)cs2
(010000)af23
(010110)cs3
(011000)af31
(011010)cs4
(100000)af32
(011100)cs5
(101000)af33
(011110)cs6
(110000)af41
(100010)cs7
(111000)af42
(100100)Enter ? to display the list of valid codepoint entries.
When the switch applies the specified DSCP policy to a packet, the priority determines the packet's queue in the outbound port to which it is sent. If the packet leaves the switch on a tagged port, it carries the 802.1p priority with it to the next downstream device. For IP packets, the DSCP will be replaced by the codepoint specified in this command.
Default:
No-override
for most codepoints.
no qos dscp-map
<codepoint>
Reconfigures the 802.1p priority for
to
<codepoint>
No-override
. Also deletes the codepoint policy name, if configured.
no qos dscp-map
<codepoint>
name
Deletes only the policy name, if configured, for
.
<codepoint>
Steps for configuring codepoints:
Determine whether the DSCPs already have priority assignments, which could indicate use by existing applications. (Also, a DSCP must have a priority configured before you can assign any QoS classifiers to use it.)
Configure the DSCP policies for the codepoints you want to use.
Default priority settings for selected codepoints
A few codepoints have default priorities assigned. Some are implied by the DSCP standards for Assured-Forwarding (af) and Expedited-Forwarding (ef). In addition, Class Selector (cs) defaults are used to automap codepoints that overlap IP-Precedence mode.
You can change the priorities for the default
policies by using qos dscp-map
. (These policies are not in effect unless you
have either applied the policies to a QoS classifier or configured
QoS Type-of-Service to be in <codepoint>
priority
<0-7>diff-services
mode.)
Quickly listing non-default codepoint settings
Partial display from the default DSCP Policy Table lists the switch’s default codepoint/priority
settings. If you change the priority of any codepoint setting to a
non-default value and then execute write memory
,
the switch will list the non-default setting in the show
config
display. For example, in the default configuration,
the following codepoint settings are true:
Codepoint | Default priority |
---|---|
af11 | No-override |
13 | No-override |
af13 | No-override |
If you change all three settings to a priority
of 3, and then execute write memory
, the switch
will reflect these changes in the show config
listing:
Effect of No-override
: In
the QoS Type-of-Service differentiated services mode, a No-override
assignment
for the codepoint of an outbound packet means that QoS is effectively
disabled for such packets. That is, QoS does not affect the packet
queuing priority or VLAN tagging.
In this case, the packets are handled as follows (as long as no other QoS feature creates priority assignments for them):
802.1Q status | Outbound 802.1p priority |
---|---|
Received and Forwarded on a tagged port member of a VLAN. | Unchanged |
Received on an Untagged port member of a VLAN; Forwarded on a tagged port member of a VLAN. | 0 (zero)—”normal” |
Forwarded on an Untagged port member of a VLAN. | None |
Note on changing a priority setting
If a QoS classifier is using a policy (codepoint and associated priority) in the DSCP Policy table, you must delete or change this usage before you can change the priority setting on the codepoint. Otherwise the switch blocks the change and displays this message:
In this case, use show qos
to
identify the specific classifiers using the policy you want to change;
that is:<classifier>
show qos port-priority
show qos vlan-priority
show qos type-of-service
For example, suppose that the 000001 (dscp 1) codepoint has a priority of 6, and several classifiers use the 000001 codepoint to assign a priority to their respective types of traffic. If you wanted to change the priority of codepoint 000001, you would do the following:
Identify which QoS classifiers use the codepoint.
Change the classifier configurations by assigning them to a different DSCP policy, or to an 802.1p priority, or to
No-override
.Reconfigure the desired priority for the 000001 (dscp 1) codepoint.
Either reassign the classifiers to the 000001 (dscp 1) codepoint policy or leave them as they were after step 2, above.
Changing the priority setting on a policy when one or more classifiers are currently using the policy (example)
Suppose that codepoint 1 is in use by one or more classifiers. If you try to change its priority, you see a result similar to the following:
Trying to change the priority on a policy in use by a classifier
switch(config)# qos dscp-map 1 priority 2 Cannot modify DSCP Policy 1 - in use by other qos rules.
In this case, you would use steps similar to the following to change the priority.
Identify which classifiers use the codepoint you want to change, using the
show qos
command.<classifier>
Change the classifier configurations by assigning them to a different DSCP policy, or to an 802.1p priority, or to
No-override
. Reconfigure the desired priority for the 000001 (dscp 1) codepoint.switch(config)# qos dscp-map 1 priority 4
You could now re-assign the classifiers to the original policy codepoint or leave them as currently configured.