QoS traffic marking

When you apply or reconfigure QoS actions for selected packets, QoS supports different types of traffic marking in globally-configured QoS settings and classifier-based per-port or per-VLAN QoS policies.

Globally-configured traffic marking

If a packet matches one of the globally-configured packet classifiers, QoS applies one of the following types of traffic marking to the outbound packet:

Layer 2 802.1p prioritization:

Controls the outbound port-queue priority for traffic leaving the switch, and (if traffic exits through a VLAN-tagged port) sends the priority setting with the individual packets to downstream devices.

Layer 3 DSCP marking:

Enables the switch to set, change, and honor prioritization policies by using the Differentiated Services (diff-serv) bits in the IPv4 ToS byte and IPv6 Traffic Class byte of packet headers.

Layer 2 802.1p prioritization

By setting a new 802.1p priority value, QoS allows you to control the priority of outbound packets moving through the switch. The Layer 2 802.1p priority setting in a packet header determines the outbound port queue to which the packet is sent.

By default, the switches covered in this guide have eight outbound traffic queues (0 through 7). A lower-numbered queue has a lower outbound priority; a higher-numbered queue has a higher outbound priority. Packets are transmitted from the switch port on the basis of their queue assignment and whether any higher queues are empty. (To increase bandwidth, you can reconfigure the switch to use four or two outbound queues.)

Configuring a new 802.1p priority value allows you to set the outbound priority queue to which a packet is sent. For example, you can configure an 802.1p priority of 0 through 7 for an outbound packet. When the packet is sent to a port, the QoS priority determines the outbound queue to which the packet is assigned as shown in the following table:

802.1p priority settings and outbound queue assignment

802.1p priority setting Outbound port queue
1 and 2 Low priority (1, 2)
0 or 3 Normal priority (3, 4)
4 and 5 Medium priority (5, 6)
6 and 7 High priority (7, 8)

If a packet is transmitted in an untagged-VLAN environment, the 802.1p priority settings in the preceding table control only the outbound queue to which the packet is sent on the local switch. Because no VLAN tag is used, an 802.1p priority value is not added to the 802.1Q field in the packet header for use by downstream devices.

However, if your network uses only one VLAN and does not require VLAN-tagged ports, you can preserve 802.1p priority settings in outbound traffic by configuring the ports on links between devices on which you want 802.1p priorities to be honored as tagged VLAN members.

If a packet is transmitted in an 802.1Q VLAN-tagged environment, the QoS-configured 802.1p setting is also added to the VLAN packet header as an 802.1p priority for use by downstream devices and applications.

In an 802.1Q VLAN environment with VLAN-tagged ports, if QoS is not configured on the switch but is configured on an upstream device, the priorities carried in the packets determine the outbound port queue on which packets are forwarded.

Mapping 802.1p priorities to outbound port queues on the switch and downstream devices

Configured 802.1p priority Outbound port queue in the switch 802.1p priority added to tagged VLAN packets exiting the switch Queue assignment in downstream devices with:
8 queues 4 queues 2 queues
1 Queue 1 1 (low priority) Queue 1 Queue 1 Queue 1
2 Queue 2 2 Queue 2
0 Queue 3 0 (normal priority) Queue 3 Queue 2
3 Queue 4 3 Queue 4
4 Queue 5 4 (medium priority) Queue 5 Queue 3 Queue 2
5 Queue 6 5 Queue 6
6 Queue 7 6 (high priority) Queue 7 Queue 4
7 Queue 8 7 Queue 8

[NOTE: ]

NOTE: You can reconfigure the QoS queue setting to change the number of outbound port queues in the switch from eight (default) to four or two queues.


Layer 3 DSCP marking

By changing or honoring the settings of the DSCP codepoint in IP packet headers, QoS allows you to control the DSCP and associated 802.1p priority values in outbound IP packets that are sent to downstream devices.

You can later configure downstream devices to read and use the DSCP policy that QoS sets. When marking the DSCP bits in IP packets, a QoS policy is not dependent on VLAN-tagged ports to carry 802.1p packet priorities to downstream devices.

