Details of QoS IP ToS
- A Differentiated Services Codepoint (DSCP): This element is composed of the upper 6 bits of the ToS byte). There are 64 possible codepoints.
The default
qos
configuration includes some codepoints with 802.1p priority settings for Assured- Forwarding (af), Expedited Forwarding (ef, codepoint 101110), and Class Selector (cs). Others are unused (listed withNo-override
for a Priority).
See The ToS codepoint and precedence bits for an illustration of the default DSCP policy table.
Using the
qos dscp-map
command, you can configure the switch to assign different prioritization policies to IPv4 packets having different codepoints. As an alternative, you can configure the switch to assign a new codepoint to an IPv4 packet, along with a corresponding 802.1p priority (0-7). To use this option in the simplest case, you would:Configure a specific DSCP with a specific priority in an edge switch.
Configure the switch to mark a specific type of inbound traffic with that DSCP (and thus create a policy for that traffic type).
Configure the internal switches in your LAN to honor the policy.
- Precedence Bits: This element is a subset of the DSCP and is composed of the upper 3 bits of the ToS byte. When configured to do so, the switch uses the precedence bits to determine a priority for handling the associated packet. (The switch does not change the setting of the precedence bits.) Using the ToS Precedence bits to prioritize IPv4 packets relies on priorities set in upstream devices and applications.
The following figure, shows an example of the ToS byte in the header for an IPv4 packet, and illustrates the diffserv bits and precedence bits in the ToS byte. (Note that the Precedence bits are a subset of the Differentiated Services bits.)
Outbound port |
ToS option: |
|
---|---|---|
802.1p (value = 0 - 7) |
Differentiated services |
|
IP packet sent out an untagged port in a VLAN | Depending on the value of the IP Precedence bits in the packet’s ToS field, the packet will go to one of eight outbound port queues in the switch. See the table in Overview of QoS settings. |
For a given packet carrying a ToS codepoint that the switch has been configured to detect:
No-override (the default) has been configured for a specified codepoint, then the packet is not prioritized by ToS and, by default, is sent to the “normal priority” queue.
|
IP packet sent out an untagged port in a VLAN | Same as above, plus the IP Precedence value (0 - 7) will be used to set a corresponding 802.1p priority in the VLAN tag carried by the packet to the next downstream device. See the table below. |
Same as above, plus the Priority value (0 - 7) will be used to set a corresponding 802.1p priority in the VLAN tag carried by the packet to the next downstream device. Where
|
ToS 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 |