⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc1549.txt

📁 RFC 的详细文档!
💻 TXT
📖 第 1 页 / 共 3 页
字号:
Simpson                                                         [Page 6]

RFC 1549                      HDLC Framing                Decvember 1993


         3309 [2] or CCITT X.25 [6].

   The end of the Information and Padding fields is found by locating
   the closing Flag Sequence and removing the Frame Check Sequence
   field.

3.2.  Modification of the Basic Frame

   The Link Control Protocol can negotiate modifications to the basic
   HDLC frame structure.  However, modified frames will always be
   clearly distinguishable from standard frames.

    Address-and-Control-Field-Compression

      When using the default HDLC framing, the Address and Control
      fields contain the hexadecimal values 0xff and 0x03 respectively.

      On transmission, compressed Address and Control fields are formed
      by simply omitting them.

      On reception, the Address and Control fields are decompressed by
      examining the first two octets.  If they contain the values 0xff
      and 0x03, they are assumed to be the Address and Control fields.
      If not, it is assumed that the fields were compressed and were not
      transmitted.

      By definition, the first octet of a two octet Protocol field will
      never be 0xff (since it is not even).  The Protocol field value
      0x00ff is not allowed (reserved) to avoid ambiguity when
      Protocol-Field-Compression is enabled and the first Information
      field octet is 0x03.

      When other Address or Control field values are in use, Address-
      and-Control-Field-Compression MUST NOT be negotiated.

4.  Asynchronous HDLC

   This section summarizes the use of HDLC with 8-bit asynchronous
   links.

    Flag Sequence

      The Flag Sequence indicates the beginning or end of a frame.  The
      octet stream is examined on an octet-by-octet basis for the value
      01111110 (hexadecimal 0x7e).






Simpson                                                         [Page 7]

