Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers
obsoletes
- rfc-1349 — Type of Service in the Internet Protocol Suite
- rfc-1455 — Physical Link Security Type of Service
updated by
- rfc-3168 — The Addition of Explicit Congestion Notification (ECN) to IP
- rfc-3260 — New Terminology and Clarifications for Diffserv
- rfc-8436 — Update to IANA Registration Procedures for Pool 3 Values in the Differentiated Services Field Codepoints (DSCP) Registry
updates
- rfc-791 — Internet Protocol
Extracted elements (22)
Service construction policies are deliberately left outside the scope of the document because experience with differentiated services was limited in 1998 and because service details are often covered by legal agreements between business entities—both of which make premature standardization inadvisable.
Standardized PHBs specify behavioral characteristics, not specific algorithms or mechanisms (e.g., Class Selector PHBs may be implemented by strict priority queuing, WFQ, WRR, CBQ, etc.). This separation mirrors the Internet's original forwarding/routing split and allows mechanisms to evolve independently of behaviors.
The DSCP field is defined as an unstructured 6-bit field (rather than a structured field with subfields like old IP Precedence) to facilitate the definition of future per-hop behaviors and avoid premature constraints on the codepoint space.
The Pool 1 codepoint space ('xxxxx0') is intentionally sparse: the 8 currently assigned Class Selector Codepoints ('xxx000') leave room for future standards-track PHB allocations without exhausting the pool or constraining future evolution.
The DS field structure is incompatible with the IPv4 TOS octet definition in RFC 791. DS domains are expected to protect themselves with re-marking boundary nodes; domains not isolated by suitably configured boundary nodes may deliver unpredictable service.
To preserve backward compatibility with deployed IP Precedence usage, codepoints 'xxx000' are reserved as Class Selector Codepoints. Operators may configure nodes to map codepoints irrespective of bits 3–5 of the DSCP field, making the network compatible with historical IP Precedence use (e.g., codepoint '011010' maps to the same PHB as '011000').
Codepoint '000000' MUST map to a PHB meeting the Default PHB specification (best-effort, common forwarding). Unrecognized codepoints SHOULD also be mapped to this PHB.
DS-compliant nodes MUST select PHBs by matching against the entire 6-bit DSCP field, treating it as a table index. The value of the CU field MUST be ignored by PHB selection.
Each standardized PHB MUST have an associated RECOMMENDED codepoint allocated from Pool 1 (32 codepoints, pattern 'xxxxx0'). Only PHBs that have been implemented, deployed, and shown to be useful SHOULD be standardized.
Packets received with an unrecognized codepoint SHOULD be forwarded as if marked for the Default PHB, with their codepoints unchanged. Such packets MUST NOT cause the network node to malfunction.
PHB group specifications MUST identify any possible packet re-ordering implications for each individual PHB and when packets within a microflow are marked for different PHBs within the group. It is RECOMMENDED that PHB implementations not introduce re-ordering within a microflow.
PHBs mapped to by the eight Class Selector Codepoints MUST yield at least two independently forwarded traffic classes. PHBs selected by higher-order Class Selector Codepoints SHOULD give packets a probability of timely forwarding not lower than those of lower-order codepoints.
PHBs selected by codepoints '11x000' MUST give packets preferential forwarding treatment compared to the Default PHB ('000000'), preserving the common usage of IP Precedence values '110' and '111' for routing traffic.
The mapping of codepoints to PHBs MUST be configurable via a logical equivalent of a configurable mapping table. PHB specifications MUST include a recommended default codepoint, which MUST be unique within the standard codepoint space.
When an IPsec tunnel egresses into a DS domain and the inner IP header has not been processed by a DS boundary node, the tunnel egress node MUST act as a DS boundary node and ensure the resulting traffic carries appropriate DS codepoints.
The Class Selector Codepoints are the eight DSCP values of the form 'xxx000' (where x is 0 or 1). PHBs mapped to by these codepoints must satisfy Class Selector PHB Requirements in addition to the Default PHB requirement for codepoint '000000'.
The Default PHB represents best-effort forwarding behavior. It MUST be available in every DS-compliant node and maps to codepoint '000000', which MUST be non-configurable and always satisfy the Default PHB specification.
The DS field supersedes the IPv4 TOS octet (RFC 791) and the IPv6 Traffic Class octet (RFC 2460). It is interpreted identically in both IP versions, carrying a 6-bit DSCP that maps to a per-hop behavior at each DS-compliant node.
The 64-codepoint DSCP space is divided into three pools: Pool 1 ('xxxxx0', 32 codepoints) assigned by Standards Action; Pool 2 ('xxxx11', 16 codepoints) reserved for EXP/LU; Pool 3 ('xxxx01', 16 codepoints) initially EXP/LU but available for future Standards Action if Pool 1 is exhausted.
Adversaries may obtain better service or launch denial-of-service attacks by modifying DS codepoints in packets or injecting packets with elevated codepoints. DS domain boundary nodes MUST ensure all entering traffic is marked with appropriate codepoint values, remarking if necessary, as the primary defense against codepoint-based theft- and DoS attacks.
IPsec (AH and ESP) does not include the DS field in its cryptographic calculations, so IPsec provides no integrity protection for the DS field and does not prevent man-in-the-middle modification of codepoints. IPsec tunnel mode protects the inner header's DS field but the outer header remains modifiable by intermediate nodes.
The DS field is an 8-bit octet: bits 0–5 form the 6-bit DSCP (Differentiated Services Codepoint) subfield, and bits 6–7 form the 2-bit CU (currently unused) subfield. The DSCP selects the per-hop behavior; the CU bits are reserved and ignored by PHB selection.