< Home

Understanding Priority Mapping

Priority Mapping

Packets carry different types of precedence field depending on the network type. For example, packets carry the 802.1p field in a VLAN and the DSCP field on an IP network. The mapping between the priority fields must be configured on the gateway to retain priorities of packets when the packets traverse different networks.

Priority mapping technology implements mapping from DSCP priorities to 802.1p priorities, drop priorities, and DSCP priorities. The process is as follows:

  1. When packets reach the switch, the switch maps DSCP priorities in packets trusted by an interface to 802.1p priorities according to the mapping table.

  2. The switch determines the queues that packets enter based on the default mapping between 802.1p priorities and internal priorities (CoS values), and performs operations such as traffic shaping, congestion avoidance, and queue scheduling for packets.

  3. The switch can re-mark priorities of outgoing packets so that the downstream device can provide differentiated QoS based on packet priorities.

The CoS represents the service quality of packets in a switch and determines the type of queues to which packets belong. There are eight CoS values, that is, eight per-hop behaviors (PHBs). The CoS values in descending order of priority are CS7, CS6, EF, AF4, AF3, AF2, AF1, and BE. For details about PHBs, see PHB.

QoS Precedence Fields

Certain fields in the packet header or frame header record QoS information so that network devices can provide differentiated services on the Internet based on QoS information. These fields include:

  • Precedence field

    As defined in RFC 791, the 8-bit ToS field in an IP packet header contains a 3-bit IP precedence field. Figure 1 shows the Precedence field in an IP packet.

    Figure 1 IP Precedence/DSCP field

    Bits 0 to 2 constitute the Precedence field, representing precedence values 7, 6, 5, 4, 3, 2, 1, and 0, in descending order of priority. The values 7 and 6 (high priority) are reserved for routing and network control communication updates. User-level applications can use only priority values 0 to 5.

    Apart from the Precedence field, a ToS field also contains the following sub-fields:

    • Bit D indicates the delay. The value 0 represents a normal delay and the value 1 represents a short delay.

    • Bit T indicates the throughput. The value 0 represents normal throughput and the value 1 represents high throughput.

    • Bit R indicates the reliability. The value 0 represents normal reliability and the value 1 represents high reliability.

  • DSCP field

    RFC 1349 initially defined the ToS field in IP packets and added bit C that indicates the monetary cost. Later, the IETF DiffServ Working Group redefined bits 0 to 5 of the ToS field in IPv4 packets as the DSCP field in RFC 2474. In RFC 2474, the field name is changed from ToS to differentiated service (DS). Figure 1 shows the DSCP field in packets.

    In the DS field, the leftmost 6 bits (bits 0 to 5) are the DS Code Point (DSCP) and the rightmost 2 bits (bits 6 and 7) are reserved. The leftmost three bits (bits 0 to 2) are the Class Selector Code Point (CSCP). CSCPs with the same value represent a type of the DSCP. A DS node selects a PHB based on the DSCP value.

  • 802.1p priority in the Ethernet frame header

    Layer 2 devices exchange Ethernet frames. As defined in IEEE 802.1Q, the PRI field (802.1p priority) in the Ethernet frame header, also called Class of Service (CoS), identifies the QoS requirement. Figure 2 shows the PRI field.

    Figure 2 802.1p priority in the Ethernet frame header

    The 802.1Q header contains a 3-bit PRI field. The PRI field defines eight service priority values 7, 6, 5, 4, 3, 2, 1 and 0, in descending order of priority.

PHB

An action taken for packets on each DS node is called a PHB. The PHB is a forwarding behavior applied to a DS node. The PHB can be defined based on priorities or QoS specifications such as the delay, jitter, and packet loss ratio. The PHB defines some forwarding behaviors but does not specify the implementation mode.

The IETF defines four types of PHBs: Class Selector (CS), Expedited Forwarding (EF), Assured Forwarding (AF), and best-effort (BE). BE is the default PHB.

RFC 2474 classifies CS into CS6 and CS7. RFC 2597 classifies AF into four classes: AF1 to AF4. There are eight classes of PHBs. Each PHB corresponds to a CoS value, and different CoS values determine different congestion management policies. In addition, each PHB is assigned three colors (also called drop priorities): green, yellow, and red. Different colors determine congestion avoidance policies of different flows.

  • CS

    The CS PHB indicates the same service class as the IP precedence value. The CS PHB has the highest priority among standard PHBs.

    CS includes CS6 and CS7. By default, CS6 and CS7 PHBs are used for protocol packets, such as STP BPDUs, LLDPDUs, and LACPDUs. If these packets are not forwarded, protocol services are interrupted.

  • EF

    The EF PHB defines that the rate at which packets are sent from any DS node must be higher than or equal to the specified rate. The EF PHB cannot be re-marked in the DS domain but can be re-marked on edge nodes.

    The EF PHB applies to real-time services that require a short delay, low jitter, and low packet loss ratio. Real-time services include video, voice, and video conferencing services.

    The EF PHB is used for transmitting VoIP traffic or data flows of enterprise internal video conferences. Voice services require a short delay, low jitter, and low packet loss rate, and are second only to protocol packets in terms of importance.

    The bandwidth dedicated to the EF PHB must be restricted so that other services can use the available bandwidth.

  • AF

    The AF PHB defines that traffic exceeding the specified bandwidth (as agreed to by users and an ISP) can be forwarded. The traffic that does not exceed the bandwidth specification is forwarded as required, and the traffic that exceeds the bandwidth specification is forwarded at a lower priority.

    The AF PHB applies to services that require a short delay, low packet loss ratio, and high reliability. Such services include e-commerce and enterprise VPN services.

    AF includes AF4, AF3, AF2, and AF1.

    • The AF4 PHB is used for transmitting signaling traffic of voice services, that is, protocol packets of VoIP services.

      Voice signaling is used for call control. A delay of less than 10 seconds is tolerable, but no interruption is allowed during a conversation. Therefore, processing of voice traffic must be prioritized ahead of signaling traffic.

    • The AF3 PHB is used for Telnet and FTP services of remote devices. The services require medium bandwidth, reliable transmission, and zero packet loss, but are sensitive to the delay and jitter.

    • The AF2 PHB is used for transmitting flows of enterprise IPTV live services and ensures smooth transmission of online video services. Live services are real-time services and require continuous bandwidth and a large throughput guarantee, but allow less packet loss.

    • The AF1 PHB is used for common data services such as emails. Common data services require only zero packet loss, and do not require high real-time performance and jitter.

  • BE

    The BE PHB focuses only on whether packets can reach the destination, regardless of the transmission performance. All switches must support the BE PHB.

    The BE PHB applies to best-effort services on the Internet. Such services include HTTP web page browsing services.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >