Tech-invite3GPPspaceIETFspace
959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 1331

The Point-to-Point Protocol (PPP) for the Transmission of Multi-protocol Datagrams over Point-to-Point Links

Pages: 69
Obsoletes:  11711172
Obsoleted by:  1548
Part 2 of 2 – Pages 31 to 69
First   Prev   None

ToP   noToC   RFC1331 - Page 31   prevText
6.  LCP Packet Formats

   There are three classes of LCP packets:

      1. Link Configuration packets used to establish and configure a
         link (Configure-Request, Configure-Ack, Configure-Nak and
         Configure-Reject).

      2. Link Termination packets used to terminate a link (Terminate-
         Request and Terminate-Ack).

      3. Link Maintenance packets used to manage and debug a link
         (Code-Reject, Protocol-Reject, Echo-Request, Echo-Reply, and
         Discard-Request).

   This document describes Version 1 of the Link Control Protocol.  In
   the interest of simplicity, there is no version field in the LCP
   packet.  If a new version of LCP is necessary in the future, the
   intention is that a new Data Link Layer Protocol field value will be
   used to differentiate Version 1 LCP from all other versions.  A
   correctly functioning Version 1 LCP implementation will always
   respond to unknown Protocols (including other versions) with an
   easily recognizable Version 1 packet, thus providing a deterministic
   fallback mechanism for implementations of other versions.

   Regardless of which Configuration Options are enabled, all LCP Link
   Configuration, Link Termination, and Code-Reject packets (codes 1
   through 7) are always sent in the full, standard form, as if no
   Configuration Options were enabled.  This ensures that LCP
   Configure-Request packets are always recognizable even when one end
   of the link mistakenly believes the link to be open.

   Exactly one Link Control Protocol packet is encapsulated in the
   Information field of PPP Data Link Layer frames where the Protocol
   field indicates type hex c021 (Link Control Protocol).

   A summary of the Link Control Protocol packet format is shown below.
   The fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Data ...
   +-+-+-+-+
ToP   noToC   RFC1331 - Page 32
   Code

      The Code field is one octet and identifies the kind of LCP packet.
      When a packet is received with an invalid Code field, a Code-
      Reject packet is transmitted.

      The most up-to-date values of the LCP Code field are specified in
      the most recent "Assigned Numbers" RFC [11].  Current values are
      assigned as follows:

         1       Configure-Request
         2       Configure-Ack
         3       Configure-Nak
         4       Configure-Reject
         5       Terminate-Request
         6       Terminate-Ack
         7       Code-Reject
         8       Protocol-Reject
         9       Echo-Request
         10      Echo-Reply
         11      Discard-Request
         12      RESERVED

   Identifier

      The Identifier field is one octet and aids in matching requests
      and replies.  When a packet is received with an invalid Identifier
      field, the packet is silently discarded.

   Length

      The Length field is two octets and indicates the length of the LCP
      packet including the Code, Identifier, Length and Data fields.
      Octets outside the range of the Length field should be treated as
      Data Link Layer padding and should be ignored on reception.  When
      a packet is received with an invalid Length field, the packet is
      silently discarded.

   Data

      The Data field is zero or more octets as indicated by the Length
      field.  The format of the Data field is determined by the Code
      field.
ToP   noToC   RFC1331 - Page 33
6.1.  Configure-Request

   Description

      A LCP implementation wishing to open a connection MUST transmit a
      LCP packet with the Code field set to 1 (Configure-Request) and
      the Options field filled with any desired changes to the default
      link Configuration Options.

      Upon reception of a Configure-Request, an appropriate reply MUST
      be transmitted.

   A summary of the Configure-Request packet format is shown below.  The
   fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Options ...
   +-+-+-+-+

   Code

      1 for Configure-Request.

   Identifier

      The Identifier field SHOULD be changed on each transmission.  On
      reception, the Identifier field should be copied into the
      Identifier field of the appropriate reply packet.

   Options

      The options field is variable in length and contains the list of
      zero or more Configuration Options that the sender desires to
      negotiate.  All Configuration Options are always negotiated
      simultaneously.  The format of Configuration Options is further
      described in a later section.
ToP   noToC   RFC1331 - Page 34
6.2.  Configure-Ack

   Description

      If every Configuration Option received in a Configure-Request is
      both recognizable and acceptable, then a LCP implementation should
      transmit a LCP packet with the Code field set to 2 (Configure-
      Ack), the Identifier field copied from the received Configure-
      Request, and the Options field copied from the received
      Configure-Request.  The acknowledged Configuration Options MUST
      NOT be reordered or modified in any way.

      On reception of a Configure-Ack, the Identifier field must match
      that of the last transmitted Configure-Request.  Additionally, the
      Configuration Options in a Configure-Ack must exactly match those
      of the last transmitted Configure-Request.  Invalid packets are
      silently discarded.

   A summary of the Configure-Ack packet format is shown below.  The
   fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Options ...
   +-+-+-+-+

   Code

      2 for Configure-Ack.

   Identifier

      The Identifier field is a copy of the Identifier field of the
      Configure-Request which caused this Configure-Ack.

   Options

      The Options field is variable in length and contains the list of
      zero or more Configuration Options that the sender is
      acknowledging.  All Configuration Options are always acknowledged
      simultaneously.
