Content

| 8.2 |  | Quality of Service Mechanisms |
| 8.2.5 |  | Traffic marking |

In order to provide QoS to varying packets and frames, it is necessary to mark the packets and frames to indicate the QoS requirements they have. Specific fields are used for QoS marking or classification in frames or packets. At the Datalink layer a raw Ethernet frame has no fields to signify its QoS requirements. If QoS marking is required, then ISL or 802.1Q/p must be used as these provide a three-bit Class of Service (CoS) field. At the Network layer an IP packet contains a one byte Type of Service (ToS) field, of which the first three bits form the IP-Precedence field and the first six bits from the Differentiated Services Code Point (DSCP) fields. Either of these can be used to signify the QoS requirements of an IP packet.

The marking of traffic at Layers 2 or 3 is crucial to providing QoS within a network. Network devices use this marking to determine the relative priority of traffic. The decision of whether to mark traffic at Layers 2 or 3 or both is not trivial and should be made after consideration of the following points:

- Layer 2 marking of frames can be performed for non IP traffic.
- Layer 2 marking of frames is the only QoS option available for switches that are not “IP aware”.
- Layer 3 marking will carry the QoS information end-to-end.
- Older IP equipment may not understand DSCP.

Although it may seem confusing to have three options for marking traffic, in practice the way to proceed is often determined by the capabilities of hosts, switches and routers within the network. In many instances it may be necessary to use different marking techniques at different points within a network. For this reason, it is common to use both DSCP to mark the QoS requirements of packets through the routed layers of the network and mark the frames using the CoS to allow layer 2 devices, such as switches, to provide for the QoS requirements of packet at the data link layer.

The three bit CoS field present in ISL and 802.1P/Q frames allow eight levels of priority to be set for each frame. These values range from zero for the lowest priority through to seven for the highest priority. Although the CoS field can be used to influence the QoS treatment of packets, it does not have the flexibility or end-to-end capability of the IP marking schemes using IP Precedence or DSCP. For this reason, it is common to have switches set a Layer 2 CoS value for traffic based on their ingress port and have a router translate the CoS value into an equivalent IP Precedence or DSCP value. This Layer 3 ToS is then used to influence the QoS as the packet passes through network devices on route to its destination.

Associating a packet with an IP Precedence or IP DSCP QoS level allows network devices to classify traffic based on the packets IP Precedence and IP DSCP value, depending on which value is marked. These markings can be used to identify traffic with similar QoS requirements within the network and traffic classes can be created. Traffic types that have similar QoS requirements can be given equivalent treatment.

The IP DSCP value is the first six bits in the ToS byte, while the IP Precedence value is the first three bits in the ToS value. The IP Precedence value is actually part of the IP DSCP value. Therefore, both values cannot be set simultaneously. If both values are set simultaneously, the packet is marked with the IP DSCP value. Essentially DSCP supersedes IP Precedence.

If it is necessary to provide QoS through packet marking and all of the devices in the network support IP DSCP marking, then it is best to use the IP DSCP marking. IP DSCP markings provide more packet marking options than IP Precedence.

DSCP marking may be undesirable because some older devices in the network do not support IP DSCP values. In this case it may be necessary to use the IP precedence value to mark the packets. A maximum of 8 different IP precedence markings and 64 different IP DSCP markings may be set.