IPv4 ToS/IPv6 traffic class byte

IPv4 packet headers contain a Type of Service (ToS) byte; IPv6 packet headers contain a Traffic Class byte. In an IPv6 packet, the Traffic Class byte is used in the same way as the ToS byte in an IPv4 packet. A ToS/Traffic Class byte includes a DSCP codepoint and precedence bits:
  • Differentiated Services Codepoint (DSCP) Consists of the upper six bits of the ToS/Traffic Class byte. There are 64 possible codepoints.In the switches covered in this guide, the default QoS configuration includes some codepoints, such as Assured Forwarding and Expedited Forwarding, that are preconfigured with an 802.1p priority setting. All other codepoints are not configured with an 802.1p priority and display No-override.Use the qos dscp map command to configure the switch to assign different 802.1p priorities to IP packets with different codepoints. Also, you can configure the switch to assign a new codepoint with its associated priority level (0-7) to matching packets as follows:
    1. Configure a DSCP codepoint with the desired priority in an edge switch.

    2. Configure the local switch to mark specified inbound traffic with the DSCP (and thus create a policy for that traffic type).

    3. Configure the internal switches in your LAN to honor the policy.

    For example, you could configure an edge switch to assign a codepoint of 000001 to all packets received from a specific VLAN, and then handle all traffic with that codepoint at high priority.
  • Precedence BitsA subset of the DSCP codepoint, consisting of the upper three bits of the ToS/Traffic Class byte. When a global IP-Precedence classifier is configured, the switch uses the precedence bit set to determine the priority for selected packets as shown in the following table. (The switch does not change the setting of the precedence bits.)
    IP precedence-to-802.1p priority mapping

    ToS/Traffic Class Byte: IP Precedence Bits

    Corresponding 802.1p Priority

    Service Priority Level

    000

    1

    Lowest

    001

    2

    Low

    002

    0

    Normal

    003

    3

     

    004

    4

     

    005

    5

     

    006

    6

     

    007

    7

    Highest

    NOTE:

    Using a global IP-Precedence classifier to prioritize IP packets relies on priorities set in upstream devices and applications.

    The following diagram shows the difference between the diffserv bits and precedence bits in an IPv4 ToS byte and an IPv6 Traffic Class byte. Note that:
    • Precedence bits are a subset of the Differentiated Services bits.

    • The right-most two bits are reserved.

    IPv4 ToS/IPv6 traffic class byte with DSCP codepoint and precedence bits