ToP   noToC   RFC1331 - Page 35
6.3.  Configure-Nak

   Description

      If every element of the received Configuration Options is
      recognizable but some are not acceptable, then a LCP
      implementation should transmit a LCP packet with the Code field
      set to 3 (Configure-Nak), the Identifier field copied from the
      received Configure-Request, and the Options field filled with only
      the unacceptable Configuration Options from the Configure-Request.
      All acceptable Configuration Options are filtered out of the
      Configure-Nak, but otherwise the Configuration Options from the
      Configure-Request MUST NOT be reordered.

      Each of the Nak'd Configuration Options MUST be modified to a
      value acceptable to the Configure-Nak sender.  Options which have
      no value fields (boolean options) use the Configure-Reject reply
      instead.

      Finally, an implementation may be configured to request the
      negotiation of a specific option.  If that option is not listed,
      then that option may be appended to the list of Nak'd
      Configuration Options in order to request the peer to list that
      option in its next Configure-Request packet.  Any value fields for
      the option MUST indicate values acceptable to the Configure-Nak
      sender.

      On reception of a Configure-Nak, the Identifier field must match
      that of the last transmitted Configure-Request.  Invalid packets
      are silently discarded.

      Reception of a valid Configure-Nak indicates that a new
      Configure-Request MAY be sent with the Configuration Options
      modified as specified in the Configure-Nak.

      Some Configuration Options have a variable length.  Since the
      Nak'd Option has been modified by the peer, the implementation
      MUST be able to handle an Option length which is different from
      the original Configure-Request.
ToP   noToC   RFC1331 - Page 36
   A summary of the Configure-Nak packet format is shown below.  The
   fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Options ...
   +-+-+-+-+

   Code

      3 for Configure-Nak.

   Identifier

      The Identifier field is a copy of the Identifier field of the
      Configure-Request which caused this Configure-Nak.

   Options

      The Options field is variable in length and contains the list of
      zero or more Configuration Options that the sender is Nak'ing.
      All Configuration Options are always Nak'd simultaneously.


6.4.  Configure-Reject

   Description

      If some Configuration Options received in a Configure-Request are
      not recognizable or are not acceptable for negotiation (as
      configured by a network administrator), then a LCP implementation
      should transmit a LCP packet with the Code field set to 4
      (Configure-Reject), the Identifier field copied from the received
      Configure-Request, and the Options field filled with only the
      unacceptable Configuration Options from the Configure-Request.
      All recognizable and negotiable Configuration Options are filtered
      out of the Configure-Reject, but otherwise the Configuration
      Options MUST NOT be reordered or modified in any way.

      On reception of a Configure-Reject, the Identifier field must
      match that of the last transmitted Configure-Request.
      Additionally, the Configuration Options in a Configure-Reject must
      be a proper subset of those in the last transmitted Configure-
      Request.  Invalid packets are silently discarded.
ToP   noToC   RFC1331 - Page 37
      Reception of a valid Configure-Reject indicates that a new
      Configure-Request SHOULD be sent which does not include any of the
      Configuration Options listed in the Configure-Reject.

   A summary of the Configure-Reject packet format is shown below.  The
   fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Options ...
   +-+-+-+-+

   Code

      4 for Configure-Reject.

   Identifier

      The Identifier field is a copy of the Identifier field of the
      Configure-Request which caused this Configure-Reject.

   Options

      The Options field is variable in length and contains the list of
      zero or more Configuration Options that the sender is rejecting.
      All Configuration Options are always rejected simultaneously.
ToP   noToC   RFC1331 - Page 38
6.5.  Terminate-Request and Terminate-Ack

   Description

      LCP includes Terminate-Request and Terminate-Ack Codes in order to
      provide a mechanism for closing a connection.

      A LCP implementation wishing to close a connection should transmit
      a LCP packet with the Code field set to 5 (Terminate-Request) and
      the Data field filled with any desired data.  Terminate-Request
      packets should continue to be sent until Terminate-Ack is
      received, the lower layer indicates that it has gone down, or a
      sufficiently large number have been transmitted such that the peer
      is down with reasonable certainty.

      Upon reception of a Terminate-Request, a LCP packet MUST be
      transmitted with the Code field set to 6 (Terminate-Ack), the
      Identifier field copied from the Terminate-Request packet, and the
      Data field filled with any desired data.

      Reception of an unelicited Terminate-Ack indicates that the peer
      is in the Closed or Stopped states, or is otherwise in need of
      re-negotiation.

   A summary of the Terminate-Request and Terminate-Ack packet formats
   is shown below.  The fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Data ...
   +-+-+-+-+

   Code

      5 for Terminate-Request;

      6 for Terminate-Ack.

   Identifier

      The Identifier field is one octet and aids in matching requests
      and replies.
ToP   noToC   RFC1331 - Page 39
   Data

      The Data field is zero or more octets and contains uninterpreted
      data for use by the sender.  The data may consist of any binary
      value and may be of any length from zero to the peer's established
      maximum Information field length minus four.


