RFC 9599 | ECN Encapsulation Guidelines | July 2024 |
Briscoe & Kaippallimalil | Best Current Practice | [Page] |
The purpose of this document is to guide the design of congestion notification in any lower-layer or tunnelling protocol that encapsulates IP. The aim is for explicit congestion signals to propagate consistently from lower-layer protocols into IP. Then, the IP internetwork layer can act as a portability layer to carry congestion notification from non-IP-aware congested nodes up to the transport layer (L4). Specifications that follow these guidelines, whether produced by the IETF or other standards bodies, should assure interworking among IP-layer and lower-layer congestion notification mechanisms. This document is included in BCP 89 and updates the single paragraph of advice to subnetwork designers about Explicit Congestion Notification (ECN) in Section 13 of RFC 3819 by replacing it with a reference to this document.¶
This memo documents an Internet Best Current Practice.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on BCPs is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9599.¶
Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
In certain networks, it might be possible for traffic to congest non-IP-aware nodes. In such networks, the benefits of Explicit Congestion Notification (ECN) described in [RFC8087] and summarized below can only be fully realized if support for congestion notification is added to the relevant subnetwork technology, as well as to IP. When a lower-layer buffer implicitly notifies congestion by dropping a packet, it obviously does not just drop at that layer; the packet disappears from all layers. In contrast, when active queue management (AQM) at a lower layer buffer explicitly notifies congestion by marking a frame header, the marking needs to be explicitly propagated up the layers. The same is true if AQM marks the outer header of a packet that encapsulates inner tunnelled headers. Forwarding ECN is not as straightforward as other headers because it has to be assumed ECN may be only partially deployed. If a lower-layer header that contains congestion indications is stripped off by a subnet egress that is not ECN-aware, or if the ultimate receiver or sender is not ECN-aware, congestion needs to be indicated by dropping the packet, not marking it.¶
The purpose of this document is to guide the addition of congestion notification to any subnet technology or tunnelling protocol so that lower-layer AQM algorithms can signal congestion explicitly and that signal will propagate consistently into encapsulated (higher-layer) headers. Otherwise, the signals will not reach their ultimate destination.¶
ECN is defined in the IP header (IPv4 and IPv6) [RFC3168] to allow a resource to notify the onset of queue buildup without having to drop packets by explicitly marking a proportion of packets with the congestion experienced (CE) codepoint.¶
Given a suitable marking scheme, ECN removes nearly all congestion loss and it cuts delays for two main reasons:¶
Some lower-layer technologies (e.g., MPLS, Ethernet) are used to form subnetworks with IP-aware nodes only at the edges. These networks are often sized so that it is rare for interior queues to overflow. However, until recently, this was more due to the inability of TCP to saturate the links. For many years, fixes such as window scaling [RFC7323] proved hard to deploy and the Reno variant of TCP remained in widespread use despite its inability to scale to high flow rates. However, now that modern operating systems are finally capable of saturating interior links, even the buffers of well-provisioned interior switches will need to signal episodes of queuing.¶
Propagation of ECN is defined for MPLS [RFC5129] and TRILL [RFC7780] [RFC9600], but it has yet to be defined for a number of other subnetwork technologies.¶
Similarly, ECN propagation is yet to be defined for many tunnelling protocols. [RFC6040] defines how ECN should be propagated for IP-in-IPv4 [RFC2003], IP-in-IPv6 [RFC2473], and IPsec [RFC4301] tunnels, but there are numerous other tunnelling protocols with a shim and/or a Layer 2 (L2) header between two IP headers (IPv4 or IPv6). Some address ECN propagation between the IP headers, but many do not. This document gives guidance on how to address ECN propagation for future tunnelling protocols, and a companion Standards Track specification [RFC9601] updates existing tunnelling protocols with a shim between IP headers that are under IETF change control and still widely used.¶
Incremental deployment is the most delicate aspect when adding support for ECN. The original ECN protocol in IP [RFC3168] was carefully designed so that a congested buffer would not mark a packet (rather than drop it) unless both source and destination hosts were ECN-capable. Otherwise, its congestion markings would never be detected and congestion would just build up further. However, to support congestion marking below the IP layer or within tunnels, it is not sufficient to only check that the two layer 4 transport endpoints support ECN; correct operation also depends on the decapsulator at each subnet or tunnel egress faithfully propagating congestion notification to the higher layer. Otherwise, a legacy decapsulator might silently fail to propagate any congestion signals from the outer header to the forwarded header. Then, the lost signals would never be detected and congestion would build up further. The guidelines given later require protocol designers to carefully consider incremental deployment and suggest various safe approaches for different circumstances.¶
Of course, the IETF does not have standards authority over every link-layer protocol; thus, this document gives guidelines for designing propagation of congestion notification across the interface between IP and protocols that may encapsulate IP (i.e., that can be layered beneath IP). Each lower-layer technology will exhibit different issues and compromises, so the IETF or the relevant standards body must be free to define the specifics of each lower-layer congestion notification scheme. Nonetheless, if the guidelines are followed, congestion notification should interwork between different technologies using IP in its role as a 'portability layer'.¶
Therefore, the capitalized terms 'SHOULD' or 'SHOULD NOT' are often used in preference to 'MUST' or 'MUST NOT' because it is difficult to know the compromises that will be necessary in each protocol design. If a particular protocol design chooses not to follow a 'SHOULD' or 'SHOULD NOT' given in the advice below, it MUST include a sound justification.¶
It has not been possible to give common guidelines for all lower-layer technologies because they do not all fit a common pattern. Instead, they have been divided into a few distinct modes of operation: feed-forward-and-up, feed-up-and-forward, feed-backward, and null mode. These modes are described in Section 3, and separate guidelines are given for each mode in subsequent sections.¶
This document updates the brief advice to subnetwork designers about ECN in Section 13 of [RFC3819] by adding this document (RFC 9599) as an informative reference and replacing the last two paragraphs with the following sentence:¶
By following the guidelines in [RFC9599], subnetwork designers can enable a layer-2 protocol to participate in congestion control without dropping packets via propagation of Explicit Congestion Notification (ECN) [RFC3168] to receivers.¶
This document only concerns wire protocol processing of explicit notification of congestion. It makes no changes or recommendations concerning algorithms for congestion marking or congestion response because algorithm issues should be independent of the layer that the algorithm operates in.¶
The default ECN semantics are described in [RFC3168] and updated by [RFC8311]. Also, the guidelines for AQM designers [RFC7567] clarify the semantics of both drop and ECN signals from AQM algorithms. [RFC4774] is the appropriate best current practice specification of how algorithms with alternative semantics for the ECN field can be partitioned from Internet traffic that uses the default ECN semantics. There are two main examples for how alternative ECN semantics have been defined in practice:¶
The aim is that the default rules for encapsulating and decapsulating the ECN field are sufficiently generic that tunnels and subnets will encapsulate and decapsulate packets without regard to how algorithms elsewhere are setting or interpreting the semantics of the ECN field. [RFC6040] updates [RFC4774] to allow alternative encapsulation and decapsulation behaviours to be defined for alternative ECN semantics. However, it reinforces the same point -- it is far preferable to try to fit within the common ECN encapsulation and decapsulation behaviours because expecting all lower-layer technologies and tunnels to be updated is likely to be completely impractical.¶
Alternative semantics for the ECN field can be defined to depend on the traffic class indicated by the Differentiated Services Code Point (DSCP). Therefore, correct propagation of congestion signals could depend on correct propagation of the DSCP between the layers and along the path. For instance, if the meaning of the ECN field depends on the DSCP (as in PCN or VoLTE) and the outer DSCP is stripped on descapsulation, as in the pipe model of [RFC2983], the special semantics of the ECN field would be lost. Similarly, if the DSCP is changed at the boundary between Diffserv domains, the special ECN semantics would also be lost. This is an important implication of the localized scope of most Diffserv arrangements. In this document, correct propagation of traffic class information is assumed while the meaning of 'correct' and how it is achieved is covered elsewhere (e.g., [RFC2983]) and is outside the scope of this document.¶
The guidelines in this document do ensure that common encapsulation and decapsulation rules are sufficiently generic to cover cases where ECT(1) is used instead of ECT(0) to identify alternative ECN semantics (as in L4S [RFC9331]) and where ECN-marking algorithms use ECT(1) to encode three severity levels into the ECN field (e.g., PCN [RFC6660]) rather than the default of two. All these different semantics for the ECN field work because it has been possible to define common default decapsulation rules that allow for all cases [RFC6040].¶
Note that the guidelines in this document do not necessarily require the subnet wire protocol to be changed to add support for congestion notification. For instance, the feed-up-and-forward mode (Section 3.2) and the null mode (Section 3.4) do not. Another way to add congestion notification without consuming header space in the subnet protocol might be to use a parallel control plane protocol.¶
This document focuses on the congestion notification interface between IP and lower-layer or tunnel protocols that can encapsulate IP, where the term 'IP' includes IPv4 or IPv6, unicast, multicast, or anycast. However, it is likely that the guidelines will also be useful when a lower-layer protocol or tunnel encapsulates itself, e.g., Ethernet Media Access Control (MAC) in MAC ([IEEE802.1Q]; previously 802.1ah), or when it encapsulates other protocols. In the feed-backward mode, propagation of congestion signals for multicast and anycast packets is out of scope (because the complexity would make it unlikely to be attempted).¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Further terminology used within this document:¶
This section sets down the different modes by which congestion information is passed between the lower layer and the higher one. It acts as a reference framework for the subsequent sections that give normative guidelines for designers of congestion notification protocols, taking each mode in turn:¶
Nodes feed forward congestion notification towards the egress within the lower layer, then up and along the layers towards the end-to-end destination at the transport layer. The following local optimization is possible:¶
Like IP and MPLS, many subnet technologies are based on self-contained PDUs or frames sent unreliably. They provide no feedback channel at the subnetwork layer, instead relying on higher layers (e.g., TCP) to feed back loss signals.¶
In these cases, ECN may best be supported by standardising explicit notification of congestion into the lower-layer protocol that carries the data forwards. Then, a specification is needed for how the egress of the lower-layer subnet propagates this explicit signal into the forwarded upper-layer (IP) header. This signal continues forwards until it finally reaches the destination transport (at L4). Typically, the destination will feed this congestion notification back to the source transport using an end-to-end protocol (e.g., TCP). This is the arrangement that has already been used to add ECN to IP-in-IP tunnels [RFC6040], IP-in-MPLS, and MPLS-in-MPLS [RFC5129].¶
This mode is illustrated in Figure 1. Along the middle of the figure, layers 2, 3, and 4 of the protocol stack are shown. One packet is shown along the bottom as it progresses across the network from source to destination, crossing two subnets connected by a router and crossing two switches on the path across each subnet. Congestion at the output of the first switch (shown as *) leads to a congestion marking in the L2 header (shown as C in the illustration of the packet). The chevrons show the progress of the resulting congestion indication. It is propagated from link to link across the subnet in the L2 header. Then, when the router removes the marked L2 header, it propagates the marking up into the L3 (IP) header. The router forwards the marked L3 header into subnet B. The L2 protocol used in subnet B does not support congestion notification, but the signal proceeds across it in the L3 header.¶
Note that there is no implication that each 'C' marking is encoded the same; a different encoding might be used for the 'C' marking in each protocol.¶
Finally, for completeness, we show the L3 marking arriving at the destination, where the host transport protocol (e.g., TCP) feeds it back to the source in the L4 acknowledgement (the 'C' at L4 in the packet at the top of the diagram).¶
_ _ _ /_______ | | |C| ACK Packet (V) \ |_|_|_| +---+ layer: 2 3 4 header +---+ | <|<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Packet V <<<<<<<<<<<<<|<< |L4 | | +---+ | ^ | | | . . . . . . Packet U. . | >>|>>> Packet U >>>>>>>>>>>>|>^ |L3 | | +---+ +---+ | ^ | +---+ +---+ | | | | | *|>>>>>|>>>|>>>>>|>^ | | | | | | |L2 |___|_____|___|_____|___|_____|___|_____|___|_____|___|_____|___| source subnet A router subnet B dest __ _ _ _| __ _ _ _| __ _ _| __ _ _ _| | | | | | | | | |C| | | |C| | | |C| | Data________\ |__|_|_|_| |__|_|_|_| |__|_|_| |__|_|_|_| Packet (U) / layer:4 3 2A 4 3 2A 4 3 4 3 2B header
Of course, modern networks are rarely as simple as this textbook example, often involving multiple nested layers. For example, a Third Generation Partnership Project (3GPP) mobile network may have two IP-in-IP GTP [GTPv1] tunnels in series and an MPLS backhaul between the base station and the first router. Nonetheless, the example illustrates the general idea of feeding congestion notification forward then upward whenever a header is removed at the egress of a subnet.¶
Note that the Forward Explicit Congestion Notification (FECN) bit in Frame Relay [Buck00] and the Explicit Forward Congestion Indication (EFCI) [ITU-T.I.371] bit in ATM user data cells follow a feed-forward pattern. However, in ATM, this arrangement is only part of a feed-forward-and-backward pattern at the lower layer, not feed-forward-and-up out of the lower layer -- the intention was never to interface with IP-ECN at the subnet egress. To our knowledge, Frame Relay FECN is solely used by network operators to detect where they should provision more capacity.¶
Ethernet is particularly difficult to extend incrementally to support congestion notification. One way is to use so-called 'Layer 3 switches'. These are Ethernet switches that dig into the Ethernet payload to find an IP header and manipulate or act on certain IP fields (specifically Diffserv and ECN). For instance, in Data Center TCP [RFC8257], Layer 3 switches are configured to mark the ECN field of the IP header within the Ethernet payload when their output buffer becomes congested. With respect to switching, a Layer 3 switch acts solely on the addresses in the Ethernet header; it does not use IP addresses and it does not decrement the TTL field in the IP header.¶
_ _ _ /_______ | | |C| ACK packet (V) \ |_|_|_| +---+ layer: 2 3 4 header +---+ | <|<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Packet V <<<<<<<<<<<<<|<< |L4 | | +---+ | ^ | | | . . . >>>> Packet U >>>|>>>|>>> Packet U >>>>>>>>>>>>|>^ |L3 | | +--^+ +---+ | v| +---+ +---+ | ^ | | | | *| | | | >|>>>>>|>>>|>>>>>|>>>|>>>>>|>^ |L2 |___|_____|___|_____|___|_____|___|_____|___|_____|___|_____|___| source subnet E router subnet F dest __ _ _ _| __ _ _ _| __ _ _| __ _ _ _| | | | | | | | |C| | | | |C| | | |C|C| Data________\ |__|_|_|_| |__|_|_|_| |__|_|_| |__|_|_|_| Packet (U) / layer:4 3 2 4 3 2 4 3 4 3 2 header
By comparing Figure 2 with Figure 1, it can be seen that subnet E (perhaps a subnet of Layer 3 Ethernet switches) works in feed-up-and-forward mode by notifying congestion directly into L3 at the point of congestion, even though the congested switch does not otherwise act at L3. In this example, the technology in subnet F (e.g., MPLS) does support ECN. So, when the router adds the Layer 2 header, it copies the ECN marking from L3 to L2 as well, as shown by the 'C's in both layers.¶
In some Layer 2 technologies, congestion notification has been defined for use internally within the subnet with its own feedback and load regulation but the interface with IP for ECN has not been defined.¶
For instance, the relative rate mechanism was one of the more popular ways to manage traffic for the Available Bit Rate (ABR) service in ATM, and it tended to supersede earlier designs. In this approach, ATM switches send special resource management (RM) cells in both the forward and backward directions to control the ingress rate of user data into a virtual circuit. If a switch buffer is approaching congestion or is congested, it sends an RM cell back towards the ingress with respectively the No Increase (NI) or Congestion Indication (CI) bit set in its message type field [ATM-TM-ABR]. The ingress then holds or decreases its sending bit rate accordingly.¶
_ _ _ /_______ | | |C| ACK packet (X) \ |_|_|_| +---+ layer: 2 3 4 header +---+ | <|<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Packet X <<<<<<<<<<<<<|<< |L4 | | +---+ | ^ | | | | *|>>> Packet W >>>>>>>>>>>>|>^ |L3 | | +---+ +---+ | | +---+ +---+ | | | | | | | | | <|<<<<<|<<<|<(V)<|<<<| | |L2 | | . . | . |Packet U | . . | . | . . | . | . . | .*| . . | |L2 |___|_____|___|_____|___|_____|___|_____|___|_____|___|_____|___| source subnet G router subnet H dest __ _ _ _ __ _ _ _ __ _ _ __ _ _ _ later | | | | | | | | | | | | | | | | |C| | data________\ |__|_|_|_| |__|_|_|_| |__|_|_| |__|_|_|_| packet (W) / 4 3 2 4 3 2 4 3 4 3 2 _ /__ |C| Feedback control \ |_| cell/frame (V) 2 __ _ _ _ __ _ _ _ __ _ _ __ _ _ _ earlier | | | | | | | | | | | | | | | | | | | data________\ |__|_|_|_| |__|_|_|_| |__|_|_| |__|_|_|_| packet (U) / layer: 4 3 2 4 3 2 4 3 4 3 2 header
ATM's feed-backward approach does not fit well when layered beneath IP's feed-forward approach unless the initial data source is the same node as the ATM ingress. Figure 3 shows the feed-backward approach being used in subnet H. If the final switch on the path is congested (*), it does not feed forward any congestion indications on the packet (U). Instead, it sends a control cell (V) back to the router at the ATM ingress.¶
However, the backward feedback does not reach the original data source directly because IP does not support backward feedback (and subnet G is independent of subnet H). Instead, the router in the middle throttles down its sending rate, but the original data sources don't reduce their rates. The resulting rate mismatch causes the middle router's buffer at layer 3 to back up until it becomes congested, which it signals forwards on later data packets at layer 3 (e.g., packet W). Note that the forward signal from the middle router is not triggered directly by the backward signal. Rather, it is triggered by congestion resulting from the middle router's mismatched rate response to the backward signal.¶
In response to this later forward signalling, end-to-end feedback at layer 4 finally completes the tortuous path of congestion indications back to the origin data source as before.¶
Quantized Congestion Notification (QCN) [IEEE802.1Q] would suffer from similar problems if extended to multiple subnets. However, QCN was clearly characterized as solely applicable to a single subnet from the start (see Section 6).¶
Link- and physical-layer resources are often 'non-blocking' by design. Congestion notification may be implemented in these cases, but it does not need to be deployed at the lower layer; ECN in IP would be sufficient.¶
A degenerate example is a point-to-point Ethernet link. Excess loading of the link merely causes the queue from the higher layer to back up, while the lower layer remains immune to congestion. Even a whole meshed subnetwork can be made immune to interior congestion by limiting ingress capacity and sufficient sizing of interior links, e.g., a non-blocking fat-tree network [Leiserson85]. An alternative to fat links near the root is numerous thin links with multi-path routing to ensure even worst-case patterns of load cannot congest any link, e.g., a Clos network [Clos53].¶
Feed-forward-and-up is the mode already used for signalling ECN up the layers through MPLS into IP [RFC5129] and through IP-in-IP tunnels [RFC6040], whether encapsulating with IPv4 [RFC2003], IPv6 [RFC2473], or IPsec [RFC4301]. These RFCs take a consistent approach and the following guidelines are designed to ensure this consistency continues as ECN support is added to other protocols that encapsulate IP. The guidelines are also designed to ensure compliance with the more general best current practice for the design of alternate ECN schemes given in [RFC4774] and extended by [RFC8311].¶
The rest of this section is structured as follows:¶
The subsequent sections give guidelines for adding congestion notification to a subnet technology that uses feed-forward-and-up mode like IP, but it is not so similar to IP that [RFC6040] rules can be applied directly. Specifically:¶
A common pattern for many tunnelling protocols is to encapsulate an inner IP header with a shim header(s) then an outer IP header. A shim header is defined as one that is not sufficient alone to forward the packet as an outer header. Another common pattern is for a shim to encapsulate an L2 header, which in turn encapsulates (or might encapsulate) an IP header. [RFC9601] clarifies that [RFC6040] is just as applicable when there are shims and even an L2 header between two IP headers.¶
However, it is not always feasible or necessary to propagate ECN between IP headers when separated by a shim. For instance, it might be too costly to dig to arbitrary depths to find an inner IP header, there may be little or no congestion within the tunnel by design (see null mode in Section 3.4 above), or a legacy implementation might not support ECN. In cases where a tunnel does not support ECN, it is important that the ingress does not copy the ECN field from an inner IP header to an outer. Therefore Section 4 of [RFC9601] requires network operators to configure the ingress of a tunnel that does not support ECN so that it zeros the ECN field in the outer IP header.¶
Nonetheless, in many cases it is feasible to propagate the ECN field between IP headers separated by shim headers and/or an L2 header. Particularly in the typical case when the outer IP header and the shim(s) are added (or removed) as part of the same procedure. Even if a shim encapsulates an L2 header, it is often possible to find an inner IP header within the L2 PDU and propagate ECN between that and the outer IP header. This can be thought of as a special case of the feed-up-and-forward mode (Section 3.2), so the guidelines for this mode apply (Section 5).¶
Numerous shim protocols have been defined for IP tunnelling. More recent ones, e.g., Geneve [RFC8926] and Generic UDP Encapsulation (GUE) [INTAREA-GUE] cite and follow [RFC6040]. Some earlier ones, e.g., CAPWAP [RFC5415] and LISP [RFC9300], cite [RFC3168], which is compatible with [RFC6040].¶
However, as Section 9.3 of [RFC3168] pointed out, ECN support needs to be defined for many earlier shim-based tunnelling protocols, e.g., L2TPv2 [RFC2661], L2TPv3 [RFC3931], GRE [RFC2784], PPTP [RFC2637], GTP [GTPv1] [GTPv1-U] [GTPv2-C], and Teredo [RFC4380], as well as some recent ones, e.g., VXLAN [RFC7348], NVGRE [RFC7637], and NSH [RFC8300].¶
All these IP-based encapsulations can be updated in one shot by simple reference to [RFC6040]. However, it would not be appropriate to update all these protocols from within the present guidance document. Instead, a companion specification [RFC9601] has the appropriate Standards Track status to update Standards Track protocols. For those that are not under IETF change control [RFC9601] can only recommend that the relevant body updates them.¶
This section is intended to guide the redesign of any lower-layer protocol that encapsulates IP to add built-in congestion notification support at the lower layer using feed-forward-and-up mode. It reflects the approaches used in [RFC6040] and in [RFC5129]. Therefore, IP-in-IP tunnels or IP-in-MPLS or MPLS-in-MPLS encapsulations that already comply with [RFC6040] or [RFC5129] will already satisfy this guidance.¶
A lower-layer (or subnet) congestion notification system:¶
SHOULD NOT apply explicit congestion notifications to PDUs if the egress of the subnet might not propagate congestion notification onward into the higher layer.¶
We use the term ECN-PDU for a PDU on a feedback loop that will propagate congestion notification properly because it meets both the above criteria. Additionally, a Not-ECN-PDU is a PDU on a feedback loop that does not meet at least one of the criteria, and therefore will not propagate congestion notification properly. A corollary of the above is that a lower-layer congestion notification protocol:¶
Note that there is no need for all interior nodes within a subnet to be able to mark congestion explicitly. A mix of drop and explicit congestion signals from different nodes is fine. However, if any interior nodes might generate congestion markings, Guideline 2 above says that all relevant egress nodes SHOULD be able to propagate those markings up to the higher layer.¶
In IP, if the ECN field in each PDU is cleared to the Not ECN-Capable Transport (Not-ECT) codepoint, it indicates that the L4 transport will not understand congestion markings. A congested buffer must not mark these Not-ECT PDUs; therefore, it has to signal congestion by increasingly applying drop instead.¶
The mechanism a lower layer uses to distinguish the ECN capability of PDUs need not mimic that of IP. The above guidelines merely say that the lower-layer system as a whole should achieve the same outcome. For instance, ECN-capable feedback loops might use PDUs that are identified by a particular set of labels or tags. Alternatively, logical-link protocols that use flow state might determine whether a PDU can be congestion marked by checking for ECN support in the flow state. Other protocols might depend on out-of-band control signals.¶
The per-domain checking of ECN support in MPLS [RFC5129] is a good example of a way to avoid sending congestion markings to L4 transports that will not understand them without using any header space in the subnet protocol.¶
In MPLS, header space is extremely limited; therefore, [RFC5129] does not provide a field in the MPLS header to indicate whether the PDU is an ECN-PDU or a Not-ECN-PDU. Instead, interior nodes in a domain are allowed to set explicit congestion indications without checking whether the PDU is destined for a L4 transport that will understand them. Nonetheless, this is made safe by requiring that the network operator upgrades all decapsulating edges of a whole domain at once as soon as even one switch within the domain is configured to mark rather than drop some PDUs during congestion. Therefore, any edge node that might decapsulate a packet will be capable of checking whether the higher-layer transport is ECN-capable. When decapsulating a CE-marked packet, if the decapsulator discovers that the higher layer (inner header) indicates the transport is not ECN-capable, it drops the packet -- effectively on behalf of the earlier congested node (see Decapsulation Guideline 1 in Section 4.4).¶
It was only appropriate to define such an incremental deployment strategy because MPLS is targeted solely at professional operators who can be expected to ensure that a whole subnetwork is consistently configured. This strategy might not be appropriate for other link technologies targeted at zero-configuration deployment or deployment by the general public (e.g., Ethernet). For such 'plug-and-play' environments, it will be necessary to invent a fail-safe approach that ensures congestion markings will never fall into black holes, no matter how inconsistently a system is put together. Alternatively, congestion notification relying on correct system configuration could be confined to flavours of Ethernet intended only for professional network operators, such as Provider Backbone Bridges (PBB) ([IEEE802.1Q]; previously 802.1ah).¶
ECN support in TRansparent Interconnection of Lots of Links (TRILL) [RFC9600] provides a good example of how to add congestion notification to a lower-layer protocol without relying on careful and consistent operator configuration. TRILL provides an extension header word with space for flags of different categories depending on whether logic to understand the extension is critical. The congestion-experienced marking has been defined as a 'critical ingress-to-egress' flag. So, if a transit RBridge sets this flag on a frame and an egress RBridge does not have any logic to process it, the egress RBridge will drop the frame, which is the desired default action anyway. Therefore, TRILL RBridges can be updated with support for congestion notification in no particular order and, at the egress of the TRILL campus, congestion notification will be propagated to IP as ECN whenever ECN logic has been implemented at the egress, or as drop otherwise.¶
QCN [IEEE802.1Q] is not intended to extend beyond a single subnet or interoperate with IP-ECN. Nonetheless, the way QCN indicates to lower-layer devices that the endpoints will not understand QCN provides another example that a lower-layer protocol designer might be able to mimic for their scenario. An operator can define certain Priority Code Points (PCPs [IEEE802.1Q]; previously 802.1p) to indicate non-QCN frames. Then an ingress bridge has to map each arriving not-QCN-capable IP packet to one of these non-QCN PCPs.¶
When drop for non-ECN traffic is deferred to the egress of a subnet, it cannot necessarily be assumed that one congestion mark is equivalent to one drop, as was originally required by [RFC3168]. [RFC8311] updated [RFC3168] to allow experimentation with congestion markings that are not equivalent to drop, particularly for L4S [RFC9331]. ECN support in TRILL [RFC9600] is a good example of a way to defer drop to the egress of a subnet both when marks are equivalent to drops (as in [RFC3168]) and when they are not (as in L4S). The ECN scheme for MPLS [RFC5129] was defined before L4S, so it only currently supports deferred drop that is equivalent to ECN marking. Nonetheless, in principle, MPLS (and potentially future L2 protocols) could support L4S marking by copying TRILL's approach for determining the drop level of any non-ECN traffic at the subnet egress.¶
This section is intended to guide the redesign of any node that encapsulates IP with a lower-layer header when adding built-in congestion notification support to the lower-layer protocol using feed-forward-and-up mode. It reflects the approaches used in [RFC6040] and [RFC5129]. Therefore, IP-in-IP tunnels or IP-in-MPLS or MPLS-in-MPLS encapsulations that already comply with [RFC6040] or [RFC5129] will already satisfy this guidance.¶
Egress Capability Check: A subnet ingress needs to be sure that the corresponding egress of a subnet will propagate any congestion notification added to the outer header across the subnet. This is necessary in addition to checking that an incoming PDU indicates an ECN-capable (L4) transport. Examples of how this guarantee might be provided include:¶
Standard Congestion Monitoring Baseline: Once the ingress to a subnet has established that the egress will correctly propagate ECN, on encapsulation, it SHOULD encode the same level of congestion in outer headers as is arriving in incoming headers. For example, it might copy any incoming congestion notifications into the outer header of the lower-layer protocol.¶
This ensures that bulk congestion monitoring of outer headers (e.g., by a network management node monitoring congestion markings in passing frames) will measure congestion accumulated along the whole upstream path, starting from the Load Regulator and not just starting from the ingress of the subnet. A node that is not the Load Regulator SHOULD NOT re-initialize the level of CE markings in the outer header to zero.¶
It would still also be possible to measure congestion introduced across one subnet (or tunnel) by subtracting the level of CE markings on inner headers from that on outer headers (see Appendix C of [RFC6040]). For example:¶
As long as subnet and tunnel technologies use the standard congestion monitoring baseline in this guideline, monitoring systems will know to use the former approach rather than having to 'somehow know' which approach to use.¶
This section is intended to guide the redesign of any node that decapsulates IP from within a lower-layer header when adding built-in congestion notification support to the lower-layer protocol using feed-forward-and-up mode. It reflects the approaches used in [RFC6040] and in [RFC5129]. Therefore, IP-in-IP tunnels or IP-in-MPLS or MPLS-in-MPLS encapsulations that already comply with [RFC6040] or [RFC5129] will already satisfy this guidance.¶
A subnet egress SHOULD NOT simply copy congestion notifications from outer headers to the forwarded header. It SHOULD calculate the outgoing congestion notification field from the inner and outer headers using the following guidelines. If there is any conflict, rules earlier in the list take precedence over rules later in the list.¶
If the arriving inner header is a Not-ECN-PDU, it implies the L4 transport will not understand explicit congestion markings. Then:¶
Congestion indications might be encoded by a severity level. For instance, increasing levels of congestion might be encoded by numerically increasing indications, e.g., PCN can be encoded in each PDU at three severity levels in IP or MPLS [RFC6660] and the default encapsulation and decapsulation rules [RFC6040] are compatible with this interpretation of the ECN field.¶
If the arriving inner header is an ECN-PDU, where the inner and outer headers carry indications of congestion of different severity, the more severe indication SHOULD be forwarded in preference to the less severe.¶
The inner and outer headers might carry a combination of congestion notification fields that should not be possible given any currently used protocol transitions. For instance, if Encapsulation Guideline 3 in Section 4.3 had been followed, it should not be possible to have a less severe indication of congestion in the outer header than in the inner header. It MAY be appropriate to log unexpected combinations of headers and possibly raise an alarm.¶
If a safe outgoing codepoint can be defined for such a PDU, the PDU SHOULD be forwarded rather than dropped. Some implementers discard PDUs with currently unused combinations of headers just in case they represent an attack. However, an approach using alarms and policy-mediated drop is preferable to hard-coded drop so that operators can keep track of possible attacks, but currently unused combinations are not precluded from future use through new standards actions.¶
In some deployments, particularly in 3GPP networks, an IP packet may traverse two or more IP-in-IP tunnels in sequence that all use identical technology (e.g., GTP).¶
In such cases, it would be sufficient for every encapsulation and decapsulation in the chain to comply with [RFC6040]. Alternatively, as an optimization, a node that decapsulates a packet and immediately re-encapsulates it for the next tunnel MAY copy the incoming outer ECN field directly to the outgoing outer header and the incoming inner ECN field directly to the outgoing inner header. Then, the overall behaviour across the sequence of tunnel segments would still be consistent with [RFC6040].¶
Appendix C of [RFC6040] describes how a tunnel egress can monitor how much congestion has been introduced within a tunnel. A network operator might want to monitor how much congestion had been introduced within a whole sequence of tunnels. Using the technique in Appendix C of [RFC6040] at the final egress, the operator could monitor the whole sequence of tunnels, but only if the above optimization were used consistently along the sequence of tunnels, in order to make it appear as a single tunnel. Therefore, tunnel endpoint implementations SHOULD allow the operator to configure whether this optimization is enabled.¶
When congestion notification support is added to a subnet technology, consideration SHOULD be given to a similar optimization between subnets in sequence if they all use the same technology.¶
The guidance in this section is worded in terms of framing boundaries, but it applies equally whether the PDUs are frames, cells, or packets.¶
Where an AQM marks the ECN field of IP packets as they queue into a Layer 2 link, there will be no problem with framing boundaries because the ECN markings would be applied directly to IP packets. The guidance in this section is only applicable where a congestion notification capability is being added to a Layer 2 protocol so that Layer 2 frames can be marked by an AQM at layer 2. This would only be necessary where AQM will be applied at pure Layer 2 nodes (without IP awareness).¶
Where congestion marking has had to be applied at non-IP-aware nodes and framing boundaries do not necessarily align with packet boundaries, the decapsulating IP forwarding node SHOULD propagate congestion markings from Layer 2 frame headers to IP packets that may have different boundaries as a consequence of reframing.¶
Two possible design goals for propagating congestion indications, described in Section 5.3 of [RFC3168] and Section 2.4 of [RFC7141], are:¶
In either case, an implementation SHOULD ensure that any new incoming congestion indication is propagated immediately; not held awaiting the possibility of further congestion indications to be sufficient to indicate congestion on an outgoing PDU [RFC7141]. Nonetheless, to facilitate pipelined implementation, it would be acceptable for congestion marks to propagate to a slightly later IP packet.¶
At decapsulation in either case:¶
The following are two ways that goal 1 might be achieved, but they are not intended to be the only ways:¶
The following gives one way that goal 2 might be achieved, but it is not intended to be the only way:¶
Generally, relative to the number of IP PDUs, the number of L2 frames may be higher (e.g., ATM), roughly the same, or lower (e.g., 802.11 aggregation at an L2-only station). This distinction may influence the choice of mechanism.¶
The guidance in this section is applicable, for example, when IP packets:¶
This guidance also generalizes to encapsulation by other subnet technologies with no built-in support for congestion notification at the lower layer, but with support for finding and processing an IP header. It is unlikely to be applicable or necessary for IP-in-IP encapsulation, where feed-forward-and-up mode based on [RFC6040] would be more appropriate.¶
Marking the IP header while switching at layer 2 (by using a Layer 3 switch) or while forwarding in a radio access network seems to represent a layering violation. However, it can be considered as a benign optimization if the guidelines below are followed. Feed-up-and-forward is certainly not a general alternative to implementing feed-forward congestion notification in the lower layer, because:¶
Nonetheless, configuring lower-layer equipment to look for an ECN field in an encapsulated IP header is a useful optimization. If the implementation follows the guidelines below, this optimization does not have to be confined to a controlled environment, e.g., within a data centre; it could usefully be applied in any network -- even if the operator is not sure whether the above issues will never apply:¶
It can be seen from Section 3.3 that congestion notification in a subnet using feed-backward mode has generally not been designed to be directly coupled with IP-layer congestion notification. The subnet attempts to minimize congestion internally, and if the incoming load at the ingress exceeds the capacity somewhere through the subnet, the Layer 3 buffer into the ingress backs up. Thus, a feed-backward mode subnet is in some sense similar to a null mode subnet, in that there is no need for any direct interaction between the subnet and higher-layer congestion notification. Therefore, no detailed protocol design guidelines are appropriate. Nonetheless, a more general guideline is appropriate:¶
A subnetwork technology intended to eventually interface to IP SHOULD NOT be designed using only the feed-backward mode, which is certainly best for a stand-alone subnet, but would need to be modified to work efficiently as part of the wider Internet because IP uses feed-forward-and-up mode.¶
The feed-backward approach at least works beneath IP, where the term 'works' is used only in a narrow functional sense because feed-backward can result in very inefficient and sluggish congestion control -- except if it is confined to the subnet directly connected to the original data source when it is faster than feed-forward. It would be valid to design a protocol that could work in feed-backward mode for paths that only cross one subnet, and in feed-forward-and-up mode for paths that cross subnets.¶
In the early days of TCP/IP, a similar feed-backward approach was tried for explicit congestion signalling using source-quench (SQ) ICMP control packets. However, SQ fell out of favour and is now formally deprecated [RFC6633]. The main problem was that it is hard for a data source to tell the difference between a spoofed SQ message and a quench request from a genuine buffer on the path. It is also hard for a lower-layer buffer to address an SQ message to the original source port number, which may be buried within many layers of headers and possibly encrypted.¶
QCN (also known as Backward Congestion Notification (BCN); see Sections 30-33 of [IEEE802.1Q], previously known as 802.1Qau) uses a feed-backward mode that is structurally similar to ATM's relative rate mechanism. However, QCN confines its applicability to scenarios such as some data centres where all endpoints are directly attached by the same Ethernet technology. If a QCN subnet were later connected into a wider IP-based internetwork (e.g., when attempting to interconnect multiple data centres) it would suffer the inefficiency shown in Figure 3.¶
This document has no IANA actions.¶
If a lower-layer wire protocol is redesigned to include explicit congestion signalling in-band in the protocol header, care SHOULD be taken to ensure that the field used is specified as mutable during transit. Otherwise, interior nodes signalling congestion would invalidate any authentication protocol applied to the lower-layer header -- by altering a header field that had been assumed as immutable.¶
The redesign of protocols that encapsulate IP in order to propagate congestion signals between layers raises potential signal integrity concerns. Experimental or proposed approaches exist for assuring the end-to-end integrity of in-band congestion signals, such as:¶
Congestion Exposure (ConEx) for networks:¶
Given these end-to-end approaches are already being specified, it would make little sense to attempt to design hop-by-hop congestion signal integrity into a new lower-layer protocol because end-to-end integrity inherently achieves hop-by-hop integrity.¶
Section 6 gives vulnerability to spoofing as one of the reasons for deprecating feed-backward mode.¶
Following the guidance in this document enables ECN support to be extended consistently to numerous protocols that encapsulate IP (IPv4 and IPv6) so that IP continues to fulfil its role as an end-to-end interoperability layer. This includes:¶
Guidelines have been defined for supporting propagation of ECN between Ethernet and IP on so-called Layer 3 Ethernet switches using a 'feed-up-and-forward' mode. This approach could enable other subnet technologies to pass ECN signals into the IP layer, even if they do not support ECN.¶
Finally, attempting to add congestion notification to a subnet technology in feed-backward mode is deprecated except in special cases due to its likely sluggish response to congestion.¶
Thanks to Gorry Fairhurst and David Black for extensive reviews. Thanks also to the following reviewers: Joe Touch, Andrew McGregor, Richard Scheffenegger, Ingemar Johansson, Piers O'Hanlon, Donald Eastlake 3rd, Jonathan Morton, Markku Kojo, Sebastian Möller, Martin Duke, and Michael Welzl, who pointed out that lower-layer congestion notification signals may have different semantics to those in IP. Thanks are also due to the Transport and Services Working Group (tsvwg) chairs, TSV ADs and IETF liaison people such as Eric Gray, Dan Romascanu and Gonzalo Camarillo for helping with the liaisons with the IEEE and 3GPP. And thanks to Georg Mayer and particularly to Erik Guttman for the extensive search and categorization of any 3GPP specifications that cite ECN specifications. Thanks also to the Area Reviewers Dan Harkins, Paul Kyzivat, Sue Hares, and Dale Worley.¶
Bob Briscoe was part-funded by the European Community under its Seventh Framework Programme through the Trilogy project (ICT-216372) for initial drafts then through the Reducing Internet Transport Latency (RITE) project (ICT-317700), and for final drafts (from -18) he was funded by Apple Inc. The views expressed here are solely those of the authors.¶
Pat was a coauthor of this document, but retired before its publication.¶