Point-to-Point Protocol: A proposal for multi-protocol transmission of datagrams over Point-to-Point links
obsoleted by
- rfc-1171 — Point-to-Point Protocol for the transmission of multi-protocol datagrams over Point-to-Point links
Extracted elements (30)
PPP uses HDLC (ISO 3309-1979) as its framing basis, extended by ISO 3309:1984/PDAD1 to support asynchronous (start/stop) environments. This choice leverages widely standardized procedures and makes PPP consistent with CCITT X.25 LAPB, facilitating implementation on existing hardware.
The Protocol field encoding rules (odd value, LSB of MSB = 0) are chosen to be consistent with the ISO 3309 extension mechanism for Address fields, allowing the Protocol field to coexist with HDLC framing without ambiguity and enabling transparent multiplexing of multiple network-layer protocols.
PPP is designed for version differentiation via new Data Link Layer Protocol field values rather than a version field within LCP packets. A correctly functioning Version 1 implementation will always respond to unknown Protocol values with a recognizable Version 1 packet, providing a deterministic fallback mechanism.
The Configure-Reject mechanism distinguishes unrecognized options (reject outright, do not include in next Configure-Request) from unacceptable-but-recognized option values (nak with an acceptable value, retransmit with adjusted value). Implementations must handle both cases distinctly.
A LCP implementation wishing to open a connection MUST transmit a Configure-Request (Code=1) packet. Upon reception of a Configure-Request, an appropriate reply MUST be transmitted. The Restart timer is started after transmission to guard against packet loss.
All Protocol field values MUST be odd (LSB of least significant octet equals 1) and MUST be assigned such that the LSB of the most significant octet equals 0. This is consistent with the ISO 3309 extension mechanism for Address fields. Frames not complying with these rules should be treated as having an unrecognized Protocol.
In a Configure-Nak (Code=3), each of the nak'd Configuration Options MUST be modified to a value acceptable to the sender, and options MUST NOT be reordered. Configure-Nak is used to refuse a specific option value while suggesting an acceptable alternative; Configure-Reject is used to refuse negotiation of an option entirely.
Max-Restart MUST be a configurable parameter governing how many times a Terminate-Request is retransmitted before the Closing state transitions to Closed without receiving a Terminate-Ack.
Reception of a LCP packet with an unknown Code MUST be reported back to the sender via a Code-Reject packet (Code=7) containing the rejected packet in the Rejected-Packet field. Upon receiving a Code-Reject, the implementation should immediately transition to the Closed state, as this is an unrecoverable error.
Regardless of which Configuration Options are enabled, all LCP packets MUST always be sent in the full, standard form as if no options were enabled. This ensures Configure-Request packets are always recognizable even when one end mistakenly believes the link is Open.
The Configuration Options in a Configure-Ack MUST NOT be reordered or modified in any way from those received in the Configure-Request. Invalid Configure-Ack packets (wrong Identifier or options mismatch) should be silently discarded.
The Magic-Number field in Echo-Request, Echo-Reply, and Discard-Request packets MUST always be transmitted as zero and MUST always be ignored on reception unless modified by a Configuration Option. It is used for loopbacked link detection.
The Restart timer MUST be configurable but should default to 3 seconds. Max-Restart (maximum retransmissions before declaring livelock) MUST also be configurable but should default to 10 retransmissions. Any loop detection timeout MUST be configurable.
Upon reception of a Terminate-Request (Code=5), a LCP implementation MUST transmit a Terminate-Ack (Code=6) with the Identifier field copied from the Terminate-Request. Reception of an unelicited Terminate-Ack indicates the connection has been closed.
Upon reception of an Echo-Request (Code=9), a LCP implementation MUST transmit an Echo-Reply (Code=10) with the Identifier and Data fields copied from the request. Echo-Request and Echo-Reply packets may only be sent in the LCP Open state.
When the LCP state machine is in the Open state and a frame with an unknown Protocol is received, a Protocol-Reject (Code=8) MUST be transmitted. Protocol-Reject packets may only be sent in the LCP Open state; those received in any other state should be discarded.
Asynchronous HDLC uses character stuffing: the Control Escape octet 0x7d causes the following octet to have bit 6 complemented (XOR with 0x20). All octets with values 0x7e, 0x7d, and any octet below 0x20 are escaped. This allows all ASCII control characters except DEL to be transparently transmitted.
LCP goes through four distinct phases: (1) Link Establishment and Configuration Negotiation (LCP Configure exchange), (2) optional Link Quality Determination, (3) Network-Layer Protocol Configuration via NCP, and (4) Link Termination. No network-layer datagrams may be exchanged until LCP reaches the Open state.
LCP packet types are: 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).
PPP is composed of three main components: (1) a method for encapsulating datagrams over serial links using HDLC as a basis, (2) an extensible Link Control Protocol (LCP) to establish, configure, and test the data-link connection, and (3) a family of Network Control Protocols (NCP) for establishing and configuring different network-layer protocols simultaneously.
The Address field is a single octet containing 0xff (All-Stations address). PPP does not assign individual station addresses; frames with other address values should be silently discarded.
The Control field is a single octet containing 0x03, the Unnumbered Information (UI) command with P/F bit set to zero. Frames with other Control field values should be silently discarded.
The IP Control Protocol (IPCP, Protocol=0x8021) is an NCP that configures, enables, and disables IP on both ends of the link. IPCP uses the same packet format as LCP but only Codes 1-7 are valid; IP datagrams may not be sent until both LCP and IPCP reach the Open state.
Security issues are not addressed in this memo. The RFC explicitly states 'Security issues are not addressed in this memo,' leaving authentication, encryption, and integrity protection to Configuration Options (such as the reserved User/Password Authentication Protocol at 0xc023) defined in separate documents.
The LCP automaton defines 7 states: Closed (1), Listen (2), Req-Sent (3), Ack-Rcvd (4), Ack-Sent (5), Open (6), Closing (7). Transitions are triggered by events including Active-Open, Passive-Open, Close, Timeout, Physical-Layer-Down, and receipt of Configure-Request/Ack/Nak, Terminate-Request/Ack, Code-Reject, Unknown-Code, and Echo-Request packets.
Configuration Options use a TLV encoding: Type (1 octet), Length (1 octet, includes Type and Length fields), and variable-length Data. Options apply in half-duplex fashion and should not appear more than once in a list unless the specific option overrides this rule.
LCP packets use a common header: Code (1 octet, identifies packet type 1-11), Identifier (1 octet, matches requests and replies), Length (2 octets, total packet length including header), and variable-length Data. Octets outside the Length range are treated as Data Link Layer padding and ignored.
The FCS field is normally 16 bits (2 octets), calculated over the Address, Control, Protocol, and Information fields, excluding flags, start/stop bits, and transparency-inserted octets. By prior agreement, a 32-bit (4-octet) FCS may be used for improved error detection.
The PPP frame format consists of: Flag (1 octet, 0x7e), Address (1 octet, 0xff), Control (1 octet, 0x03), Protocol (2 octets), Information (variable, default max 1500 octets), FCS (2 octets, optionally 4), and closing Flag (0x7e). Fields are transmitted left to right.
The Protocol field is 2 octets identifying the encapsulated protocol. Values in the 0x0xxx range identify network-layer data (e.g., 0x0021 = IP), 0x8xxx identifies NCP packets (e.g., 0x8021 = IPCP), and 0xcxxx identifies LCP/associated protocols (0xc021 = LCP). The Protocol field is transmitted most significant octet first.