Assigning a DSCP policy based on IP address

This option assigns a previously configured DSCP policy (codepoint and 802.1p priority) to outbound IP packets having the specified IP address (either source or destination). That is, the switch:

  1. Selects an incoming IP packet on the basis of the source or destination IP address it carries.
  2. Overwrites the packet’s DSCP with the DSCP configured in the switch for such packets, and assigns the 802.1p priority configured in the switch for the new DSCP. (See Differentiated Services Codepoint (DSCP) mapping.)
  3. Forwards the packet through the appropriate outbound port queue.

Steps for creating a policy based on IP address:

This procedure creates a DSCP policy for IP packets carrying the selected IP address (source or destination).

  1. Identify the IP address to use as a classifier for assigning a DSCP policy.

  2. Determine the DSCP policy for packets carrying the selected IP address:

    1. Determine the DSCP you want to assign to the selected packets. (This codepoint will be used to overwrite the DSCP carried in packets received through the source-port from upstream devices.)

    2. Determine the 802.1p priority you want to assign to the DSCP.

  3. Configure the DSCP policy by using dscp-map to configure the priority for each codepoint (see Differentiated Services Codepoint (DSCP) mapping for more information).

  4. Configure the switch to assign the DSCP policy to packets with the specified IP address.


qos device-priority <ip-address> dscp <codepoint>

Assigns a DSCP policy to packets carrying the specified IP address, and overwrites the DSCP in these packets with the assigned <codepoint> value. This policy includes an 802.1p priority and 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.

(Default: No-override)


no qos device-priority <ip-address>

Deletes the specified IP address as a QoS classifier.


show qos device-priority

Displays a listing of all QoS Device Priority classifiers currently in the running-config file.

For example, suppose that you wanted to assign these DSCP policies to the packets identified by the indicated IP addresses:

IP address

DSCP policies











Assign the DSCP policies to the selected device IP addresses and display the result.

switch(config)# qos device-priority dscp 15
switch(config)# qos device-priority dscp 16
switch(config)# qos device-priority dscp 17
switch(config)# qos device-priority dscp 17
switch(config)# show qos device-priority
 Device priorities
  Device Address                         Apply rule | DSCP   Priority
  -------------------------------------- ---------- + ------ --------                             DSCP         15     7                           DSCP         16     5                           DSCP         17     1                           DSCP         17     1
The switch will now apply the DSCP policies to IPv4 packets received on the switch with the specified IP addresses (source or destination). This means the switch will:
  • Overwrite the original DSCPs in the selected packets with the new DSCPs specified in the above policies.

  • Assign the 802.1p priorities in the above policies to the appropriate packets.