Assigning an 802.1p priority to IPv4 packets on the basis of incoming DSCP

One of the best uses for this option is on an interior switch where you want to honor (continue) a policy set on an edge switch. That is, it enables you to select incoming packets having a specific DSCP and forward these packets with the desired 802.1p priority. For example, if an edge switch “A” marks all packets received on port 5 with a particular DSCP, you can configure a downstream (interior) switch “B” to handle such packets with the desired priority (regardless of whether 802.1Q tagged VLANs are in use).
Interior switch B honors the policy established in edge switch A
To do so, assign the desired 802.1p priority to the same codepoint that the upstream or edge switch assigns to the selected packets. When the downstream switch receives an IPv4 packet carrying one of these codepoints, it assigns the configured priority to the packet and sends it out the appropriate priority queue. (The packet retains the codepoint it received from the upstream or edge switch). You can use this option concurrently with the diffserv DSCP Policy option (described later in this section), as long as the DSCPs specified in the two options do not match.
NOTE: Regarding DSCP use:

Different applications may use the same DSCP in their IP packets. Also, the same application may use multiple DSCPs if the application originates on different clients, servers, or other devices. Using an edge switch enables you to select the desired packets and mark them with predictable DSCPs that can be used by downstream switches to honor policies set in the edge switch.

When enabled, the switch applies direct 802.1p prioritization to all packets having codepoints that meet these prerequisites:

  • The codepoint is configured with an 802.1p priority in the DSCP table. (Codepoints configured with No-override are not used.)

  • The codepoint is not configured for a new DSCP policy assignment.

Thus, the switch does not allow the same incoming codepoint (DSCP) to be used simultaneously for directly assigning an 802.1p priority and also assigning a DSCP policy. For a given incoming codepoint, if you configure one option and then the other, the second overwrites the first.

To use this option:

Procedure
  1. Identify a DSCP used to set a policy in packets received from an upstream or edge switch.
  2. Determine the 802.1p priority (0–7) you want to apply to packets carrying the identified DSCP. (You can either maintain the priority assigned in the upstream or edge switch, or assign a new priority.)
  3. Use qos dscp-map <codepoint> priority <0-7> to assign the 802.1p priority you want to the specified DSCP.
  4. Enable diff-services if not already enabled.

Syntax:


qos type-of-service diff-services <codepoint>

Causes the switch to read the <codepoint> (DSCP) of an incoming IPv4 packet and, when a match occurs, assign a corresponding 802.1p priority, as configured in the switch’s DSCP table (see Differentiated Services Codepoint (DSCP) mapping).


no qos type-of-service

Disables all ToS classifier operation.


no qos dscp-map <codepoint>

Disables direct 802.1p priority assignment to packets carrying the <codepoint> by reconfiguring the codepoint priority assignment in the DSCP table to No-override. If this codepoint is in use as a DSCP policy for another diffserv codepoint, you must disable or redirect the other diffserv codepoint’s DSCP policy before you can disable or change the codepoint. For example, in ToS configuration that enables both 802.1p priority and DSCP policy assignment you cannot change the priority for the 000000 codepoint until you redirect the DSCP policy for 000001 away from using 000000 as a policy. (See Note on changing a priority setting and Differentiated Services Codepoint (DSCP) mapping.)


show qos type-of-service

Displays current Type-of-Service configuration. In diffserv mode it also shows the current direct 802.1p assignments and the current DSCP assignments covered later in this section.

For example, an edge switch “A” in an untagged VLAN assigns a DSCP of 000110 on IP packets it receives on port 6, and handles the packets with high priority (7). When these packets reach interior switch “B” you want the switch to handle them with the same high priority. To enable this operation, you would configure an 802.1p priority of 7 for packets received with a DSCP of 000110. ToS diff-services must be enabled as shown in the following images.

Viewing the codepoints available for 802.1p priority assignments
ToS configuration that enables both 802.1p priority and DSCP policy assignment