When configuring a Layer 3 DSCP policy, specify:

  • Bit values for the DSCP codepoint (the upper six bits in the ToS/Traffic Class byte in IP packet headers), entered in either binary format, the decimal equivalent, or an ASCII standard (hexadecimal) name

  • An 802.1p priority value that is associated with the new DSCP bit values

    Certain DSCP codepoints (such as Assured Forwarding and Expedited Forwarding) have default 802.1p priorities.

A DSCP policy assigns a DSCP codepoint and 802.1p priority value to IPv4 and IPv6 packets. You can classify traffic on an edge switch and use Layer 3 DSCP-marking (instead of only 802.1p priority) to assign and preserve QoS policies on downstream devices. In this case, if you reconfigure the 802.1p priority associated with the DSCP codepoint, the new 802.1p assignment takes effect starting on the switch on which it is configured and is used in packets sent to downstream devices.

If you configure a different 802.1p priority for a DSCP codepoint, the new DSCP policy overrides the 802.1p priority value in packets which enter the switch with the specified codepoint. The Layer 2 802.1p priority setting (0 through 7) determines the outbound port queue to which a packet is sent.

VLAN and untagged VLAN environments

QoS operates in VLAN-tagged and untagged environments. If your network does not use multiple VLANs, you can still implement the 802.1Q VLAN capability to allow packets to carry an 802.1p priority to the next downstream device. To do so, configure the ports on links to other network devices as VLAN-tagged members.

In a tagged or untagged VLAN, you can also ensure that IPv4/IPv6 packets carry an 802.1p priority to downstream devices by configuring DSCP marking in the ToS/Traffic Class byte.

The following table summarizes the QoS options for traffic-marking in VLAN-tagged and untagged environments.

QoS traffic marking supported in tagged and untagged VLANs

QoS marking supported on outbound packets Port membership in VLANs
Tagged Untagged
Assign an 802.1p priority that determines the outbound port queue to which a packet is sent Supported Supported
Carry the 802.1p priority to the next downstream device Supported Not Supported
Carry a DSCP policy (DSCP codepoint[1] and associated 802.1p priority[2]) to downstream devices Supported Supported

[1] DSCP marking (DSCP codepoint and associated 802.1p priority) are not supported on non-IP packets and packets selected using the following global QOS classifiers: Layer 3 Protocol and IP-Precedence. Also, in order for DSCP policy marking to be honored on a downstream device, the device must be configured to use the DSCP policy in IP packet headers.

[2] The 802.1p priority associated with a DSCP codepoint is used to determine the packet's outbound port queue. When used in a VLAN-tagged environment, an 802.1p priority is also carried in the 802.1Q field of outbound packet headers.

Classifier-based traffic marking

Classifier-based per-port or per-VLAN QoS policies support the following traffic-marking actions. Note that globally-configured QoS traffic marking (802.1p and DSCP prioritization), classifier-based QoS policies also support IP precedence and rate-limiting.

  • Layer 2 802.1p prioritization: Controls the outbound port queue priority for traffic leaving the switch, and (if traffic exits through a VLAN-tagged port) sends the priority setting in packet headers to downstream devices.

  • Layer 3 IP precedence-bit marking: Enables the switch to set, change, and honor prioritization policies by using the IP precedence bits in the ToS byte of IPv4 packet headers and Traffic Class byte of IPv6 headers.

  • Layer 3 DSCP marking: Enables the switch to set, change, and honor prioritization policies by using the Differentiated Services (Diffserv) bits in the ToS byte of IPv4 headers and Traffic Class byte of IPv6 headers.

  • Rate-limiting: Enables a port or VLAN interface to allow only the specified amount of bandwidth to be used for inbound traffic. When traffic exceeds the configured limit, it is dropped.


[NOTE: ]

NOTE: After you apply a classifier-based QoS policy on a port or VLAN interface:

  • The 802.1p (CoS) priority and DSCP codepoint marking applied to classified packets override any 802.1p and DSCP codepoint values that are globally-configured using the QoS commands.

  • The rate-limit applied to classified packets overrides any globally configured rate-limit globally-configured. See the Management and Configuration Guide for more information.