6.6.  Code-Reject

   Description

      Reception of a LCP packet with an unknown Code indicates that one
      of the communicating LCP implementations is faulty or incomplete.
      This error MUST be reported back to the sender of the unknown Code
      by transmitting a LCP packet with the Code field set to 7 (Code-
      Reject), and the inducing packet copied to the Rejected-
      Information field.

      Upon reception of a Code-Reject, the implementation SHOULD report
      the error, since it is unlikely that the situation can be
      rectified automatically.

   A summary of the Code-Reject packet format is shown below.  The
   fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Rejected-Packet ...
   +-+-+-+-+-+-+-+-+

   Code

      7 for Code-Reject.

   Identifier

      The Identifier field is one octet and is for use by the
      transmitter.

   Rejected-Information

      The Rejected-Information field contains a copy of the LCP packet
      which is being rejected.  It begins with the Information field,
      and does not include any PPP Data Link Layer headers nor the FCS.
ToP   noToC   RFC1331 - Page 40
      The Rejected-Information MUST be truncated to comply with the
      peer's established maximum Information field length.
ToP   noToC   RFC1331 - Page 41
6.7.  Protocol-Reject

   Description

      Reception of a PPP frame with an unknown Data Link Layer Protocol
      indicates that the peer is attempting to use a protocol which is
      unsupported.  This usually occurs when the peer attempts to
      configure a new protocol.  If the LCP state machine is in the
      Opened state, then this error MUST be reported back to the peer by
      transmitting a LCP packet with the Code field set to 8 (Protocol-
      Reject), the Rejected-Protocol field set to the received Protocol,
      and the inducing packet copied to the Rejected-Information field.

      Upon reception of a Protocol-Reject, a LCP implementation SHOULD
      stop transmitting frames of the indicated protocol.

      Protocol-Reject packets may only be sent in the LCP Opened state.
      Protocol-Reject packets received in any state other than the LCP
      Opened state SHOULD be silently discarded.

   A summary of the Protocol-Reject packet format is shown below.  The
   fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Rejected-Protocol       |      Rejected-Information ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Code

      8 for Protocol-Reject.

   Identifier

      The Identifier field is one octet and is for use by the
      transmitter.

   Rejected-Protocol

      The Rejected-Protocol field is two octets and contains the
      Protocol of the Data Link Layer frame which is being rejected.

   Rejected-Information

      The Rejected-Information field contains a copy from the frame
ToP   noToC   RFC1331 - Page 42
      which is being rejected.  It begins with the Information field,
      and does not include any PPP Data Link Layer headers nor the FCS.
      The Rejected-Information MUST be truncated to comply with the
      peer's established maximum Information field length.


6.8.  Echo-Request and Echo-Reply

   Description

      LCP includes Echo-Request and Echo-Reply Codes in order to provide
      a Data Link Layer loopback mechanism for use in exercising both
      directions of the link.  This is useful as an aid in debugging,
      link quality determination, performance testing, and for numerous
      other functions.

      An Echo-Request sender transmits a LCP packet with the Code field
      set to 9 (Echo-Request), the Identifier field set, the local
      Magic-Number inserted, and the Data field filled with any desired
      data, up to but not exceeding the peer's established maximum
      Information field length minus eight.

      Upon reception of an Echo-Request, a LCP packet MUST be
      transmitted with the Code field set to 10 (Echo-Reply), the
      Identifier field copied from the received Echo-Request, the local
      Magic-Number inserted, and the Data field copied from the Echo-
      Request, truncating as necessary to avoid exceeding the peer's
      established maximum Information field length.

      Echo-Request and Echo-Reply packets may only be sent in the LCP
      Opened state.  Echo-Request and Echo-Reply packets received in any
      state other than the LCP Opened state SHOULD be silently
      discarded.

   A summary of the Echo-Request and Echo-Reply packet formats is shown
   below.  The fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Magic-Number                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Data ...
   +-+-+-+-+
ToP   noToC   RFC1331 - Page 43
   Code

      9 for Echo-Request;

      10 for Echo-Reply.

   Identifier

      The Identifier field is one octet and aids in matching Echo-
      Requests and Echo-Replies.

   Magic-Number

      The Magic-Number field is four octets and aids in detecting links
      which are in the looped-back condition.  Unless modified by a
      Configuration Option, the Magic-Number MUST be transmitted as zero
      and MUST be ignored on reception.  See the Magic-Number
      Configuration Option for further explanation.

   Data

      The Data field is zero or more octets and contains uninterpreted
      data for use by the sender.  The data may consist of any binary
      value and may be of any length from zero to the peer's established
      maximum Information field length minus eight.


6.9.  Discard-Request

   Description

      LCP includes a Discard-Request Code in order to provide a Data
      Link Layer data sink mechanism for use in exercising the local to
      remote direction of the link.  This is useful as an aid in
      debugging, performance testing, and for numerous other functions.

      A discard sender transmits a LCP packet with the Code field set to
      11 (Discard-Request) the Identifier field set, the local Magic-
      Number inserted, and the Data field filled with any desired data,
      up to but not exceeding the peer's established maximum Information
      field length minus eight.

      A discard receiver MUST simply throw away an Discard-Request that
      it receives.

      Discard-Request packets may only be sent in the LCP Opened state.
ToP   noToC   RFC1331 - Page 44
   A summary of the Discard-Request packet formats is shown below.  The
   fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Magic-Number                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Data ...
   +-+-+-+-+

   Code

      11 for Discard-Request.

   Identifier

      The Identifier field is one octet and is for use by the Discard-
      Request transmitter.

   Magic-Number

      The Magic-Number field is four octets and aids in detecting links
      which are in the looped-back condition.  Unless modified by a
      configuration option, the Magic-Number MUST be transmitted as zero
      and MUST be ignored on reception.  See the Magic-Number
      Configuration Option for further explanation.

   Data

      The Data field is zero or more octets and contains uninterpreted
      data for use by the sender.  The data may consist of any binary
      value and may be of any length from zero to the peer's established
      maximum Information field length minus four.
