The Point-to-Point Protocol (PPP)
obsoleted by
- rfc-1661 — The Point-to-Point Protocol (PPP)
obsoletes
- rfc-1331 — The Point-to-Point Protocol (PPP) for the Transmission of Multi-protocol Datagrams over Point-to-Point Links
updated by
- rfc-1570 — PPP LCP Extensions
Extracted elements (30)
LCP Version 1 deliberately omits a version field from its packet format. If a new LCP version is needed, a new PPP Protocol field value will differentiate it from Version 1. A correctly functioning Version 1 implementation will respond to unknown Protocols with a recognizable Version 1 packet, providing a deterministic fallback.
Loop detection (Magic-Number option) is provided as an optional negotiated mechanism rather than mandatory, because some links (hard-wired, non-async) do not require it. The automaton also uses the Discard-Request and Echo-Request/Reply as data-link-layer loopback tools to assist in detecting loops without relying on network-layer protocols.
The Stopped state in the automaton combines what could be separate states for link termination, configuration failure, and other failure modes. This consolidation avoids complexity while handling a race condition between a Down event response and an incoming Configure-Request.
Configuration Options apply in a half-duplex fashion (typically in the receive direction of the Configure-Request sender). An implementation that does not include an optional feature MUST be prepared to interoperate with an implementation that does include it. Options not present in a Configure-Request are assumed to take their default values.
A Configure-Ack MUST copy Options unchanged and in order from the Configure-Request. On reception, the Identifier and Options in a Configure-Ack MUST exactly match the last transmitted Configure-Request; invalid packets are silently discarded.
A Configure-Nak MUST include only unacceptable options from the Configure-Request (with acceptable values suggested), MUST NOT reorder them, and MUST NOT include options with no value fields (those require Configure-Reject). When multiple instances of an option are acceptable, all acceptable values MUST be listed.
A Configure-Reject MUST include only unrecognizable or non-negotiable options from the Configure-Request, with options not reordered or modified. On reception, the options in a Configure-Reject MUST be a proper subset of those in the last transmitted Configure-Request.
Advancement from the Authentication phase to the Network-Layer Protocol phase MUST NOT occur until authentication has completed using the negotiated protocol. If authentication fails, PPP SHOULD proceed to the Link Termination phase.
After exchanging Terminate packets, the receiver of a Terminate-Request MUST NOT disconnect until at least one Restart time has passed after sending a Terminate-Ack. Any non-LCP packets received during Link Termination MUST be silently discarded.
All LCP Link Configuration, Link Termination, and Code-Reject packets (codes 1–7) MUST always be sent as if no Configuration Options were enabled, using default ACCM and no address/control/protocol field compression. This ensures LCP packets remain recognizable even when one end mistakenly believes the link is open.
All Protocol field values MUST be odd (least significant bit of the least significant octet MUST equal 1) and MUST be assigned such that the least significant bit of the most significant octet equals 0, consistent with ISO 3309 extension mechanism. Frames not complying MUST be treated as having an unrecognized Protocol.
Any non-LCP packets received during the Link Establishment phase MUST be silently discarded. Similarly, any NCP or network-layer packets received during the Authentication phase MUST be silently discarded.
Each end of a PPP link MUST first send LCP packets to configure and test the data link before any other traffic. After LCP Opened, PPP MUST send NCP packets to configure each desired network-layer protocol before that protocol's datagrams may be sent.
Network-layer protocol packets received when the corresponding NCP is not in the Opened state MUST be silently discarded. While LCP is Opened, any unsupported protocol MUST be returned in a Protocol-Reject.
New Protocol field values MUST be obtained from IANA ([email protected]). Developers of new protocols must not self-assign values.
Reception of a PPP packet with an unknown Protocol field while LCP is Opened MUST be reported via a Protocol-Reject packet with the Rejected-Protocol field set to the received Protocol value. Protocol-Reject packets received outside the LCP Opened state SHOULD be silently discarded.
Upon receiving a Configure-Request, the implementation MUST transmit an appropriate reply. Configuration Options SHOULD NOT be included in a Configure-Request with default values. The Identifier MUST be changed whenever the Options field content changes or a valid reply has been received.
Upon reception of a Terminate-Request, a Terminate-Ack MUST be transmitted with the Identifier copied from the request. Upon reception of a Protocol-Reject, the implementation MUST stop sending packets of the indicated protocol at the earliest opportunity.
The Async-Control-Character-Map option (Type=2, Length=6) is a 32-bit bitmask negotiating which control characters (octets below 0x20) must be escaped on asynchronous links. The default value is 0xffffffff (all control characters mapped); for non-async links the default is 0.
The Magic-Number option (Type=5, Length=6) provides a 32-bit random value used to detect looped-back links. If a received Configure-Request contains a Magic-Number equal to the local one, a loop is suspected and a Configure-Nak with a different Magic-Number is sent. A Magic-Number of zero disables loop detection.
The Maximum-Receive-Unit (MRU) option (Type=1, Length=4) specifies the maximum octets in the Information and Padding fields, defaulting to 1500 octets. Implementations MUST still be able to receive 1500-octet frames even when smaller packets are requested, in case link synchronization is lost.
The Protocol field uses value ranges to distinguish packet categories: 0x0000–0x3fff for network-layer protocols, 0x8000–0xbfff for associated NCPs, 0x4000–0x7fff for low-volume protocols without NCP, and 0xc000–0xffff for link-layer Control Protocols such as LCP (0xc021).
The Restart timer (default 3 seconds, MUST be configurable) guards against packet loss for Configure-Request and Terminate-Request retransmission. Max-Terminate defaults to 2, Max-Configure defaults to 10, and Max-Failure defaults to 10 (all MUST be configurable). When Max-Failure Configure-Naks are sent without a Configure-Ack, further Naks are converted to Configure-Rejects.
When authentication fails, the link SHOULD be terminated to prevent attack by repetition and denial of service. This is accomplished by simulating a Close event immediately followed by an Open event to LCP, causing orderly termination via Closing/Stopping states before re-accepting connections.
The LCP option negotiation automaton defines 10 states: Initial, Starting, Closed, Stopped, Closing, Stopping, Req-Sent, Ack-Rcvd, Ack-Sent, and Opened. Transitions are driven by events including Up/Down/Open/Close, timeouts (TO+/TO-), and received packets (RCR+/RCR-/RCA/RCN/RTR/RTA/RUC/RXJ+/RXJ-/RXR). The Opened state is entered only after a Configure-Ack has been both sent and received.
The PPP link progresses 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. The transition from Dead to Establish is triggered by physical-layer readiness; transitions back to Dead occur on failure or termination.
LCP Configuration Options use a TLV format: Type (1 octet), Length (1 octet, inclusive), and Data (variable). Defined option types are: 1=Maximum-Receive-Unit, 2=Async-Control-Character-Map, 3=Authentication-Protocol, 4=Quality-Protocol, 5=Magic-Number, 6=RESERVED, 7=Protocol-Field-Compression, 8=Address-and-Control-Field-Compression.
The Echo-Request and Echo-Reply packets include a Magic-Number field (4 octets) following the standard Code/Identifier/Length header. Until the Magic-Number option is negotiated, the Magic-Number MUST be transmitted as zero. The Discard-Request uses the same layout.
The LCP packet format consists of Code (1 octet), Identifier (1 octet), Length (2 octets, inclusive of all fields), and Data (variable). The Code field identifies the packet type (1=Configure-Request through 11=Discard-Request); unknown Code values trigger a Code-Reject response.
The PPP encapsulation consists of three fields transmitted left to right: Protocol (16 bits), Information (variable), and Padding (variable). The Protocol field identifies the network-layer datagram type; the Information field carries the datagram; Padding may be added up to the MRU.