rfc-1662

PPP in HDLC-like Framing

W. Simpson (Editor)
date1994-07 streamIETF areaint wgpppext statusINTERNET STANDARD pages26 canonicalhttps://www.rfc-editor.org/rfc/rfc1662 doi10.17487/RFC1662 errataview
This document describes the use of HDLC-like framing for PPP encapsulated packets. [STANDARDS-TRACK]

obsoletes

also

Extracted elements (28)

design-rationale §5.5

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.

design-rationale §C

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.

design-rationale §3.2

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.

interoperability-note §B

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.

interoperability-note §5.1

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.

normative-requirement §3.2 MUST NOT

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.

normative-requirement §4.5.2 MUST

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.

normative-requirement §4.4.2 SHOULD

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.

normative-requirement §7.1 MUST

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.

normative-requirement §4.4 MUST

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).

normative-requirement §4.3 MUST

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.

normative-requirement §3.1 SHOULD

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.

normative-requirement §2 SHOULD

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.

security

normative-requirement §4.2 MUST

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.

normative-requirement §1 MUST

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.

normative-requirement §4.2 MUST

Sending implementations MUST escape the Flag Sequence (0x7e) and Control Escape (0x7d) octets at minimum. Receiving implementations MUST correctly process all Control Escape sequences.

normative-requirement §6 MUST

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.

normative-requirement §3.1 MUST

The All-Stations address (0xff) MUST always be recognized and received. Frames with unrecognized Address values SHOULD be silently discarded.

normative-requirement §5.1 SHOULD NOT

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.

normative-requirement §2 MUST

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.

normative-requirement §5.4 MUST

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.

protocol-element §5.2

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.

protocol-element §4.2

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).

security-consideration §Security Considerations

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.

security

wire-format §3.1

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.

wire-format §7.1

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.

registry

wire-format §3.1

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.

wire-format §3.1

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.