ToP   noToC   RFC1331 - Page 45
7.  LCP Configuration Options

   LCP Configuration Options allow modifications to the standard
   characteristics of a point-to-point link to be negotiated.
   Negotiable modifications include such things as the maximum receive
   unit, async control character mapping, the link authentication
   method, etc.  If a Configuration Option is not included in a
   Configure-Request packet, the default value for that Configuration
   Option is assumed.

   The end of the list of Configuration Options is indicated by the
   length of the LCP packet.

   Unless otherwise specified, each Configuration Option is not listed
   more than once in a Configuration Options list.  Some Configuration
   Options MAY be listed more than once.  The effect of this is
   Configuration Option specific and is specified by each such
   Configuration Option.

   Also unless otherwise specified, all Configuration Options apply in a
   half-duplex fashion.  When negotiated, they apply to only one
   direction of the link, typically in the receive direction when
   interpreted from the point of view of the Configure-Request sender.
ToP   noToC   RFC1331 - Page 46
7.1.  Format

   A summary of the Configuration Option format is shown below.  The
   fields are transmitted from left to right.

    0                   1
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |    Data ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Type

      The Type field is one octet and indicates the type of
      Configuration Option.  The most up-to-date values of the LCP
      Option Type field are specified in the most recent "Assigned
      Numbers" RFC [11].  Current values are assigned as follows:

         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

   Length

      The Length field is one octet and indicates the length of this
      Configuration Option including the Type, Length and Data fields.
      If a negotiable Configuration Option is received in a Configure-
      Request but with an invalid Length, a Configure-Nak SHOULD be
      transmitted which includes the desired Configuration Option with
      an appropriate Length and Data.

   Data

      The Data field is zero or more octets and indicates the value or
      other information for this Configuration Option.  The format and
      length of the Data field is determined by the Type and Length
      fields.
ToP   noToC   RFC1331 - Page 47
7.2.  Maximum-Receive-Unit

   Description

      This Configuration Option may be sent to inform the peer that the
      implementation can receive larger frames, or to request that the
      peer send smaller frames.  If smaller frames are requested, an
      implementation MUST still be able to receive 1500 octet frames in
      case link synchronization is lost.

   A summary of the Maximum-Receive-Unit Configuration Option format is
   shown below.  The fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |      Maximum-Receive-Unit     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Type

      1

   Length

      4

   Maximum-Receive-Unit

      The Maximum-Receive-Unit field is two octets and indicates the new
      maximum receive unit.  The Maximum-Receive-Unit covers only the
      Data Link Layer Information field.  It does not include the
      header, padding, FCS, nor any transparency bits or bytes.

   Default

      1500
ToP   noToC   RFC1331 - Page 48
7.3.  Async-Control-Character-Map

   Description

      This Configuration Option provides a way to negotiate the use of
      control character mapping on asynchronous links.  By default, PPP
      maps all control characters into an appropriate two character
      sequence.  However, it is rarely necessary to map all control
      characters and often it is unnecessary to map any characters.  A
      PPP implementation may use this Configuration Option to inform the
      peer which control characters must remain mapped and which control
      characters need not remain mapped when the peer sends them.  The
      peer may still send these control characters in mapped format if
      it is necessary because of constraints at the peer.

      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, synchronous PPP
      implementations MUST always accept a Async-Control-Character-Map
      Configuration Option (it MUST always respond to an LCP Configure-
      Request specifying this Configuration Option with an LCP
      Configure-Ack).  However, acceptance of this Configuration Option
      does not imply that the synchronous implementation will do any
      character mapping, since synchronous PPP uses bit-stuffing rather
      than character-stuffing.  Instead, all such character mapping will
      be performed by the asynchronous-to-synchronous converter.

   A summary of the Async-Control-Character-Map Configuration Option
   format is shown below.  The fields are transmitted from left to
   right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |  Async-Control-Character-Map
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
             ACCM (cont)           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Type

      2
ToP   noToC   RFC1331 - Page 49
   Length

      6

   Async-Control-Character-Map

      The Async-Control-Character-Map field is four octets and indicates
      the new async control character map.  The map is encoded in big-
      endian fashion where each numbered bit corresponds to the ASCII
      control character of the same value.  If the bit is cleared to
      zero, then that ASCII control character need not be mapped.  If
      the bit is set to one, then that ASCII control character must
      remain mapped.  E.g., if bit 19 is set to zero, then the ASCII
      control character 19 (DC3, Control-S) may be sent in the clear.

         Note: The bit ordering of the map is as described in section
         3.1, Most Significant Bit to Least Significant Bit.  The least
         significant bit of the least significant octet (the final octet
         transmitted) is numbered bit 0, and would map to the ASCII
         control character NUL.

   Default

      All ones (0xffffffff).
ToP   noToC   RFC1331 - Page 50
7.4.  Authentication-Protocol

   Description

      On some links it may be desirable to require a peer to
      authenticate itself before allowing network-layer protocol packets
      to be exchanged.  This Configuration Option provides a way to
      negotiate the use of a specific authentication protocol.  By
      default, authentication is not necessary.

      An implementation SHOULD NOT include multiple Authentication-
      Protocol Configuration Options in its Configure-Request packets.
      Instead, it SHOULD attempt to configure the most desirable
      protocol first.  If that protocol is Rejected, then the
      implementation could attempt the next most desirable protocol in
      the next Configure-Request.

      An implementation receiving a Configure-Request specifying
      Authentication-Protocols MAY choose at most one of the negotiable
      authentication protocols and MUST send a Configure-Reject
      including the other specified authentication protocols.  The
      implementation MAY reject all of the proposed authentication
      protocols.

      If an implementation sends a Configure-Ack with this Configuration
      Option, then it is agreeing to authenticate with the specified
      protocol.  An implementation receiving a Configure-Ack with this
      Configuration Option SHOULD expect the peer to authenticate with
      the acknowledged protocol.

      There is no requirement that authentication be full duplex or that
      the same protocol be used in both directions.  It is perfectly
      acceptable for different protocols to be used in each direction.
      This will, of course, depend on the specific protocols negotiated.

   A summary of the Authentication-Protocol Configuration Option format
   is shown below.  The fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |     Authentication-Protocol   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Data ...
   +-+-+-+-+
ToP   noToC   RFC1331 - Page 51
   Type

      3

   Length

      >= 4

   Authentication-Protocol

      The Authentication-Protocol field is two octets and indicates the
      authentication protocol desired.  Values for this field are always
      the same as the PPP Data Link Layer Protocol field values for that
      same authentication protocol.

      The most up-to-date values of the Authentication-Protocol field
      are specified in the most recent "Assigned Numbers" RFC [11].
      Current values are assigned as follows:

         Value (in hex)          Protocol

         c023                    Password Authentication Protocol
         c223                    Challenge Handshake Authentication
                                 Protocol

   Data

      The Data field is zero or more octets and contains additional data
      as determined by the particular protocol.

Default

   No authentication protocol necessary.
ToP   noToC   RFC1331 - Page 52
7.5.  Quality-Protocol

   Description

      On some links it may be desirable to determine when, and how
      often, the link is dropping data.  This process is called link
      quality monitoring.

      This Configuration Option provides a way to negotiate the use of a
      specific protocol for link quality monitoring.  By default, link
      quality monitoring is disabled.

      There is no requirement that quality monitoring be full duplex or
      that the same protocol be used in both directions.  It is
      perfectly acceptable for different protocols to be used in each
      direction.  This will, of course, depend on the specific protocols
      negotiated.

   A summary of the Quality-Protocol Configuration Option format is
   shown below.  The fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |        Quality-Protocol       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Data ...
   +-+-+-+-+

   Type

      4

   Length

      >= 4

   Quality-Protocol

      The Quality-Protocol field is two octets and indicates the link
      quality monitoring protocol desired.  Values for this field are
      always the same as the PPP Data Link Layer Protocol field values
      for that same monitoring protocol.

      The most up-to-date values of the Quality-Protocol field are
      specified in the most recent "Assigned Numbers" RFC [11].  Current
      values are assigned as follows:
ToP   noToC   RFC1331 - Page 53
         Value (in hex)          Protocol

         c025                    Link Quality Report

   Data

      The Data field is zero or more octets and contains additional data
      as determined by the particular protocol.

   Default

      None
ToP   noToC   RFC1331 - Page 54
7.6.  Magic-Number

   Description

      This Configuration Option provides a way to detect looped-back
      links and other Data Link Layer anomalies.  This Configuration
      Option MAY be required by some other Configuration Options such as
      the Monitoring-Protocol Configuration Option.

      Before this Configuration Option is requested, an implementation
      must choose its Magic-Number.  It is recommended that the Magic-
      Number be chosen in the most random manner possible in order to
      guarantee with very high probability that an implementation will
      arrive at a unique number.  A good way to choose a unique random
      number is to start with an unique seed.  Suggested sources of
      uniqueness include machine serial numbers, other network hardware
      addresses, time-of-day clocks, etc.  Particularly good random
      number seeds are precise measurements of the inter-arrival time of
      physical events such as packet reception on other connected
      networks, server response time, or the typing rate of a human
      user.  It is also suggested that as many sources as possible be
      used simultaneously.

      When a Configure-Request is received with a Magic-Number
      Configuration Option, the received Magic-Number is compared with
      the Magic-Number of the last Configure-Request sent to the peer.
      If the two Magic-Numbers are different, then the link is not
      looped-back, and the Magic-Number should be acknowledged.  If the
      two Magic-Numbers are equal, then it is possible, but not certain,
      that the link is looped-back and that this Configure-Request is
      actually the one last sent.  To determine this, a Configure-Nak
      should be sent specifying a different Magic-Number value.  A new
      Configure-Request should not be sent to the peer until normal
      processing would cause it to be sent (i.e., until a Configure-Nak
      is received or the Restart timer runs out).

      Reception of a Configure-Nak with a Magic-Number different from
      that of the last Configure-Nak sent to the peer proves that a link
      is not looped-back, and indicates a unique Magic-Number.  If the
      Magic-Number is equal to the one sent in the last Configure-Nak,
      the possibility of a looped-back link is increased, and a new
      Magic-Number should be chosen.  In either case, a new Configure-
      Request should be sent with the new Magic-Number.

      If the link is indeed looped-back, this sequence (transmit
      Configure-Request, receive Configure-Request, transmit Configure-
      Nak, receive Configure-Nak) will repeat over and over again.  If
      the link is not looped-back, this sequence might occur a few
ToP   noToC   RFC1331 - Page 55
      times, but it is extremely unlikely to occur repeatedly.  More
      likely, the Magic-Numbers chosen at either end will quickly
      diverge, terminating the sequence.  The following table shows the
      probability of collisions assuming that both ends of the link
      select Magic-Numbers with a perfectly uniform distribution:

         Number of Collisions        Probability
         --------------------   ---------------------
                 1              1/2**32    = 2.3 E-10
                 2              1/2**32**2 = 5.4 E-20
                 3              1/2**32**3 = 1.3 E-29

      Good sources of uniqueness or randomness are required for this
      divergence to occur.  If a good source of uniqueness cannot be
      found, it is recommended that this Configuration Option not be
      enabled; Configure-Requests with the option SHOULD NOT be
      transmitted and any Magic-Number Configuration Options which the
      peer sends SHOULD be either acknowledged or rejected.  In this
      case, loop-backs cannot be reliably detected by the
      implementation, although they may still be detectable by the peer.

      If an implementation does transmit a Configure-Request with a
      Magic-Number Configuration Option, then it MUST NOT respond with a
      Configure-Reject if its peer also transmits a Configure-Request
      with a Magic-Number Configuration Option.  That is, if an
      implementation desires to use Magic Numbers, then it MUST also
      allow its peer to do so.  If an implementation does receive a
      Configure-Reject in response to a Configure-Request, it can only
      mean that the link is not looped-back, and that its peer will not
      be using Magic-Numbers.  In this case, an implementation should
      act as if the negotiation had been successful (as if it had
      instead received a Configure-Ack).

      The Magic-Number also may be used to detect looped-back links
      during normal operation as well as during Configuration Option
      negotiation.  All LCP Echo-Request, Echo-Reply, and Discard-
      Request packets have a Magic-Number field which MUST normally be
      zero, and MUST normally be ignored on reception.  If Magic-Number
      has been successfully negotiated, an implementation MUST transmit
      these packets with the Magic-Number field set to its negotiated
      Magic-Number.

      The Magic-Number field of these packets SHOULD be inspected on
      reception.  All received Magic-Number fields MUST be equal to
      either zero or the peer's unique Magic-Number, depending on
      whether or not the peer negotiated one.

      Reception of a Magic-Number field equal to the negotiated local
ToP   noToC   RFC1331 - Page 56
      Magic-Number indicates a looped-back link.  Reception of a Magic-
      Number other than the negotiated local Magic-Number or the peer's
      negotiated Magic-Number, or zero if the peer didn't negotiate one,
      indicates a link which has been (mis)configured for communications
      with a different peer.

      Procedures for recovery from either case are unspecified and may
      vary from implementation to implementation.  A somewhat
      pessimistic procedure is to assume a LCP Down event.  A further
      Open event will begin the process of re-establishing the link,
      which can't complete until the loop-back condition is terminated
      and Magic-Numbers are successfully negotiated.  A more optimistic
      procedure (in the case of a loop-back) is to begin transmitting
      LCP Echo-Request packets until an appropriate Echo-Reply is
      received, indicating a termination of the loop-back condition.

   A summary of the Magic-Number Configuration Option format is shown
   below.  The fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |          Magic-Number
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         Magic-Number (cont)       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Type

      5

   Length

      6

   Magic-Number

      The Magic-Number field is four octets and indicates a number which
      is very likely to be unique to one end of the link.  A Magic-
      Number of zero is illegal and MUST always be Nak'd, if it is not
      Rejected outright.

   Default

      None.
ToP   noToC   RFC1331 - Page 57
7.7.  Protocol-Field-Compression

   Description

      This Configuration Option provides a way to negotiate the
      compression of the Data Link Layer Protocol field.  By default,
      all implementations MUST transmit standard PPP frames with two
      octet Protocol fields.  However, PPP Protocol field numbers are
      chosen such that some values may be compressed into a single octet
      form which is clearly distinguishable from the two octet form.
      This Configuration Option is sent to inform the peer that the
      implementation can receive such single octet Protocol fields.
      Compressed Protocol fields MUST NOT be transmitted unless this
      Configuration Option has been negotiated.

      As previously mentioned, the Protocol field uses an extension
      mechanism consistent with the ISO 3309 extension mechanism for the
      Address field; the Least Significant Bit (LSB) of each octet is
      used to indicate extension of the Protocol field.  A binary "0" as
      the LSB indicates that the Protocol field continues with the
      following octet.  The presence of a binary "1" as the LSB marks
      the last octet of the Protocol field.  Notice that any number of
      "0" octets may be prepended to the field, and will still indicate
      the same value (consider the two representations for 3, 00000011
      and 00000000 00000011).

      In the interest of simplicity, the standard PPP frame uses this
      fact and always sends Protocol fields with a two octet
      representation.  Protocol field values less than 256 (decimal) are
      prepended with a single zero octet even though transmission of
      this, the zero and most significant octet, is unnecessary.

      However, when using low speed links, it is desirable to conserve
      bandwidth by sending as little redundant data as possible.  The
      Protocol Compression Configuration Option allows a trade-off
      between implementation simplicity and bandwidth efficiency.  If
      successfully negotiated, the ISO 3309 extension mechanism may be
      used to compress the Protocol field to one octet instead of two.
      The large majority of frames are compressible since data protocols
      are typically assigned with Protocol field values less than 256.

      In addition, PPP implementations must continue to be robust and
      MUST accept PPP frames with either double-octet or single-octet
      Protocol fields, and MUST NOT distinguish between them.

      The Protocol field is never compressed when sending any LCP
      packet.  This rule guarantees unambiguous recognition of LCP
      packets.
ToP   noToC   RFC1331 - Page 58
      When a Protocol field is compressed, the Data Link Layer FCS field
      is calculated on the compressed frame, not the original
      uncompressed frame.

   A summary of the Protocol-Field-Compression Configuration Option
   format is shown below.  The fields are transmitted from left to
   right.

    0                   1
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Type

      7

   Length

      2

   Default

      Disabled.
ToP   noToC   RFC1331 - Page 59
7.8.  Address-and-Control-Field-Compression

   Description

      This Configuration Option provides a way to negotiate the
      compression of the Data Link Layer Address and Control fields.  By
      default, all implementations MUST transmit frames with Address and
      Control fields and MUST use the hexadecimal values 0xff and 0x03
      respectively.  Since these fields have constant values, they are
      easily compressed.  This Configuration Option is sent to inform
      the peer that the implementation can receive compressed Address
      and Control fields.

      Compressed Address and Control fields are formed by simply
      omitting them.  By definition the first octet of a two octet
      Protocol field will never be 0xff, and the Protocol field value
      0x00ff is not allowed (reserved) to avoid ambiguity.

      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.

      If a compressed frame is received when Address-and-Control-Field-
      Compression has not been negotiated, the implementation MAY
      silently discard the frame.

      The Address and Control fields MUST NOT be compressed when sending
      any LCP packet.  This rule guarantees unambiguous recognition of
      LCP packets.

      When the Address and Control fields are compressed, the Data Link
      Layer FCS field is calculated on the compressed frame, not the
      original uncompressed frame.

   A summary of the Address-and-Control-Field-Compression configuration
   option format is shown below.  The fields are transmitted from left
   to right.

    0                   1
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
ToP   noToC   RFC1331 - Page 60
   Type

      8

   Length

      2

   Default

      Not compressed.
ToP   noToC   RFC1331 - Page 61
A.  Asynchronous HDLC

   This appendix summarizes the modifications to ISO 3309-1979 proposed
   in ISO 3309:1984/PDAD1, as applied in the Point-to-Point Protocol.
   These modifications allow HDLC to be used with 8-bit asynchronous
   links.

   Transmission Considerations

      All octets are transmitted with one start bit, eight bits of data,
      and one stop bit.  There is no provision in either PPP or ISO
      3309:1984/PDAD1 for seven bit asynchronous links.

   Flag Sequence

      The Flag Sequence is a single octet and indicates the beginning or
      end of a frame.  The Flag Sequence consists of the binary sequence
      01111110 (hexadecimal 0x7e).

   Transparency

      On asynchronous links, a character 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).

      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 Remote 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 (i.e., 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 Local
      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.  A Control Escape octet
      immediately preceding the closing Flag Sequence indicates an
      invalid frame.

         Note: The inclusion of all octets less than hexadecimal 0x20
         allows all ASCII control characters [10] excluding DEL (Delete)
         to be transparently communicated through almost all known data
         communications equipment.
ToP   noToC   RFC1331 - Page 62
      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:

         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

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

         Note: On asynchronous links, 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
ToP   noToC   RFC1331 - Page 63
         garbage characters and interpret them as part of an incoming
         frame.  If the transmitter does not transmit 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).  Transmitters should avoid this by
         transmitting an open Flag Sequence whenever "appreciable time"
         has elapsed since the prior closing Flag Sequence.  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.  The maximum value for "appreciable
         time" is likely to be no greater than the typing rate of a slow
         to average typist, say 1 second.
ToP   noToC   RFC1331 - Page 64
B.  Fast Frame Check Sequence (FCS) Implementation

B.1.  FCS Computation Method

   The following code provides a table lookup computation for
   calculating the Frame Check Sequence as data arrives at the
   interface.  This implementation is based on [7], [8], and [9].  The
   table is created by the code in section B.2.

   /*
    * u16 represents an unsigned 16-bit number.  Adjust the typedef for
    * your hardware.
    */
   typedef unsigned short u16;


   /*
    * FCS lookup table as calculated by the table generator in section
    * B.2.
    */
   static u16 fcstab[256] = {
      0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
      0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
      0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
      0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
      0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
      0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
      0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
      0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
      0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
      0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
      0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
      0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
      0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
      0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
      0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
      0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
      0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
      0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
      0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
      0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
      0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
      0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
      0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
      0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
      0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
      0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
      0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
ToP   noToC   RFC1331 - Page 65
      0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
      0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
      0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
      0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
      0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
   };

   #define PPPINITFCS      0xffff  /* Initial FCS value */
   #define PPPGOODFCS      0xf0b8  /* Good final FCS value */

   /*
    * Calculate a new fcs given the current fcs and the new data.
    */
   u16 pppfcs(fcs, cp, len)
       register u16 fcs;
       register unsigned char *cp;
       register int len;
   {
       ASSERT(sizeof (u16) == 2);
       ASSERT(((u16) -1) > 0);
       while (len--)
           fcs = (fcs >> 8) ^ fcstab[(fcs ^ *cp++) & 0xff];

       return (fcs);
   }
ToP   noToC   RFC1331 - Page 66
B.2.  Fast FCS table generator

   The following code creates the lookup table used to calculate the
   FCS.

   /*
    * Generate a FCS table for the HDLC FCS.
    *
    * Drew D. Perkins at Carnegie Mellon University.
    *
    * Code liberally borrowed from Mohsen Banan and D. Hugh Redelmeier.
    */

   /*
    * The HDLC polynomial: x**0 + x**5 + x**12 + x**16 (0x8408).
    */
   #define P       0x8408


   main()
   {
       register unsigned int b, v;
       register int i;

       printf("typedef unsigned short u16;\n");
       printf("static u16 fcstab[256] = {");
       for (b = 0; ; ) {
           if (b % 8 == 0)
               printf("\n");

           v = b;
           for (i = 8; i--; )
               v = v & 1 ? (v >> 1) ^ P : v >> 1;

           printf("0x%04x", v & 0xFFFF);
           if (++b == 256)
               break;
           printf(",");
       }
       printf("\n};\n");
   }
ToP   noToC   RFC1331 - Page 67
C.  LCP Recommended Options

   The following Configurations Options are recommended:

      SYNC LINES

      Magic Number
      Link Quality Monitoring
      No Address and Control Field Compression
      No Protocol Field Compression


      ASYNC LINES

      Async Control Character Map
      Magic Number
      Address and Control Field Compression
      Protocol Field Compression
ToP   noToC   RFC1331 - Page 68
Security Considerations

   Security issues are briefly discussed in sections concerning the
   Authentication Phase, and the Authentication-Protocol Configuration
   Option.  Further discussion is planned in a separate document
   entitled PPP Authentication Protocols.

References

   [1]   Electronic Industries Association, EIA Standard RS-232-C,
         "Interface Between Data Terminal Equipment and Data
         Communications Equipment Employing Serial Binary Data
         Interchange", August 1969.

   [2]   International Organization For Standardization, ISO Standard
         3309-1979, "Data communication - High-level data link control
         procedures - Frame structure", 1979.

   [3]   International Organization For Standardization, ISO Standard
         4335-1979, "Data communication - High-level data link control
         procedures - Elements of procedures", 1979.

   [4]   International Organization For Standardization, ISO Standard
         4335-1979/Addendum 1, "Data communication - High-level data
         link control procedures - Elements of procedures - Addendum 1",
         1979.

   [5]   International Organization For Standardization, Proposed Draft
         International Standard ISO 3309:1983/PDAD1, "Information
         processing systems - Data communication - High-level data link
         control procedures - Frame structure - Addendum 1: Start/stop
         transmission", 1984.

   [6]   International Telecommunication Union, CCITT Recommendation
         X.25, "Interface Between Data Terminal Equipment (DTE) and Data
         Circuit Terminating Equipment (DCE) for Terminals Operating in
         the Packet Mode on Public Data Networks", CCITT Red Book,
         Volume VIII, Fascicle VIII.3, Rec. X.25., October 1984.

   [7]   Perez, "Byte-wise CRC Calculations", IEEE Micro, June, 1983.

   [8]   Morse, G., "Calculating CRC's by Bits and Bytes", Byte,
         September 1986.

   [9]   LeVan, J., "A Fast CRC", Byte, November 1987.

   [10]  American National Standards Institute, ANSI X3.4-1977,
         "American National Standard Code for Information Interchange",
ToP   noToC   RFC1331 - Page 69
         1977.

   [11]  Reynolds, J., and J. Postel, "Assigned Numbers", RFC 1060,
         USC/Information Sciences Institute, March 1990.

Acknowledgments

   Much of the text in this document is taken from the WG Requirements
   (unpublished), and RFCs 1171 & 1172, by Drew Perkins of Carnegie
   Mellon University, and by Russ Hobby of the University of California
   at Davis.

   Many people spent significant time helping to develop the Point-to-
   Point Protocol.  The complete list of people is too numerous to list,
   but the following people deserve special thanks: Rick Adams (UUNET),
   Ken Adelman (TGV), Fred Baker (ACC), Mike Ballard (Telebit), Craig
   Fox (NSC), Karl Fox (Morning Star Technologies), Phill Gross (NRI),
   former WG chair Russ Hobby (UC Davis), David Kaufman (Proteon),
   former WG chair Steve Knowles (FTP Software), John LoVerso
   (Xylogics), Bill Melohn (Sun Microsystems), Mike Patton (MIT), former
   WG chair Drew Perkins (CMU), Greg Satz (cisco systems) and Asher
   Waldfogel (Wellfleet).

Chair's Address

   The working group can be contacted via the current chair:

      Brian Lloyd
      Lloyd & Associates
      3420 Sudbury Road
      Cameron Park, California 95682

      Phone: (916) 676-1147

      EMail: brian@ray.lloyd.com


Author's Address

   Questions about this memo can also be directed to:

      William Allen Simpson
      Daydreamer
      Computer Systems Consulting Services
      P O Box 6205
      East Lansing, MI  48826-6025

      EMail: bsimpson@ray.lloyd.com