The Point-to-Point Protocol (PPP) for the Transmission of Multi-protocol Datagrams over Point-to-Point Links
Extracted elements (29)
Configuration Options apply in a half-duplex fashion by design — when negotiated, they apply to only one direction of the link (typically the receive direction of the Configure-Request sender). This allows asymmetric link configurations.
LCP has no version field in the packet format. If a new version of LCP is needed, the design intention is to use a new Data Link Layer Protocol field value to differentiate versions. A correctly functioning LCP v1 implementation will respond to unknown Protocols with a recognizable v1 packet, providing a deterministic fallback for other version implementations.
The state transition table was redesigned from previous versions, which used a simplified non-deterministic FSA with detailed semantics that led to interoperability problems from differing interpretations. The current table expands up/down flags to explicit states and eliminates the active/passive paradigm, believed to interoperate with previous versions better than those versions interoperated with each other.
The Address field MUST always be the All-Stations address (0xFF) and MUST always be recognized. Frames with unrecognized Addresses SHOULD be silently discarded. The Control field MUST always be 0x03 (UI command); frames with other Control values SHOULD be silently discarded. Both may be compressed via LCP negotiation.
When an Open command is executed in the Opened, Closing, Stopping, or Stopped states (indicating a user's desire to renegotiate), the recommended implementation is to issue a Down event immediately followed by an Up event, causing link renegotiation without harmful side effects.
All LCP Link Configuration, Link Termination, and Code-Reject packets (codes 1–7) MUST always be sent in full standard form regardless of which Configuration Options are enabled, ensuring Configure-Request packets are always recognizable.
All Protocol field values MUST be odd (LSB of least significant octet = 1), and the LSB of the most significant octet MUST equal 0. Frames received which do not comply MUST be treated as having an unrecognized Protocol and handled by LCP.
Any non-LCP packets received during the Link Establishment phase MUST be silently discarded. All Configuration Options are assumed to be at default values unless altered by the LCP configuration exchange.
Each Nak'd Configuration Option in a Configure-Nak MUST be modified to a value acceptable to the sender. Boolean options (no value fields) MUST use Configure-Reject instead. Options MUST NOT be reordered within the Configure-Nak.
If an implementation requires authentication, it MUST negotiate the use of that authentication protocol during Link Establishment. Advancement to the Network-Layer Protocol phase MUST NOT occur until the peer is successfully authenticated; on failure, PPP SHOULD proceed to Link Termination.
Once PPP finishes the Authentication phase, each network-layer protocol MUST be separately configured by the appropriate NCP. Network-layer protocol packets received when the corresponding NCP is not in the Opened state SHOULD be silently discarded.
PPP links MUST be full-duplex, but MAY be either dedicated or circuit-switched. PPP operates over both synchronous and asynchronous serial links with 8 data bits and no parity.
The Configure-Ack Options field MUST NOT be reordered or modified in any way from the received Configure-Request. On reception, the Identifier field must match the last transmitted Configure-Request, and options must exactly match.
The Restart timer MUST be configurable, but MAY default to 3 seconds. Max-Terminate MUST be configurable (default 2). Max-Configure MUST be configurable (default 10). Max-Failure MUST be configurable (default 10); when exceeded, further Configure-Naks are converted to Configure-Rejects.
Upon reception of a packet with an unknown LCP Code, the implementation MUST transmit a Code-Reject (Code=7) with the inducing packet copied to the Rejected-Information field, truncated to the peer's established maximum Information field length.
Upon reception of an Echo-Request, a LCP implementation MUST transmit an Echo-Reply with the Identifier copied, the local Magic-Number inserted, and the Data field copied from the Echo-Request. Echo-Request/Reply packets received outside the LCP Opened state SHOULD be silently discarded.
When LCP is in the Opened state and a frame with an unknown Protocol is received, the implementation MUST send a Protocol-Reject (Code=8). Upon receiving a Protocol-Reject, an implementation SHOULD stop transmitting frames of the indicated protocol. Protocol-Reject packets received outside the Opened state SHOULD be silently discarded.
LCP Configuration Options available for negotiation include: Maximum-Receive-Unit (1), Async-Control-Character-Map (2), Authentication-Protocol (3), Quality-Protocol (4), Magic-Number (5), Protocol-Field-Compression (7), and Address-and-Control-Field-Compression (8). Unrecognized or non-negotiable options are rejected via Configure-Reject.
LCP defines eleven packet types: Configure-Request (1), Configure-Ack (2), Configure-Nak (3), Configure-Reject (4), Terminate-Request (5), Terminate-Ack (6), Code-Reject (7), Protocol-Reject (8), Echo-Request (9), Echo-Reply (10), Discard-Request (11). Code 12 is RESERVED.
PPP link operation proceeds through five phases: Link Dead (physical layer not ready), Link Establishment (LCP negotiation), Authentication (optional peer authentication), Network-Layer Protocol (NCP configuration), and Link Termination. Each NCP may independently open and close during the Network-Layer Protocol phase.
The Magic-Number Configuration Option (Type=5, 6 octets total) provides a method to detect looped-back links. Each end selects a random Magic-Number; if the received Magic-Number matches the transmitted value, the link may be looped back. By default Magic-Number is zero and MUST be ignored on reception.
The Protocol field (2 octets) identifies the encapsulated network-layer protocol. Values 0x0000–0x3FFF are network-layer protocols; 0x8000–0xBFFF are associated NCPs; 0x4000–0x7FFF are low-volume protocols without NCPs; 0xC000–0xFFFF are link-layer control protocols (e.g., LCP at 0xC021). Protocol values must be assigned by IANA.
The PPP Protocol field values are assigned by IANA ([email protected]). Current assignments include network-layer protocols (0x0001–0x3FFF), associated NCPs (0x8000–0xBFFF), low-volume protocols (0x4000–0x7FFF), and link-layer control protocols (0xC000–0xFFFF). Developers of new protocols MUST obtain a number from IANA.
After exchange of Terminate packets, the implementation SHOULD signal the physical layer to disconnect, particularly in the case of authentication failure. The receiver of a Terminate-Request MUST NOT disconnect until at least one Restart time has passed after sending a Terminate-Ack.
PPP provides an Authentication phase where a peer must authenticate before network-layer protocol packets are exchanged. The authentication protocol (e.g., PAP at 0xC023 or CHAP at 0xC223) is negotiated via LCP during Link Establishment. On authentication failure, PPP SHOULD proceed to Link Termination.
The Option Negotiation Automaton defines ten states: Initial, Starting, Closed, Stopped, Closing, Stopping, Req-Sent, Ack-Rcvd, Ack-Sent, and Opened. Transitions are triggered by events including Up/Down (lower layer), Open/Close (administrative), Timeout (TO+/TO-), and receipt of LCP packets (RCR+/RCR-/RCA/RCN/RTR/RTA/RUC/RXJ+/RXJ-/RXR). The Opened state is reached when a Configure-Ack has both been sent and received.
LCP Configuration Options use a TLV format: Type (1 octet), Length (1 octet, total option length including Type and Length), and Data (variable). The end of the options list is indicated by the LCP packet length.
The LCP packet format consists of Code (1 octet, identifying packet type), Identifier (1 octet, for matching requests/replies), Length (2 octets, total packet length including Code/Identifier/Length/Data), and Data (variable). Encapsulated in PPP frames with Protocol field 0xC021.
The standard PPP frame consists of: Flag (0x7E, 1 octet), Address (0xFF, 1 octet), Control (0x03, 1 octet), Protocol (16 bits), Information (variable, default max 1500 octets), FCS (16 bits), and closing Flag (0x7E). Fields are transmitted left to right.