RFC 1549                      HDLC Framing                Decvember 1993


    Transparency

      An octet stuffing procedure is used.  The Control Escape octet is
      defined as binary 01111101 (hexadecimal 0x7d) where the bit
      positions are numbered 87654321 (not 76543210, BEWARE).

      Each end of the link maintains two Async-Control-Character-Maps.
      The receiving ACCM is 32 bits, but the sending ACCM may be up to
      256 bits.  This results in four distinct ACCMs, two in each
      direction of the link.

      The default receiving ACCM is 0xffffffff.  The default sending
      ACCM is 0xffffffff, plus the Control Escape and Flag Sequence
      characters themselves, plus whatever other outgoing characters are
      known to be intercepted.

      After FCS computation, the transmitter examines the entire frame
      between the two Flag Sequences.  Each Flag Sequence, Control
      Escape octet, and octet with value less than hexadecimal 0x20
      which is flagged in the sending Async-Control-Character-Map, is
      replaced by a two octet sequence consisting of the Control Escape
      octet and the original octet with bit 6 complemented (exclusive-
      or'd with hexadecimal 0x20).

      Prior to FCS computation, the receiver examines the entire frame
      between the two Flag Sequences.  Each octet with value less than
      hexadecimal 0x20 is checked.  If it is flagged in the receiving
      Async-Control-Character-Map, it is simply removed (it may have
      been inserted by intervening data communications equipment).  For
      each Control Escape octet, that octet is also removed, but bit 6
      of the following octet is complemented, unless it is the Flag
      Sequence.

         Note: The inclusion of all octets less than hexadecimal 0x20
         allows all ASCII control characters [8] excluding DEL (Delete)
         to be transparently communicated through all known data
         communications equipment.

      The transmitter may also send octets with value in the range 0x40
      through 0xff (except 0x5e) in Control Escape format.  Since these
      octet values are not negotiable, this does not solve the problem
      of receivers which cannot handle all non-control characters.
      Also, since the technique does not affect the 8th bit, this does
      not solve problems for communications links that can send only 7-
      bit characters.

      A few examples may make this more clear.  Packet data is
      transmitted on the link as follows:



Simpson                                                         [Page 8]

RFC 1549                      HDLC Framing                Decvember 1993


         0x7e is encoded as 0x7d, 0x5e.  0x7d is encoded as 0x7d, 0x5d.
         0x01 is encoded as 0x7d, 0x21.

      Some modems with software flow control may intercept outgoing DC1
      and DC3 ignoring the 8th (parity) bit.  This data would be
      transmitted on the link as follows:

         0x11 is encoded as 0x7d, 0x31.  0x13 is encoded as 0x7d, 0x33.
         0x91 is encoded as 0x7d, 0xb1.  0x93 is encoded as 0x7d, 0xb3.

    Aborting a Transmission

      On asynchronous links, frames may be aborted by transmitting a "0"
      stop bit where a "1" bit is expected (framing error) or by
      transmitting a Control Escape octet followed immediately by a
      closing Flag Sequence.

    Time Fill

      For asynchronous links, inter-octet and inter-frame time fill MUST
      be accomplished by transmitting continuous "1" bits (mark-hold
      state).

      Inter-frame time fill can be viewed as extended inter-octet time
      fill.  Doing so can save one octet for every frame, decreasing
      delay and increasing bandwidth.  This is possible since a Flag
      Sequence may serve as both a frame close and a frame begin.  After
      having received any frame, an idle receiver will always be in a
      frame begin state.

      Robust transmitters should avoid using this trick over-zealously,
      since the price for decreased delay is decreased reliability.
      Noisy links may cause the receiver to receive garbage characters
      and interpret them as part of an incoming frame.  If the
      transmitter does not send a new opening Flag Sequence before
      sending the next frame, then that frame will be appended to the
      noise characters causing an invalid frame (with high reliability).
      It is suggested that implementations will achieve the best results
      by always sending an opening Flag Sequence if the new frame is not
      back-to-back with the last.  Transmitters SHOULD send an open Flag
      Sequence whenever "appreciable time" has elapsed after the prior
      closing Flag Sequence.  The maximum value for "appreciable time"
      is likely to be no greater than the typing rate of a slow typist,
      say 1 second.

    Encoding

      All octets are transmitted with one start bit, eight bits of data,



Simpson                                                         [Page 9]

RFC 1549                      HDLC Framing                Decvember 1993


      and one stop bit.  There is no provision for seven bit
      asynchronous links.

5. Bit-synchronous HDLC

   This section summarizes the use of HDLC with bit-synchronous links.

    Flag Sequence

      The Flag Sequence indicates the beginning or end of a frame, and
      is used for frame synchronization.  The bit stream is examined on
      a bit-by-bit basis for the binary sequence 01111110 (hexadecimal
      0x7e).

      The "shared zero mode" Flag Sequence "011111101111110" SHOULD NOT
      be used.  When not avoidable, such an implementation MUST ensure
      that the first Flag Sequence detected (the end of the frame) is
      promptly communicated to the link layer.  Use of the shared zero
      mode hinders interoperability with synchronous-to-asynchronous
      converters.

    Transparency

      The transmitter examines the entire frame between the two Flag
      Sequences.  A "0" bit is inserted after all sequences of five
      contiguous "1" bits (including the last 5 bits of the FCS) to
      ensure that a Flag Sequence is not simulated.

      When receiving, any "0" bit that directly follows five contiguous
      "1" bits is discarded.

      Since the Control Escape octet-stuffing method is not used, the
      default receiving and sending Async-Control-Character-Maps are 0.

      There may be some use of synchronous-to-asynchronous converters
      (some built into modems) in point-to-point links resulting in a
      synchronous PPP implementation on one end of a link and an
      asynchronous implementation on the other.  It is the
      responsibility of the converter to do all mapping conversions
      during operation.

      To enable this functionality, bit-synchronous PPP implementations
      MUST always respond to the Async-Control-Character-Map
      Configuration Option with an LCP Configure-Ack.  However,
      acceptance of the Configuration Option does not imply that the
      bit-synchronous implementation will do any octet mapping.
      Instead, all such octet mapping will be performed by the
      asynchronous-to-synchronous converter.



Simpson                                                        [Page 10]

RFC 1549                      HDLC Framing                Decvember 1993


    Aborting a Transmission

      A sequence of more than six "1" bits indicates an invalid frame,
      which is ignored, and not counted as a FCS error.

    Inter-frame Time Fill

      For bit-synchronous links, the Flag Sequence SHOULD be transmitted
      during inter-frame time fill.  There is no provision for inter-
      octet time fill.

      Mark idle (continuous ones) SHOULD NOT be used for inter-frame
      ill.  However, certain types of circuit-switched links require the
      use of mark idle, particularly those that calculate accounting
      based on periods of bit activity.  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.

    Encoding

      The definition of various encodings and scrambling is the
      responsibility of the DTE/DCE equipment in use, and is outside the
      scope of this specification.

      While PPP will operate without regard to the underlying
      representation of the bit stream, lack of standards for
      transmission will hinder interoperability as surely as lack of
      data link standards.  At speeds of 56 Kbps through 2.0 Mbps, NRZ
      is currently most widely available, and on that basis is
      recommended as a default.

      When configuration of the encoding is allowed, NRZI is recommended
      as an alternative, because of its relative immunity to signal
      inversion configuration errors, and instances when it MAY allow
      connection without an expensive DSU/CSU.  Unfortunately, NRZI
      encoding obviates the (1 + x) factor of the 16-bit FCS, so that
      one error in 2**15 goes undetected (instead of one in 2**16), and
      triple errors are not detected.  Therefore, when NRZI is in use,
      it is recommended that the 32-bit FCS be negotiated, which does
      not include the (1 + x) factor.

      At higher speeds of up to 45 Mbps, some implementors have chosen
      the ANSI High Speed Synchronous Interface [HSSI].  While this
      experience is currently limited, implementors are encouraged to
      cooperate in choosing transmission encoding.




Simpson                                                        [Page 11]

RFC 1549                      HDLC Framing                Decvember 1993


6.  Octet-synchronous HDLC

   This section summarizes the use of HDLC with octet-synchronous links,
   such as SONET and optionally ISDN B or H channels.

   Although the bit rate is synchronous, there is no bit-stuffing.
   Instead, the octet-stuffing feature of 8-bit asynchronous HDLC is
   used.

    Flag Sequence

      The Flag Sequence indicates the beginning or end of a frame.  The
      octet stream is examined on an octet-by-octet basis for the value
      01111110 (hexadecimal 0x7e).

    Transparency

      An octet stuffing procedure is used.  The Control Escape octet is
      defined as binary 01111101 (hexadecimal 0x7d).

      The octet stuffing procedure is described in "Asynchronous HDLC"
      above.

      The sending and receiving implementations need escape only the
      Flag Sequence and Control Escape octets.

      Considerations concerning the use of converters are described in
      "Bit-synchronous HDLC" above.

    Aborting a Transmission

      Frames may be aborted by transmitting a Control Escape octet
      followed immediately by a closing Flag Sequence.  The preceding
      frame is ignored, and not counted as a FCS error.

    Inter-frame Time Fill

      The Flag Sequence MUST be transmitted during inter-frame time
      fill.  There is no provision for inter-octet time fill.

    Encoding

      The definition of various encodings and scrambling is the
      responsibility of the DTE/DCE equipment in use, and is outside the
      scope of this specification.






Simpson                                                        [Page 12]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -