Pseudowire Emulation Edge-to-Edge (PWE3) Control Word for Use over an MPLS PSN
updated by
- rfc-5586 — MPLS Generic Associated Channel
Extracted elements (21)
The first nibble of 0000 (PWMCW) and 0001 (PWACH) were chosen specifically because all IPv4 and IPv6 packets begin with version nibble 4 or 6, ensuring LSRs performing MPLS payload inspection cannot mistake a PW packet for an IP packet, thereby avoiding unintended ECMP load-balancing.
The sequence number space is circular unsigned 16-bit excluding zero. Zero is reserved to signal that sequencing is disabled (or not determinable), allowing a receiver to distinguish between a legitimately zero-sequenced packet and one where sequencing is inactive without additional out-of-band signaling.
The use of any first nibble value other than 0 (PWMCW) or 1 (PWACH) for a PW packet carried over an MPLS PSN is deprecated, ensuring consistent behavior across MPLS LSRs that inspect payload content.
If a PE negotiated not to use receive sequence number processing and receives a non-zero sequence number, it SHOULD send a PW status message indicating a receive fault and disable the PW.
If a PW is sensitive to packet misordering and is carried over an MPLS PSN that uses MPLS payload contents to select the ECMP path, it MUST employ a mechanism that prevents packet misordering, such as the PWMCW for data or the PWACH for channel-associated traffic.
If the MPLS payload is less than 64 bytes, the Length field in the PWMCW MUST be set to the length of the PW payload plus the length of the PWMCW; otherwise the Length field MUST be set to zero.
If the transmitting PE does not support sequence number processing or sequencing is disabled, the sequence number field in the control word MUST be set to zero for all packets transmitted on the PW.
In the PWACH, bits 0–3 MUST be 0001 to distinguish the packet from an IP packet and from a PW data packet.
PW packets carried over an MPLS PSN MUST NOT start with the value 4 (IPv4) or the value 6 (IPv6) in the first nibble, as those values indicate normal IP payloads and would cause incorrect processing by LSRs performing MPLS payload inspection.
The PWMCW or the PWACH MUST immediately follow the bottom of the MPLS label stack.
When a PWMCW is used, it MUST adhere to the Generic format with bits 0–3 set to zero. It SHOULD also use the Preferred format (Flags, FRG, Length, Sequence Number) to provide consistency across PW designs.
When packet sequencing is enabled, the initial packet MUST be sent with sequence number one, subsequent packets MUST increment the sequence number by one, and the sequence number following 65535 is one (zero is skipped).
The Flags field (bits 4–7) in the Preferred PWMCW MAY be used for per-payload signaling; their semantics MUST be defined in the PW encapsulation specification. The FRG field (bits 8–9) is used for PW payload fragmentation.
The Length field (bits 10–15) in the Preferred PWMCW allows a CE-bound PE to determine the size of padding appended by an Ethernet segment in the PSN path, enabling correct extraction of the PW payload.
IANA maintains a registry of 'Pseudowire Associated Channel Types' (16-bit values) assigned using the 'IETF Consensus' policy. The value 0x21 indicates the Associated Channel carries an IPv4 packet; 0x57 indicates an IPv6 packet.
Any application using the PW Associated Channel MUST fully consider security issues and provide mechanisms to prevent an attacker from using the channel to disrupt PW or PE operation, or to use it as a conduit to deliver packets elsewhere.
If a PW has been configured to operate without a Control Word, the PW Associated Channel Type mechanism MUST NOT be used, to prevent user payloads from being fabricated to mimic the PWACH and attack applications using the Associated Channel.
Sequence number processing uses a circular unsigned 16-bit space (excluding zero). Initial expected sequence number is 1. On receipt: if sequence number is zero, treat as in-order; if equal to expected, in-order; if within 32767 ahead, implementaton MAY treat as in-order; if within 32768 behind (wrapping), MAY treat as in-order; otherwise out-of-order (drop or reorder at receiver discretion).
The Generic PW MPLS Control Word (PWMCW) is a 32-bit header where bits 0–3 are set to 0000, distinguishing it from IP payloads. The remaining bits 4–31 are specified by the PW encapsulation.
The Preferred PW MPLS Control Word is 32 bits: bits 0–3 are 0000, bits 4–7 are Flags, bits 8–9 are FRG (fragmentation), bits 10–15 are Length, and bits 16–31 are the Sequence Number.
The PW Associated Channel Header (PWACH) is 32 bits: bits 0–3 are 0001, bits 4–7 are Version (currently 0), bits 8–15 are Reserved (MUST be sent as 0, ignored on reception), and bits 16–31 are the Channel Type (from the IANA PW Associated Channel Type registry).