PPP in HDLC-like Framing
Extracted elements (28)
NRZI encoding is recommended as an alternative to NRZ because of its relative immunity to signal inversion configuration errors. However, NRZI exacerbates the missing x1 factor of the 16-bit FCS, so the 32-bit FCS is recommended when NRZI is in use.
The FCS was designed so that a specific 'good FCS' constant value (PPPGOODFCS16=0xf0b8, PPPGOODFCS32=0xdebb20e3) results when the FCS operation passes over the complemented FCS, enabling receivers to detect valid frames without separately tracking frame length.
The first octet of a two-octet Protocol field will never be 0xff (since it is not even), preventing ambiguity during Address-and-Control-Field-Compression decompression. Protocol value 0x00ff is reserved to avoid ambiguity when Protocol-Field-Compression is enabled.
PPP frames can be automatically recognized during a login sequence by the octet sequences starting with 7e ff 03 c0 21 (standard), 7e ff 7d 23 c0 21 (escaped ETX), or 7e 7d df 7d 23 c0 21 (escaped DEL and ETX). Only the third form generates a correctly checksummed PPP frame.
Use of the shared zero mode Flag Sequence hinders interoperability with bit-synchronous to asynchronous and bit-synchronous to octet-synchronous converters, because such converters may misidentify frame boundaries.
Address-and-Control-Field-Compression MUST NOT be negotiated when other (non-standard) Address or Control field values are in use. On transmission, compressed Address and Control fields are simply omitted.
All asynchronous octets are transmitted least significant bit first, with one start bit, eight bits of data, and one stop bit. There is no provision for seven-bit asynchronous links.
Asynchronous transmitters SHOULD send an opening Flag Sequence whenever 'appreciable time' (no greater than about 1 second) has elapsed after the prior closing Flag Sequence, to avoid appending noise characters to the next frame.
For asynchronous links, the default receiving and sending ACCM is 0xffffffff, ensuring all ASCII control characters (excluding DEL) can be transparently communicated. For other link types, the default ACCM is 0, since no mapping is needed.
For octet-synchronous links, the Flag Sequence MUST be transmitted during inter-frame time fill. For asynchronous links, inter-octet time fill MUST be accomplished by transmitting continuous '1' bits (mark-hold state).
Frames that are too short (fewer than 4 octets with 16-bit FCS), that end with a Control Escape octet followed immediately by a closing Flag Sequence, or where octet-framing is violated, are silently discarded and not counted as FCS errors.
Frames with unrecognized Control field values SHOULD be silently discarded. The use of other Control field values may be defined at a later time or by prior agreement.
Implementations SHOULD signal the Down event whenever 'significant time' has elapsed since the link was disconnected, to avoid security lapses from over-reliance on the integrity of switching systems.
On reception, octets with value less than 0x20 that are flagged in the receiving ACCM are silently removed (they may have been inserted by intervening hardware). ACCM-escaped Control Escape octets are removed and the following octet is XOR'd with 0x20.
PPP links MUST be full-duplex, but MAY be either dedicated or circuit-switched. The physical layer must operate in asynchronous (start/stop), bit-synchronous, or octet-synchronous mode, transparent to PPP Data Link Layer frames.
Sending implementations MUST escape the Flag Sequence (0x7e) and Control Escape (0x7d) octets at minimum. Receiving implementations MUST correctly process all Control Escape sequences.
Synchronous PPP implementations MUST always respond to the Async-Control-Character-Map Configuration Option with LCP Configure-Ack to enable asynchronous-to-synchronous conversion, even though the synchronous side will not perform ACCM mapping itself.
The All-Stations address (0xff) MUST always be recognized and received. Frames with unrecognized Address values SHOULD be silently discarded.
The 'shared zero mode' Flag Sequence '011111101111110' SHOULD NOT be used for bit-stuffed framing. When unavoidable, an implementation MUST ensure that the first detected Flag Sequence is promptly communicated to the link layer.
When LCP control signals are not available, the implementation MUST signal the Up event to LCP upon initialization and SHOULD NOT signal the Down event. When signals are available, they SHOULD be used to signal Up and Down events.
When mark idle is used on a bit-synchronous link, the implementation MUST ensure at least 15 consecutive '1' bits between Flags during the idle period, and that the Flag Sequence is always generated at the beginning of a frame after an idle period.
Bit-stuffed framing inserts a '0' bit after all sequences of five contiguous '1' bits (including the last 5 bits of the FCS) to prevent simulation of the Flag Sequence. On reception, any '0' bit directly following five contiguous '1' bits is discarded prior to FCS computation.
Octet stuffing uses the Control Escape octet (0x7d). Each Flag Sequence, Control Escape, and any ACCM-flagged octet is replaced by a two-octet sequence: 0x7d followed by the original octet XOR'd with 0x20 (bit 5 complemented).
The link layer might not be informed when the connected state of the physical layer has changed, resulting in possible security lapses due to over-reliance on the integrity of switching systems. An insertion attack might go undetected, and an attacker spoofing the calling identity might avoid link authentication.
The Address field is a single octet containing 0xff (All-Stations address). The Control field is a single octet containing 0x03, representing the Unnumbered Information (UI) command with P/F bit zero.
The Async-Control-Character-Map (ACCM) LCP Configuration Option has Type=2, Length=6, and a 4-octet ACCM field transmitted most significant octet first. Each bit position corresponds to the ASCII control character of the same value; a set bit means that octet MUST remain mapped.
The FCS field defaults to 16 bits (two octets), transmitted least significant octet first. A 32-bit (four octet) FCS is also defined and may be negotiated via LCP Extensions. The FCS is calculated over the Address, Control, Protocol, Information, and Padding fields.
The PPP HDLC-like frame consists of: Flag (1 octet, 0x7e), Address (1 octet, 0xff), Control (1 octet, 0x03), Protocol (8 or 16 bits), Information (*), Padding (*), FCS (16 or 32 bits), Flag (1 octet, 0x7e). Fields are transmitted left to right.