home *** CD-ROM | disk | FTP | other *** search
/ Hackers Toolkit 2.0 / Hackers_Toolkit_v2.0.iso / HTML / archive / Texts / Rfc / RFC1661.TXT < prev    next >
Encoding:
Text File  |  1999-11-04  |  100.6 KB  |  3,027 lines

  1. Network Working Group                                 W. Simpson, Editor
  2. Request for Comments: 1661                                    Daydreamer
  3. STD: 51                                                        July 1994
  4. Obsoletes: 1548
  5. Category: Standards Track
  6.  
  7.  
  8.                    The Point-to-Point Protocol (PPP)
  9.  
  10.  
  11.  
  12. Status of this Memo
  13.  
  14.    This document specifies an Internet standards track protocol for the
  15.    Internet community, and requests discussion and suggestions for
  16.    improvements.  Please refer to the current edition of the "Internet
  17.    Official Protocol Standards" (STD 1) for the standardization state
  18.    and status of this protocol.  Distribution of this memo is unlimited.
  19.  
  20.  
  21. Abstract
  22.  
  23.    The Point-to-Point Protocol (PPP) provides a standard method for
  24.    transporting multi-protocol datagrams over point-to-point links.  PPP
  25.    is comprised of three main components:
  26.  
  27.       1. A method for encapsulating multi-protocol datagrams.
  28.  
  29.       2. A Link Control Protocol (LCP) for establishing, configuring,
  30.          and testing the data-link connection.
  31.  
  32.       3. A family of Network Control Protocols (NCPs) for establishing
  33.          and configuring different network-layer protocols.
  34.  
  35.    This document defines the PPP organization and methodology, and the
  36.    PPP encapsulation, together with an extensible option negotiation
  37.    mechanism which is able to negotiate a rich assortment of
  38.    configuration parameters and provides additional management
  39.    functions.  The PPP Link Control Protocol (LCP) is described in terms
  40.    of this mechanism.
  41.  
  42.  
  43. Table of Contents
  44.  
  45.  
  46.      1.     Introduction ..........................................    1
  47.         1.1       Specification of Requirements ...................    2
  48.         1.2       Terminology .....................................    3
  49.  
  50.      2.     PPP Encapsulation .....................................    4
  51.  
  52.  
  53. Simpson                                                         [Page i]
  54.  
  55. RFC 1661                Point-to-Point Protocol                July 1994
  56.  
  57.  
  58.      3.     PPP Link Operation ....................................    6
  59.         3.1       Overview ........................................    6
  60.         3.2       Phase Diagram ...................................    6
  61.         3.3       Link Dead (physical-layer not ready) ............    7
  62.         3.4       Link Establishment Phase ........................    7
  63.         3.5       Authentication Phase ............................    8
  64.         3.6       Network-Layer Protocol Phase ....................    8
  65.         3.7       Link Termination Phase ..........................    9
  66.  
  67.      4.     The Option Negotiation Automaton ......................   11
  68.         4.1       State Transition Table ..........................   12
  69.         4.2       States ..........................................   14
  70.         4.3       Events ..........................................   16
  71.         4.4       Actions .........................................   21
  72.         4.5       Loop Avoidance ..................................   23
  73.         4.6       Counters and Timers .............................   24
  74.  
  75.      5.     LCP Packet Formats ....................................   26
  76.         5.1       Configure-Request ...............................   28
  77.         5.2       Configure-Ack ...................................   29
  78.         5.3       Configure-Nak ...................................   30
  79.         5.4       Configure-Reject ................................   31
  80.         5.5       Terminate-Request and Terminate-Ack .............   33
  81.         5.6       Code-Reject .....................................   34
  82.         5.7       Protocol-Reject .................................   35
  83.         5.8       Echo-Request and Echo-Reply .....................   36
  84.         5.9       Discard-Request .................................   37
  85.  
  86.      6.     LCP Configuration Options .............................   39
  87.         6.1       Maximum-Receive-Unit (MRU) ......................   41
  88.         6.2       Authentication-Protocol .........................   42
  89.         6.3       Quality-Protocol ................................   43
  90.         6.4       Magic-Number ....................................   45
  91.         6.5       Protocol-Field-Compression (PFC) ................   48
  92.         6.6       Address-and-Control-Field-Compression (ACFC)
  93.  
  94.      SECURITY CONSIDERATIONS ......................................   51
  95.      REFERENCES ...................................................   51
  96.      ACKNOWLEDGEMENTS .............................................   51
  97.      CHAIR'S ADDRESS ..............................................   52
  98.      EDITOR'S ADDRESS .............................................   52
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. Simpson                                                        [Page ii]
  110.  
  111. RFC 1661                Point-to-Point Protocol                July 1994
  112.  
  113.  
  114. 1.  Introduction
  115.  
  116.    The Point-to-Point Protocol is designed for simple links which
  117.    transport packets between two peers.  These links provide full-duplex
  118.    simultaneous bi-directional operation, and are assumed to deliver
  119.    packets in order.  It is intended that PPP provide a common solution
  120.    for easy connection of a wide variety of hosts, bridges and routers
  121.    [1].
  122.  
  123.    Encapsulation
  124.  
  125.       The PPP encapsulation provides for multiplexing of different
  126.       network-layer protocols simultaneously over the same link.  The
  127.       PPP encapsulation has been carefully designed to retain
  128.       compatibility with most commonly used supporting hardware.
  129.  
  130.       Only 8 additional octets are necessary to form the encapsulation
  131.       when used within the default HDLC-like framing.  In environments
  132.       where bandwidth is at a premium, the encapsulation and framing may
  133.       be shortened to 2 or 4 octets.
  134.  
  135.       To support high speed implementations, the default encapsulation
  136.       uses only simple fields, only one of which needs to be examined
  137.       for demultiplexing.  The default header and information fields
  138.       fall on 32-bit boundaries, and the trailer may be padded to an
  139.       arbitrary boundary.
  140.  
  141.    Link Control Protocol
  142.  
  143.       In order to be sufficiently versatile to be portable to a wide
  144.       variety of environments, PPP provides a Link Control Protocol
  145.       (LCP).  The LCP is used to automatically agree upon the
  146.       encapsulation format options, handle varying limits on sizes of
  147.       packets, detect a looped-back link and other common
  148.       misconfiguration errors, and terminate the link.  Other optional
  149.       facilities provided are authentication of the identity of its peer
  150.       on the link, and determination when a link is functioning properly
  151.       and when it is failing.
  152.  
  153.    Network Control Protocols
  154.  
  155.       Point-to-Point links tend to exacerbate many problems with the
  156.       current family of network protocols.  For instance, assignment and
  157.       management of IP addresses, which is a problem even in LAN
  158.       environments, is especially difficult over circuit-switched
  159.       point-to-point links (such as dial-up modem servers).  These
  160.       problems are handled by a family of Network Control Protocols
  161.       (NCPs), which each manage the specific needs required by their
  162.  
  163.  
  164.  
  165. Simpson                                                         [Page 1]
  166.  
  167. RFC 1661                Point-to-Point Protocol                July 1994
  168.  
  169.  
  170.       respective network-layer protocols.  These NCPs are defined in
  171.       companion documents.
  172.  
  173.    Configuration
  174.  
  175.       It is intended that PPP links be easy to configure.  By design,
  176.       the standard defaults handle all common configurations.  The
  177.       implementor can specify improvements to the default configuration,
  178.       which are automatically communicated to the peer without operator
  179.       intervention.  Finally, the operator may explicitly configure
  180.       options for the link which enable the link to operate in
  181.       environments where it would otherwise be impossible.
  182.  
  183.       This self-configuration is implemented through an extensible
  184.       option negotiation mechanism, wherein each end of the link
  185.       describes to the other its capabilities and requirements.
  186.       Although the option negotiation mechanism described in this
  187.       document is specified in terms of the Link Control Protocol (LCP),
  188.       the same facilities are designed to be used by other control
  189.       protocols, especially the family of NCPs.
  190.  
  191.  
  192.  
  193. 1.1.  Specification of Requirements
  194.  
  195.    In this document, several words are used to signify the requirements
  196.    of the specification.  These words are often capitalized.
  197.  
  198.    MUST      This word, or the adjective "required", means that the
  199.              definition is an absolute requirement of the specification.
  200.  
  201.    MUST NOT  This phrase means that the definition is an absolute
  202.              prohibition of the specification.
  203.  
  204.    SHOULD    This word, or the adjective "recommended", means that there
  205.              may exist valid reasons in particular circumstances to
  206.              ignore this item, but the full implications must be
  207.              understood and carefully weighed before choosing a
  208.              different course.
  209.  
  210.    MAY       This word, or the adjective "optional", means that this
  211.              item is one of an allowed set of alternatives.  An
  212.              implementation which does not include this option MUST be
  213.              prepared to interoperate with another implementation which
  214.              does include the option.
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221. Simpson                                                         [Page 2]
  222.  
  223. RFC 1661                Point-to-Point Protocol                July 1994
  224.  
  225.  
  226. 1.2.  Terminology
  227.  
  228.    This document frequently uses the following terms:
  229.  
  230.    datagram  The unit of transmission in the network layer (such as IP).
  231.              A datagram may be encapsulated in one or more packets
  232.              passed to the data link layer.
  233.  
  234.    frame     The unit of transmission at the data link layer.  A frame
  235.              may include a header and/or a trailer, along with some
  236.              number of units of data.
  237.  
  238.    packet    The basic unit of encapsulation, which is passed across the
  239.              interface between the network layer and the data link
  240.              layer.  A packet is usually mapped to a frame; the
  241.              exceptions are when data link layer fragmentation is being
  242.              performed, or when multiple packets are incorporated into a
  243.              single frame.
  244.  
  245.    peer      The other end of the point-to-point link.
  246.  
  247.    silently discard
  248.              The implementation discards the packet without further
  249.              processing.  The implementation SHOULD provide the
  250.              capability of logging the error, including the contents of
  251.              the silently discarded packet, and SHOULD record the event
  252.              in a statistics counter.
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277. Simpson                                                         [Page 3]
  278.  
  279. RFC 1661                Point-to-Point Protocol                July 1994
  280.  
  281.  
  282. 2.  PPP Encapsulation
  283.  
  284.    The PPP encapsulation is used to disambiguate multiprotocol
  285.    datagrams.  This encapsulation requires framing to indicate the
  286.    beginning and end of the encapsulation.  Methods of providing framing
  287.    are specified in companion documents.
  288.  
  289.    A summary of the PPP encapsulation is shown below.  The fields are
  290.    transmitted from left to right.
  291.  
  292.            +----------+-------------+---------+
  293.            | Protocol | Information | Padding |
  294.            | 8/16 bits|      *      |    *    |
  295.            +----------+-------------+---------+
  296.  
  297.  
  298.    Protocol Field
  299.  
  300.       The Protocol field is one or two octets, and its value identifies
  301.       the datagram encapsulated in the Information field of the packet.
  302.       The field is transmitted and received most significant octet
  303.       first.
  304.  
  305.       The structure of this field is consistent with the ISO 3309
  306.       extension mechanism for address fields.  All Protocols MUST be
  307.       odd; the least significant bit of the least significant octet MUST
  308.       equal "1".  Also, all Protocols MUST be assigned such that the
  309.       least significant bit of the most significant octet equals "0".
  310.       Frames received which don't comply with these rules MUST be
  311.       treated as having an unrecognized Protocol.
  312.  
  313.       Protocol field values in the "0***" to "3***" range identify the
  314.       network-layer protocol of specific packets, and values in the
  315.       "8***" to "b***" range identify packets belonging to the
  316.       associated Network Control Protocols (NCPs), if any.
  317.  
  318.       Protocol field values in the "4***" to "7***" range are used for
  319.       protocols with low volume traffic which have no associated NCP.
  320.       Protocol field values in the "c***" to "f***" range identify
  321.       packets as link-layer Control Protocols (such as LCP).
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333. Simpson                                                         [Page 4]
  334.  
  335. RFC 1661                Point-to-Point Protocol                July 1994
  336.  
  337.  
  338.       Up-to-date values of the Protocol field are specified in the most
  339.       recent "Assigned Numbers" RFC [2].  This specification reserves
  340.       the following values:
  341.  
  342.       Value (in hex)  Protocol Name
  343.  
  344.       0001            Padding Protocol
  345.       0003 to 001f    reserved (transparency inefficient)
  346.       007d            reserved (Control Escape)
  347.       00cf            reserved (PPP NLPID)
  348.       00ff            reserved (compression inefficient)
  349.  
  350.       8001 to 801f    unused
  351.       807d            unused
  352.       80cf            unused
  353.       80ff            unused
  354.  
  355.       c021            Link Control Protocol
  356.       c023            Password Authentication Protocol
  357.       c025            Link Quality Report
  358.       c223            Challenge Handshake Authentication Protocol
  359.  
  360.       Developers of new protocols MUST obtain a number from the Internet
  361.       Assigned Numbers Authority (IANA), at IANA@isi.edu.
  362.  
  363.  
  364.    Information Field
  365.  
  366.       The Information field is zero or more octets.  The Information
  367.       field contains the datagram for the protocol specified in the
  368.       Protocol field.
  369.  
  370.       The maximum length for the Information field, including Padding,
  371.       but not including the Protocol field, is termed the Maximum
  372.       Receive Unit (MRU), which defaults to 1500 octets.  By
  373.       negotiation, consenting PPP implementations may use other values
  374.       for the MRU.
  375.  
  376.  
  377.    Padding
  378.  
  379.       On transmission, the Information field MAY be padded with an
  380.       arbitrary number of octets up to the MRU.  It is the
  381.       responsibility of each protocol to distinguish padding octets from
  382.       real information.
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389. Simpson                                                         [Page 5]
  390.  
  391. RFC 1661                Point-to-Point Protocol                July 1994
  392.  
  393.  
  394. 3.  PPP Link Operation
  395.  
  396. 3.1.  Overview
  397.  
  398.    In order to establish communications over a point-to-point link, each
  399.    end of the PPP link MUST first send LCP packets to configure and test
  400.    the data link.  After the link has been established, the peer MAY be
  401.    authenticated.
  402.  
  403.    Then, PPP MUST send NCP packets to choose and configure one or more
  404.    network-layer protocols.  Once each of the chosen network-layer
  405.    protocols has been configured, datagrams from each network-layer
  406.    protocol can be sent over the link.
  407.  
  408.    The link will remain configured for communications until explicit LCP
  409.    or NCP packets close the link down, or until some external event
  410.    occurs (an inactivity timer expires or network administrator
  411.    intervention).
  412.  
  413.  
  414.  
  415. 3.2.  Phase Diagram
  416.  
  417.    In the process of configuring, maintaining and terminating the
  418.    point-to-point link, the PPP link goes through several distinct
  419.    phases which are specified in the following simplified state diagram:
  420.  
  421.    +------+        +-----------+           +--------------+
  422.    |      | UP     |           | OPENED    |              | SUCCESS/NONE
  423.    | Dead |------->| Establish |---------->| Authenticate |--+
  424.    |      |        |           |           |              |  |
  425.    +------+        +-----------+           +--------------+  |
  426.       ^               |                        |             |
  427.       |          FAIL |                   FAIL |             |
  428.       +<--------------+             +----------+             |
  429.       |                             |                        |
  430.       |            +-----------+    |           +---------+  |
  431.       |       DOWN |           |    |   CLOSING |         |  |
  432.       +------------| Terminate |<---+<----------| Network |<-+
  433.                    |           |                |         |
  434.                    +-----------+                +---------+
  435.  
  436.    Not all transitions are specified in this diagram.  The following
  437.    semantics MUST be followed.
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445. Simpson                                                         [Page 6]
  446.  
  447. RFC 1661                Point-to-Point Protocol                July 1994
  448.  
  449.  
  450. 3.3.  Link Dead (physical-layer not ready)
  451.  
  452.    The link necessarily begins and ends with this phase.  When an
  453.    external event (such as carrier detection or network administrator
  454.    configuration) indicates that the physical-layer is ready to be used,
  455.    PPP will proceed to the Link Establishment phase.
  456.  
  457.    During this phase, the LCP automaton (described later) will be in the
  458.    Initial or Starting states.  The transition to the Link Establishment
  459.    phase will signal an Up event to the LCP automaton.
  460.  
  461.    Implementation Note:
  462.  
  463.       Typically, a link will return to this phase automatically after
  464.       the disconnection of a modem.  In the case of a hard-wired link,
  465.       this phase may be extremely short -- merely long enough to detect
  466.       the presence of the device.
  467.  
  468.  
  469.  
  470. 3.4.  Link Establishment Phase
  471.  
  472.    The Link Control Protocol (LCP) is used to establish the connection
  473.    through an exchange of Configure packets.  This exchange is complete,
  474.    and the LCP Opened state entered, once a Configure-Ack packet
  475.    (described later) has been both sent and received.
  476.  
  477.    All Configuration Options are assumed to be at default values unless
  478.    altered by the configuration exchange.  See the chapter on LCP
  479.    Configuration Options for further discussion.
  480.  
  481.    It is important to note that only Configuration Options which are
  482.    independent of particular network-layer protocols are configured by
  483.    LCP.  Configuration of individual network-layer protocols is handled
  484.    by separate Network Control Protocols (NCPs) during the Network-Layer
  485.    Protocol phase.
  486.  
  487.    Any non-LCP packets received during this phase MUST be silently
  488.    discarded.
  489.  
  490.    The receipt of the LCP Configure-Request causes a return to the Link
  491.    Establishment phase from the Network-Layer Protocol phase or
  492.    Authentication phase.
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501. Simpson                                                         [Page 7]
  502.  
  503. RFC 1661                Point-to-Point Protocol                July 1994
  504.  
  505.  
  506. 3.5.  Authentication Phase
  507.  
  508.    On some links it may be desirable to require a peer to authenticate
  509.    itself before allowing network-layer protocol packets to be
  510.    exchanged.
  511.  
  512.    By default, authentication is not mandatory.  If an implementation
  513.    desires that the peer authenticate with some specific authentication
  514.    protocol, then it MUST request the use of that authentication
  515.    protocol during Link Establishment phase.
  516.  
  517.    Authentication SHOULD take place as soon as possible after link
  518.    establishment.  However, link quality determination MAY occur
  519.    concurrently.  An implementation MUST NOT allow the exchange of link
  520.    quality determination packets to delay authentication indefinitely.
  521.  
  522.    Advancement from the Authentication phase to the Network-Layer
  523.    Protocol phase MUST NOT occur until authentication has completed.  If
  524.    authentication fails, the authenticator SHOULD proceed instead to the
  525.    Link Termination phase.
  526.  
  527.    Only Link Control Protocol, authentication protocol, and link quality
  528.    monitoring packets are allowed during this phase.  All other packets
  529.    received during this phase MUST be silently discarded.
  530.  
  531.    Implementation Notes:
  532.  
  533.       An implementation SHOULD NOT fail authentication simply due to
  534.       timeout or lack of response.  The authentication SHOULD allow some
  535.       method of retransmission, and proceed to the Link Termination
  536.       phase only after a number of authentication attempts has been
  537.       exceeded.
  538.  
  539.       The implementation responsible for commencing Link Termination
  540.       phase is the implementation which has refused authentication to
  541.       its peer.
  542.  
  543.  
  544.  
  545. 3.6.  Network-Layer Protocol Phase
  546.  
  547.    Once PPP has finished the previous phases, each network-layer
  548.    protocol (such as IP, IPX, or AppleTalk) MUST be separately
  549.    configured by the appropriate Network Control Protocol (NCP).
  550.  
  551.    Each NCP MAY be Opened and Closed at any time.
  552.  
  553.  
  554.  
  555.  
  556.  
  557. Simpson                                                         [Page 8]
  558.  
  559. RFC 1661                Point-to-Point Protocol                July 1994
  560.  
  561.  
  562.    Implementation Note:
  563.  
  564.       Because an implementation may initially use a significant amount
  565.       of time for link quality determination, implementations SHOULD
  566.       avoid fixed timeouts when waiting for their peers to configure a
  567.       NCP.
  568.  
  569.    After a NCP has reached the Opened state, PPP will carry the
  570.    corresponding network-layer protocol packets.  Any supported
  571.    network-layer protocol packets received when the corresponding NCP is
  572.    not in the Opened state MUST be silently discarded.
  573.  
  574.    Implementation Note:
  575.  
  576.       While LCP is in the Opened state, any protocol packet which is
  577.       unsupported by the implementation MUST be returned in a Protocol-
  578.       Reject (described later).  Only protocols which are supported are
  579.       silently discarded.
  580.  
  581.    During this phase, link traffic consists of any possible combination
  582.    of LCP, NCP, and network-layer protocol packets.
  583.  
  584.  
  585.  
  586. 3.7.  Link Termination Phase
  587.  
  588.    PPP can terminate the link at any time.  This might happen because of
  589.    the loss of carrier, authentication failure, link quality failure,
  590.    the expiration of an idle-period timer, or the administrative closing
  591.    of the link.
  592.  
  593.    LCP is used to close the link through an exchange of Terminate
  594.    packets.  When the link is closing, PPP informs the network-layer
  595.    protocols so that they may take appropriate action.
  596.  
  597.    After the exchange of Terminate packets, the implementation SHOULD
  598.    signal the physical-layer to disconnect in order to enforce the
  599.    termination of the link, particularly in the case of an
  600.    authentication failure.  The sender of the Terminate-Request SHOULD
  601.    disconnect after receiving a Terminate-Ack, or after the Restart
  602.    counter expires.  The receiver of a Terminate-Request SHOULD wait for
  603.    the peer to disconnect, and MUST NOT disconnect until at least one
  604.    Restart time has passed after sending a Terminate-Ack.  PPP SHOULD
  605.    proceed to the Link Dead phase.
  606.  
  607.    Any non-LCP packets received during this phase MUST be silently
  608.    discarded.
  609.  
  610.  
  611.  
  612.  
  613. Simpson                                                         [Page 9]
  614.  
  615. RFC 1661                Point-to-Point Protocol                July 1994
  616.  
  617.  
  618.    Implementation Note:
  619.  
  620.       The closing of the link by LCP is sufficient.  There is no need
  621.       for each NCP to send a flurry of Terminate packets.  Conversely,
  622.       the fact that one NCP has Closed is not sufficient reason to cause
  623.       the termination of the PPP link, even if that NCP was the only NCP
  624.       currently in the Opened state.
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669. Simpson                                                        [Page 10]
  670.  
  671. RFC 1661                Point-to-Point Protocol                July 1994
  672.  
  673.  
  674. 4.  The Option Negotiation Automaton
  675.  
  676.    The finite-state automaton is defined by events, actions and state
  677.    transitions.  Events include reception of external commands such as
  678.    Open and Close, expiration of the Restart timer, and reception of
  679.    packets from a peer.  Actions include the starting of the Restart
  680.    timer and transmission of packets to the peer.
  681.  
  682.    Some types of packets -- Configure-Naks and Configure-Rejects, or
  683.    Code-Rejects and Protocol-Rejects, or Echo-Requests, Echo-Replies and
  684.    Discard-Requests -- are not differentiated in the automaton
  685.    descriptions.  As will be described later, these packets do indeed
  686.    serve different functions.  However, they always cause the same
  687.    transitions.
  688.  
  689.    Events                                   Actions
  690.  
  691.    Up   = lower layer is Up                 tlu = This-Layer-Up
  692.    Down = lower layer is Down               tld = This-Layer-Down
  693.    Open = administrative Open               tls = This-Layer-Started
  694.    Close= administrative Close              tlf = This-Layer-Finished
  695.  
  696.    TO+  = Timeout with counter > 0          irc = Initialize-Restart-Count
  697.    TO-  = Timeout with counter expired      zrc = Zero-Restart-Count
  698.  
  699.    RCR+ = Receive-Configure-Request (Good)  scr = Send-Configure-Request
  700.    RCR- = Receive-Configure-Request (Bad)
  701.    RCA  = Receive-Configure-Ack             sca = Send-Configure-Ack
  702.    RCN  = Receive-Configure-Nak/Rej         scn = Send-Configure-Nak/Rej
  703.  
  704.    RTR  = Receive-Terminate-Request         str = Send-Terminate-Request
  705.    RTA  = Receive-Terminate-Ack             sta = Send-Terminate-Ack
  706.  
  707.    RUC  = Receive-Unknown-Code              scj = Send-Code-Reject
  708.    RXJ+ = Receive-Code-Reject (permitted)
  709.        or Receive-Protocol-Reject
  710.    RXJ- = Receive-Code-Reject (catastrophic)
  711.        or Receive-Protocol-Reject
  712.    RXR  = Receive-Echo-Request              ser = Send-Echo-Reply
  713.        or Receive-Echo-Reply
  714.        or Receive-Discard-Request
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725. Simpson                                                        [Page 11]
  726.  
  727. RFC 1661                Point-to-Point Protocol                July 1994
  728.  
  729.  
  730. 4.1.  State Transition Table
  731.  
  732.    The complete state transition table follows.  States are indicated
  733.    horizontally, and events are read vertically.  State transitions and
  734.    actions are represented in the form action/new-state.  Multiple
  735.    actions are separated by commas, and may continue on succeeding lines
  736.    as space requires; multiple actions may be implemented in any
  737.    convenient order.  The state may be followed by a letter, which
  738.    indicates an explanatory footnote.  The dash ('-') indicates an
  739.    illegal transition.
  740.  
  741.       | State
  742.       |    0         1         2         3         4         5
  743. Events| Initial   Starting  Closed    Stopped   Closing   Stopping
  744. ------+-----------------------------------------------------------
  745.  Up   |    2     irc,scr/6     -         -         -         -
  746.  Down |    -         -         0       tls/1       0         1
  747.  Open |  tls/1       1     irc,scr/6     3r        5r        5r
  748.  Close|    0       tlf/0       2         2         4         4
  749.       |
  750.   TO+ |    -         -         -         -       str/4     str/5
  751.   TO- |    -         -         -         -       tlf/2     tlf/3
  752.       |
  753.  RCR+ |    -         -       sta/2 irc,scr,sca/8   4         5
  754.  RCR- |    -         -       sta/2 irc,scr,scn/6   4         5
  755.  RCA  |    -         -       sta/2     sta/3       4         5
  756.  RCN  |    -         -       sta/2     sta/3       4         5
  757.       |
  758.  RTR  |    -         -       sta/2     sta/3     sta/4     sta/5
  759.  RTA  |    -         -         2         3       tlf/2     tlf/3
  760.       |
  761.  RUC  |    -         -       scj/2     scj/3     scj/4     scj/5
  762.  RXJ+ |    -         -         2         3         4         5
  763.  RXJ- |    -         -       tlf/2     tlf/3     tlf/2     tlf/3
  764.       |
  765.  RXR  |    -         -         2         3         4         5
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781. Simpson                                                        [Page 12]
  782.  
  783. RFC 1661                Point-to-Point Protocol                July 1994
  784.  
  785.  
  786.  
  787.       | State
  788.       |    6         7         8           9
  789. Events| Req-Sent  Ack-Rcvd  Ack-Sent    Opened
  790. ------+-----------------------------------------
  791.  Up   |    -         -         -           -
  792.  Down |    1         1         1         tld/1
  793.  Open |    6         7         8           9r
  794.  Close|irc,str/4 irc,str/4 irc,str/4 tld,irc,str/4
  795.       |
  796.   TO+ |  scr/6     scr/6     scr/8         -
  797.   TO- |  tlf/3p    tlf/3p    tlf/3p        -
  798.       |
  799.  RCR+ |  sca/8   sca,tlu/9   sca/8   tld,scr,sca/8
  800.  RCR- |  scn/6     scn/7     scn/6   tld,scr,scn/6
  801.  RCA  |  irc/7     scr/6x  irc,tlu/9   tld,scr/6x
  802.  RCN  |irc,scr/6   scr/6x  irc,scr/8   tld,scr/6x
  803.       |
  804.  RTR  |  sta/6     sta/6     sta/6   tld,zrc,sta/5
  805.  RTA  |    6         6         8       tld,scr/6
  806.       |
  807.  RUC  |  scj/6     scj/7     scj/8       scj/9
  808.  RXJ+ |    6         6         8           9
  809.  RXJ- |  tlf/3     tlf/3     tlf/3   tld,irc,str/5
  810.       |
  811.  RXR  |    6         7         8         ser/9
  812.  
  813.  
  814.    The states in which the Restart timer is running are identifiable by
  815.    the presence of TO events.  Only the Send-Configure-Request, Send-
  816.    Terminate-Request and Zero-Restart-Count actions start or re-start
  817.    the Restart timer.  The Restart timer is stopped when transitioning
  818.    from any state where the timer is running to a state where the timer
  819.    is not running.
  820.  
  821.    The events and actions are defined according to a message passing
  822.    architecture, rather than a signalling architecture.  If an action is
  823.    desired to control specific signals (such as DTR), additional actions
  824.    are likely to be required.
  825.  
  826.    [p]   Passive option; see Stopped state discussion.
  827.  
  828.    [r]   Restart option; see Open event discussion.
  829.  
  830.    [x]   Crossed connection; see RCA event discussion.
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837. Simpson                                                        [Page 13]
  838.  
  839. RFC 1661                Point-to-Point Protocol                July 1994
  840.  
  841.  
  842. 4.2.  States
  843.  
  844.    Following is a more detailed description of each automaton state.
  845.  
  846.    Initial
  847.  
  848.       In the Initial state, the lower layer is unavailable (Down), and
  849.       no Open has occurred.  The Restart timer is not running in the
  850.       Initial state.
  851.  
  852.    Starting
  853.  
  854.       The Starting state is the Open counterpart to the Initial state.
  855.       An administrative Open has been initiated, but the lower layer is
  856.       still unavailable (Down).  The Restart timer is not running in the
  857.       Starting state.
  858.  
  859.       When the lower layer becomes available (Up), a Configure-Request
  860.       is sent.
  861.  
  862.    Closed
  863.  
  864.       In the Closed state, the link is available (Up), but no Open has
  865.       occurred.  The Restart timer is not running in the Closed state.
  866.  
  867.       Upon reception of Configure-Request packets, a Terminate-Ack is
  868.       sent.  Terminate-Acks are silently discarded to avoid creating a
  869.       loop.
  870.  
  871.    Stopped
  872.  
  873.       The Stopped state is the Open counterpart to the Closed state.  It
  874.       is entered when the automaton is waiting for a Down event after
  875.       the This-Layer-Finished action, or after sending a Terminate-Ack.
  876.       The Restart timer is not running in the Stopped state.
  877.  
  878.       Upon reception of Configure-Request packets, an appropriate
  879.       response is sent.  Upon reception of other packets, a Terminate-
  880.       Ack is sent.  Terminate-Acks are silently discarded to avoid
  881.       creating a loop.
  882.  
  883.       Rationale:
  884.  
  885.          The Stopped state is a junction state for link termination,
  886.          link configuration failure, and other automaton failure modes.
  887.          These potentially separate states have been combined.
  888.  
  889.          There is a race condition between the Down event response (from
  890.  
  891.  
  892.  
  893. Simpson                                                        [Page 14]
  894.  
  895. RFC 1661                Point-to-Point Protocol                July 1994
  896.  
  897.  
  898.          the This-Layer-Finished action) and the Receive-Configure-
  899.          Request event.  When a Configure-Request arrives before the
  900.          Down event, the Down event will supercede by returning the
  901.          automaton to the Starting state.  This prevents attack by
  902.          repetition.
  903.  
  904.       Implementation Option:
  905.  
  906.          After the peer fails to respond to Configure-Requests, an
  907.          implementation MAY wait passively for the peer to send
  908.          Configure-Requests.  In this case, the This-Layer-Finished
  909.          action is not used for the TO- event in states Req-Sent, Ack-
  910.          Rcvd and Ack-Sent.
  911.  
  912.          This option is useful for dedicated circuits, or circuits which
  913.          have no status signals available, but SHOULD NOT be used for
  914.          switched circuits.
  915.  
  916.    Closing
  917.  
  918.       In the Closing state, an attempt is made to terminate the
  919.       connection.  A Terminate-Request has been sent and the Restart
  920.       timer is running, but a Terminate-Ack has not yet been received.
  921.  
  922.       Upon reception of a Terminate-Ack, the Closed state is entered.
  923.       Upon the expiration of the Restart timer, a new Terminate-Request
  924.       is transmitted, and the Restart timer is restarted.  After the
  925.       Restart timer has expired Max-Terminate times, the Closed state is
  926.       entered.
  927.  
  928.    Stopping
  929.  
  930.       The Stopping state is the Open counterpart to the Closing state.
  931.       A Terminate-Request has been sent and the Restart timer is
  932.       running, but a Terminate-Ack has not yet been received.
  933.  
  934.       Rationale:
  935.  
  936.          The Stopping state provides a well defined opportunity to
  937.          terminate a link before allowing new traffic.  After the link
  938.          has terminated, a new configuration may occur via the Stopped
  939.          or Starting states.
  940.  
  941.    Request-Sent
  942.  
  943.       In the Request-Sent state an attempt is made to configure the
  944.       connection.  A Configure-Request has been sent and the Restart
  945.       timer is running, but a Configure-Ack has not yet been received
  946.  
  947.  
  948.  
  949. Simpson                                                        [Page 15]
  950.  
  951. RFC 1661                Point-to-Point Protocol                July 1994
  952.  
  953.  
  954.       nor has one been sent.
  955.  
  956.    Ack-Received
  957.  
  958.       In the Ack-Received state, a Configure-Request has been sent and a
  959.       Configure-Ack has been received.  The Restart timer is still
  960.       running, since a Configure-Ack has not yet been sent.
  961.  
  962.    Ack-Sent
  963.  
  964.       In the Ack-Sent state, a Configure-Request and a Configure-Ack
  965.       have both been sent, but a Configure-Ack has not yet been
  966.       received.  The Restart timer is running, since a Configure-Ack has
  967.       not yet been received.
  968.  
  969.    Opened
  970.  
  971.       In the Opened state, a Configure-Ack has been both sent and
  972.       received.  The Restart timer is not running.
  973.  
  974.       When entering the Opened state, the implementation SHOULD signal
  975.       the upper layers that it is now Up.  Conversely, when leaving the
  976.       Opened state, the implementation SHOULD signal the upper layers
  977.       that it is now Down.
  978.  
  979.  
  980.  
  981. 4.3.  Events
  982.  
  983.    Transitions and actions in the automaton are caused by events.
  984.  
  985.    Up
  986.  
  987.       This event occurs when a lower layer indicates that it is ready to
  988.       carry packets.
  989.  
  990.       Typically, this event is used by a modem handling or calling
  991.       process, or by some other coupling of the PPP link to the physical
  992.       media, to signal LCP that the link is entering Link Establishment
  993.       phase.
  994.  
  995.       It also can be used by LCP to signal each NCP that the link is
  996.       entering Network-Layer Protocol phase.  That is, the This-Layer-Up
  997.       action from LCP triggers the Up event in the NCP.
  998.  
  999.    Down
  1000.  
  1001.       This event occurs when a lower layer indicates that it is no
  1002.  
  1003.  
  1004.  
  1005. Simpson                                                        [Page 16]
  1006.  
  1007. RFC 1661                Point-to-Point Protocol                July 1994
  1008.  
  1009.  
  1010.       longer ready to carry packets.
  1011.  
  1012.       Typically, this event is used by a modem handling or calling
  1013.       process, or by some other coupling of the PPP link to the physical
  1014.       media, to signal LCP that the link is entering Link Dead phase.
  1015.  
  1016.       It also can be used by LCP to signal each NCP that the link is
  1017.       leaving Network-Layer Protocol phase.  That is, the This-Layer-
  1018.       Down action from LCP triggers the Down event in the NCP.
  1019.  
  1020.    Open
  1021.  
  1022.       This event indicates that the link is administratively available
  1023.       for traffic; that is, the network administrator (human or program)
  1024.       has indicated that the link is allowed to be Opened.  When this
  1025.       event occurs, and the link is not in the Opened state, the
  1026.       automaton attempts to send configuration packets to the peer.
  1027.  
  1028.       If the automaton is not able to begin configuration (the lower
  1029.       layer is Down, or a previous Close event has not completed), the
  1030.       establishment of the link is automatically delayed.
  1031.  
  1032.       When a Terminate-Request is received, or other events occur which
  1033.       cause the link to become unavailable, the automaton will progress
  1034.       to a state where the link is ready to re-open.  No additional
  1035.       administrative intervention is necessary.
  1036.  
  1037.       Implementation Option:
  1038.  
  1039.          Experience has shown that users will execute an additional Open
  1040.          command when they want to renegotiate the link.  This might
  1041.          indicate that new values are to be negotiated.
  1042.  
  1043.          Since this is not the meaning of the Open event, it is
  1044.          suggested that when an Open user command is executed in the
  1045.          Opened, Closing, Stopping, or Stopped states, the
  1046.          implementation issue a Down event, immediately followed by an
  1047.          Up event.  Care must be taken that an intervening Down event
  1048.          cannot occur from another source.
  1049.  
  1050.          The Down followed by an Up will cause an orderly renegotiation
  1051.          of the link, by progressing through the Starting to the
  1052.          Request-Sent state.  This will cause the renegotiation of the
  1053.          link, without any harmful side effects.
  1054.  
  1055.    Close
  1056.  
  1057.       This event indicates that the link is not available for traffic;
  1058.  
  1059.  
  1060.  
  1061. Simpson                                                        [Page 17]
  1062.  
  1063. RFC 1661                Point-to-Point Protocol                July 1994
  1064.  
  1065.  
  1066.       that is, the network administrator (human or program) has
  1067.       indicated that the link is not allowed to be Opened.  When this
  1068.       event occurs, and the link is not in the Closed state, the
  1069.       automaton attempts to terminate the connection.  Futher attempts
  1070.       to re-configure the link are denied until a new Open event occurs.
  1071.  
  1072.       Implementation Note:
  1073.  
  1074.          When authentication fails, the link SHOULD be terminated, to
  1075.          prevent attack by repetition and denial of service to other
  1076.          users.  Since the link is administratively available (by
  1077.          definition), this can be accomplished by simulating a Close
  1078.          event to the LCP, immediately followed by an Open event.  Care
  1079.          must be taken that an intervening Close event cannot occur from
  1080.          another source.
  1081.  
  1082.          The Close followed by an Open will cause an orderly termination
  1083.          of the link, by progressing through the Closing to the Stopping
  1084.          state, and the This-Layer-Finished action can disconnect the
  1085.          link.  The automaton waits in the Stopped or Starting states
  1086.          for the next connection attempt.
  1087.  
  1088.    Timeout (TO+,TO-)
  1089.  
  1090.       This event indicates the expiration of the Restart timer.  The
  1091.       Restart timer is used to time responses to Configure-Request and
  1092.       Terminate-Request packets.
  1093.  
  1094.       The TO+ event indicates that the Restart counter continues to be
  1095.       greater than zero, which triggers the corresponding Configure-
  1096.       Request or Terminate-Request packet to be retransmitted.
  1097.  
  1098.       The TO- event indicates that the Restart counter is not greater
  1099.       than zero, and no more packets need to be retransmitted.
  1100.  
  1101.    Receive-Configure-Request (RCR+,RCR-)
  1102.  
  1103.       This event occurs when a Configure-Request packet is received from
  1104.       the peer.  The Configure-Request packet indicates the desire to
  1105.       open a connection and may specify Configuration Options.  The
  1106.       Configure-Request packet is more fully described in a later
  1107.       section.
  1108.  
  1109.       The RCR+ event indicates that the Configure-Request was
  1110.       acceptable, and triggers the transmission of a corresponding
  1111.       Configure-Ack.
  1112.  
  1113.       The RCR- event indicates that the Configure-Request was
  1114.  
  1115.  
  1116.  
  1117. Simpson                                                        [Page 18]
  1118.  
  1119. RFC 1661                Point-to-Point Protocol                July 1994
  1120.  
  1121.  
  1122.       unacceptable, and triggers the transmission of a corresponding
  1123.       Configure-Nak or Configure-Reject.
  1124.  
  1125.       Implementation Note:
  1126.  
  1127.          These events may occur on a connection which is already in the
  1128.          Opened state.  The implementation MUST be prepared to
  1129.          immediately renegotiate the Configuration Options.
  1130.  
  1131.    Receive-Configure-Ack (RCA)
  1132.  
  1133.       This event occurs when a valid Configure-Ack packet is received
  1134.       from the peer.  The Configure-Ack packet is a positive response to
  1135.       a Configure-Request packet.  An out of sequence or otherwise
  1136.       invalid packet is silently discarded.
  1137.  
  1138.       Implementation Note:
  1139.  
  1140.          Since the correct packet has already been received before
  1141.          reaching the Ack-Rcvd or Opened states, it is extremely
  1142.          unlikely that another such packet will arrive.  As specified,
  1143.          all invalid Ack/Nak/Rej packets are silently discarded, and do
  1144.          not affect the transitions of the automaton.
  1145.  
  1146.          However, it is not impossible that a correctly formed packet
  1147.          will arrive through a coincidentally-timed cross-connection.
  1148.          It is more likely to be the result of an implementation error.
  1149.          At the very least, this occurance SHOULD be logged.
  1150.  
  1151.    Receive-Configure-Nak/Rej (RCN)
  1152.  
  1153.       This event occurs when a valid Configure-Nak or Configure-Reject
  1154.       packet is received from the peer.  The Configure-Nak and
  1155.       Configure-Reject packets are negative responses to a Configure-
  1156.       Request packet.  An out of sequence or otherwise invalid packet is
  1157.       silently discarded.
  1158.  
  1159.       Implementation Note:
  1160.  
  1161.          Although the Configure-Nak and Configure-Reject cause the same
  1162.          state transition in the automaton, these packets have
  1163.          significantly different effects on the Configuration Options
  1164.          sent in the resulting Configure-Request packet.
  1165.  
  1166.    Receive-Terminate-Request (RTR)
  1167.  
  1168.       This event occurs when a Terminate-Request packet is received.
  1169.       The Terminate-Request packet indicates the desire of the peer to
  1170.  
  1171.  
  1172.  
  1173. Simpson                                                        [Page 19]
  1174.  
  1175. RFC 1661                Point-to-Point Protocol                July 1994
  1176.  
  1177.  
  1178.       close the connection.
  1179.  
  1180.       Implementation Note:
  1181.  
  1182.          This event is not identical to the Close event (see above), and
  1183.          does not override the Open commands of the local network
  1184.          administrator.  The implementation MUST be prepared to receive
  1185.          a new Configure-Request without network administrator
  1186.          intervention.
  1187.  
  1188.    Receive-Terminate-Ack (RTA)
  1189.  
  1190.       This event occurs when a Terminate-Ack packet is received from the
  1191.       peer.  The Terminate-Ack packet is usually a response to a
  1192.       Terminate-Request packet.  The Terminate-Ack packet may also
  1193.       indicate that the peer is in Closed or Stopped states, and serves
  1194.       to re-synchronize the link configuration.
  1195.  
  1196.    Receive-Unknown-Code (RUC)
  1197.  
  1198.       This event occurs when an un-interpretable packet is received from
  1199.       the peer.  A Code-Reject packet is sent in response.
  1200.  
  1201.    Receive-Code-Reject, Receive-Protocol-Reject (RXJ+,RXJ-)
  1202.  
  1203.       This event occurs when a Code-Reject or a Protocol-Reject packet
  1204.       is received from the peer.
  1205.  
  1206.       The RXJ+ event arises when the rejected value is acceptable, such
  1207.       as a Code-Reject of an extended code, or a Protocol-Reject of a
  1208.       NCP.  These are within the scope of normal operation.  The
  1209.       implementation MUST stop sending the offending packet type.
  1210.  
  1211.       The RXJ- event arises when the rejected value is catastrophic,
  1212.       such as a Code-Reject of Configure-Request, or a Protocol-Reject
  1213.       of LCP!  This event communicates an unrecoverable error that
  1214.       terminates the connection.
  1215.  
  1216.    Receive-Echo-Request, Receive-Echo-Reply, Receive-Discard-Request
  1217.    (RXR)
  1218.  
  1219.       This event occurs when an Echo-Request, Echo-Reply or Discard-
  1220.       Request packet is received from the peer.  The Echo-Reply packet
  1221.       is a response to an Echo-Request packet.  There is no reply to an
  1222.       Echo-Reply or Discard-Request packet.
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229. Simpson                                                        [Page 20]
  1230.  
  1231. RFC 1661                Point-to-Point Protocol                July 1994
  1232.  
  1233.  
  1234. 4.4.  Actions
  1235.  
  1236.    Actions in the automaton are caused by events and typically indicate
  1237.    the transmission of packets and/or the starting or stopping of the
  1238.    Restart timer.
  1239.  
  1240.    Illegal-Event (-)
  1241.  
  1242.       This indicates an event that cannot occur in a properly
  1243.       implemented automaton.  The implementation has an internal error,
  1244.       which should be reported and logged.  No transition is taken, and
  1245.       the implementation SHOULD NOT reset or freeze.
  1246.  
  1247.    This-Layer-Up (tlu)
  1248.  
  1249.       This action indicates to the upper layers that the automaton is
  1250.       entering the Opened state.
  1251.  
  1252.       Typically, this action is used by the LCP to signal the Up event
  1253.       to a NCP, Authentication Protocol, or Link Quality Protocol, or
  1254.       MAY be used by a NCP to indicate that the link is available for
  1255.       its network layer traffic.
  1256.  
  1257.    This-Layer-Down (tld)
  1258.  
  1259.       This action indicates to the upper layers that the automaton is
  1260.       leaving the Opened state.
  1261.  
  1262.       Typically, this action is used by the LCP to signal the Down event
  1263.       to a NCP, Authentication Protocol, or Link Quality Protocol, or
  1264.       MAY be used by a NCP to indicate that the link is no longer
  1265.       available for its network layer traffic.
  1266.  
  1267.    This-Layer-Started (tls)
  1268.  
  1269.       This action indicates to the lower layers that the automaton is
  1270.       entering the Starting state, and the lower layer is needed for the
  1271.       link.  The lower layer SHOULD respond with an Up event when the
  1272.       lower layer is available.
  1273.  
  1274.       This results of this action are highly implementation dependent.
  1275.  
  1276.    This-Layer-Finished (tlf)
  1277.  
  1278.       This action indicates to the lower layers that the automaton is
  1279.       entering the Initial, Closed or Stopped states, and the lower
  1280.       layer is no longer needed for the link.  The lower layer SHOULD
  1281.       respond with a Down event when the lower layer has terminated.
  1282.  
  1283.  
  1284.  
  1285. Simpson                                                        [Page 21]
  1286.  
  1287. RFC 1661                Point-to-Point Protocol                July 1994
  1288.  
  1289.  
  1290.       Typically, this action MAY be used by the LCP to advance to the
  1291.       Link Dead phase, or MAY be used by a NCP to indicate to the LCP
  1292.       that the link may terminate when there are no other NCPs open.
  1293.  
  1294.       This results of this action are highly implementation dependent.
  1295.  
  1296.    Initialize-Restart-Count (irc)
  1297.  
  1298.       This action sets the Restart counter to the appropriate value
  1299.       (Max-Terminate or Max-Configure).  The counter is decremented for
  1300.       each transmission, including the first.
  1301.  
  1302.       Implementation Note:
  1303.  
  1304.          In addition to setting the Restart counter, the implementation
  1305.          MUST set the timeout period to the initial value when Restart
  1306.          timer backoff is used.
  1307.  
  1308.    Zero-Restart-Count (zrc)
  1309.  
  1310.       This action sets the Restart counter to zero.
  1311.  
  1312.       Implementation Note:
  1313.  
  1314.          This action enables the FSA to pause before proceeding to the
  1315.          desired final state, allowing traffic to be processed by the
  1316.          peer.  In addition to zeroing the Restart counter, the
  1317.          implementation MUST set the timeout period to an appropriate
  1318.          value.
  1319.  
  1320.    Send-Configure-Request (scr)
  1321.  
  1322.       A Configure-Request packet is transmitted.  This indicates the
  1323.       desire to open a connection with a specified set of Configuration
  1324.       Options.  The Restart timer is started when the Configure-Request
  1325.       packet is transmitted, to guard against packet loss.  The Restart
  1326.       counter is decremented each time a Configure-Request is sent.
  1327.  
  1328.    Send-Configure-Ack (sca)
  1329.  
  1330.       A Configure-Ack packet is transmitted.  This acknowledges the
  1331.       reception of a Configure-Request packet with an acceptable set of
  1332.       Configuration Options.
  1333.  
  1334.    Send-Configure-Nak (scn)
  1335.  
  1336.       A Configure-Nak or Configure-Reject packet is transmitted, as
  1337.       appropriate.  This negative response reports the reception of a
  1338.  
  1339.  
  1340.  
  1341. Simpson                                                        [Page 22]
  1342.  
  1343. RFC 1661                Point-to-Point Protocol                July 1994
  1344.  
  1345.  
  1346.       Configure-Request packet with an unacceptable set of Configuration
  1347.       Options.
  1348.  
  1349.       Configure-Nak packets are used to refuse a Configuration Option
  1350.       value, and to suggest a new, acceptable value.  Configure-Reject
  1351.       packets are used to refuse all negotiation about a Configuration
  1352.       Option, typically because it is not recognized or implemented.
  1353.       The use of Configure-Nak versus Configure-Reject is more fully
  1354.       described in the chapter on LCP Packet Formats.
  1355.  
  1356.    Send-Terminate-Request (str)
  1357.  
  1358.       A Terminate-Request packet is transmitted.  This indicates the
  1359.       desire to close a connection.  The Restart timer is started when
  1360.       the Terminate-Request packet is transmitted, to guard against
  1361.       packet loss.  The Restart counter is decremented each time a
  1362.       Terminate-Request is sent.
  1363.  
  1364.    Send-Terminate-Ack (sta)
  1365.  
  1366.       A Terminate-Ack packet is transmitted.  This acknowledges the
  1367.       reception of a Terminate-Request packet or otherwise serves to
  1368.       synchronize the automatons.
  1369.  
  1370.    Send-Code-Reject (scj)
  1371.  
  1372.       A Code-Reject packet is transmitted.  This indicates the reception
  1373.       of an unknown type of packet.
  1374.  
  1375.    Send-Echo-Reply (ser)
  1376.  
  1377.       An Echo-Reply packet is transmitted.  This acknowledges the
  1378.       reception of an Echo-Request packet.
  1379.  
  1380.  
  1381.  
  1382. 4.5.  Loop Avoidance
  1383.  
  1384.    The protocol makes a reasonable attempt at avoiding Configuration
  1385.    Option negotiation loops.  However, the protocol does NOT guarantee
  1386.    that loops will not happen.  As with any negotiation, it is possible
  1387.    to configure two PPP implementations with conflicting policies that
  1388.    will never converge.  It is also possible to configure policies which
  1389.    do converge, but which take significant time to do so.  Implementors
  1390.    should keep this in mind and SHOULD implement loop detection
  1391.    mechanisms or higher level timeouts.
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397. Simpson                                                        [Page 23]
  1398.  
  1399. RFC 1661                Point-to-Point Protocol                July 1994
  1400.  
  1401.  
  1402. 4.6.  Counters and Timers
  1403.  
  1404.    Restart Timer
  1405.  
  1406.       There is one special timer used by the automaton.  The Restart
  1407.       timer is used to time transmissions of Configure-Request and
  1408.       Terminate-Request packets.  Expiration of the Restart timer causes
  1409.       a Timeout event, and retransmission of the corresponding
  1410.       Configure-Request or Terminate-Request packet.  The Restart timer
  1411.       MUST be configurable, but SHOULD default to three (3) seconds.
  1412.  
  1413.       Implementation Note:
  1414.  
  1415.          The Restart timer SHOULD be based on the speed of the link.
  1416.          The default value is designed for low speed (2,400 to 9,600
  1417.          bps), high switching latency links (typical telephone lines).
  1418.          Higher speed links, or links with low switching latency, SHOULD
  1419.          have correspondingly faster retransmission times.
  1420.  
  1421.          Instead of a constant value, the Restart timer MAY begin at an
  1422.          initial small value and increase to the configured final value.
  1423.          Each successive value less than the final value SHOULD be at
  1424.          least twice the previous value.  The initial value SHOULD be
  1425.          large enough to account for the size of the packets, twice the
  1426.          round trip time for transmission at the link speed, and at
  1427.          least an additional 100 milliseconds to allow the peer to
  1428.          process the packets before responding.  Some circuits add
  1429.          another 200 milliseconds of satellite delay.  Round trip times
  1430.          for modems operating at 14,400 bps have been measured in the
  1431.          range of 160 to more than 600 milliseconds.
  1432.  
  1433.    Max-Terminate
  1434.  
  1435.       There is one required restart counter for Terminate-Requests.
  1436.       Max-Terminate indicates the number of Terminate-Request packets
  1437.       sent without receiving a Terminate-Ack before assuming that the
  1438.       peer is unable to respond.  Max-Terminate MUST be configurable,
  1439.       but SHOULD default to two (2) transmissions.
  1440.  
  1441.    Max-Configure
  1442.  
  1443.       A similar counter is recommended for Configure-Requests.  Max-
  1444.       Configure indicates the number of Configure-Request packets sent
  1445.       without receiving a valid Configure-Ack, Configure-Nak or
  1446.       Configure-Reject before assuming that the peer is unable to
  1447.       respond.  Max-Configure MUST be configurable, but SHOULD default
  1448.       to ten (10) transmissions.
  1449.  
  1450.  
  1451.  
  1452.  
  1453. Simpson                                                        [Page 24]
  1454.  
  1455. RFC 1661                Point-to-Point Protocol                July 1994
  1456.  
  1457.  
  1458.    Max-Failure
  1459.  
  1460.       A related counter is recommended for Configure-Nak.  Max-Failure
  1461.       indicates the number of Configure-Nak packets sent without sending
  1462.       a Configure-Ack before assuming that configuration is not
  1463.       converging.  Any further Configure-Nak packets for peer requested
  1464.       options are converted to Configure-Reject packets, and locally
  1465.       desired options are no longer appended.  Max-Failure MUST be
  1466.       configurable, but SHOULD default to five (5) transmissions.
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509. Simpson                                                        [Page 25]
  1510.  
  1511. RFC 1661                Point-to-Point Protocol                July 1994
  1512.  
  1513.  
  1514. 5.  LCP Packet Formats
  1515.  
  1516.    There are three classes of LCP packets:
  1517.  
  1518.       1. Link Configuration packets used to establish and configure a
  1519.          link (Configure-Request, Configure-Ack, Configure-Nak and
  1520.          Configure-Reject).
  1521.  
  1522.       2. Link Termination packets used to terminate a link (Terminate-
  1523.          Request and Terminate-Ack).
  1524.  
  1525.       3. Link Maintenance packets used to manage and debug a link
  1526.          (Code-Reject, Protocol-Reject, Echo-Request, Echo-Reply, and
  1527.          Discard-Request).
  1528.  
  1529.    In the interest of simplicity, there is no version field in the LCP
  1530.    packet.  A correctly functioning LCP implementation will always
  1531.    respond to unknown Protocols and Codes with an easily recognizable
  1532.    LCP packet, thus providing a deterministic fallback mechanism for
  1533.    implementations of other versions.
  1534.  
  1535.    Regardless of which Configuration Options are enabled, all LCP Link
  1536.    Configuration, Link Termination, and Code-Reject packets (codes 1
  1537.    through 7) are always sent as if no Configuration Options were
  1538.    negotiated.  In particular, each Configuration Option specifies a
  1539.    default value.  This ensures that such LCP packets are always
  1540.    recognizable, even when one end of the link mistakenly believes the
  1541.    link to be open.
  1542.  
  1543.    Exactly one LCP packet is encapsulated in the PPP Information field,
  1544.    where the PPP Protocol field indicates type hex c021 (Link Control
  1545.    Protocol).
  1546.  
  1547.    A summary of the Link Control Protocol packet format is shown below.
  1548.    The fields are transmitted from left to right.
  1549.  
  1550.     0                   1                   2                   3
  1551.     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
  1552.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1553.    |     Code      |  Identifier   |            Length             |
  1554.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1555.    |    Data ...
  1556.    +-+-+-+-+
  1557.  
  1558.  
  1559.    Code
  1560.  
  1561.       The Code field is one octet, and identifies the kind of LCP
  1562.  
  1563.  
  1564.  
  1565. Simpson                                                        [Page 26]
  1566.  
  1567. RFC 1661                Point-to-Point Protocol                July 1994
  1568.  
  1569.  
  1570.       packet.  When a packet is received with an unknown Code field, a
  1571.       Code-Reject packet is transmitted.
  1572.  
  1573.       Up-to-date values of the LCP Code field are specified in the most
  1574.       recent "Assigned Numbers" RFC [2].  This document concerns the
  1575.       following values:
  1576.  
  1577.          1       Configure-Request
  1578.          2       Configure-Ack
  1579.          3       Configure-Nak
  1580.          4       Configure-Reject
  1581.          5       Terminate-Request
  1582.          6       Terminate-Ack
  1583.          7       Code-Reject
  1584.          8       Protocol-Reject
  1585.          9       Echo-Request
  1586.          10      Echo-Reply
  1587.          11      Discard-Request
  1588.  
  1589.  
  1590.    Identifier
  1591.  
  1592.       The Identifier field is one octet, and aids in matching requests
  1593.       and replies.  When a packet is received with an invalid Identifier
  1594.       field, the packet is silently discarded without affecting the
  1595.       automaton.
  1596.  
  1597.    Length
  1598.  
  1599.       The Length field is two octets, and indicates the length of the
  1600.       LCP packet, including the Code, Identifier, Length and Data
  1601.       fields.  The Length MUST NOT exceed the MRU of the link.
  1602.  
  1603.       Octets outside the range of the Length field are treated as
  1604.       padding and are ignored on reception.  When a packet is received
  1605.       with an invalid Length field, the packet is silently discarded
  1606.       without affecting the automaton.
  1607.  
  1608.    Data
  1609.  
  1610.       The Data field is zero or more octets, as indicated by the Length
  1611.       field.  The format of the Data field is determined by the Code
  1612.       field.
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621. Simpson                                                        [Page 27]
  1622.  
  1623. RFC 1661                Point-to-Point Protocol                July 1994
  1624.  
  1625.  
  1626. 5.1.  Configure-Request
  1627.  
  1628.    Description
  1629.  
  1630.       An implementation wishing to open a connection MUST transmit a
  1631.       Configure-Request.  The Options field is filled with any desired
  1632.       changes to the link defaults.  Configuration Options SHOULD NOT be
  1633.       included with default values.
  1634.  
  1635.       Upon reception of a Configure-Request, an appropriate reply MUST
  1636.       be transmitted.
  1637.  
  1638.    A summary of the Configure-Request packet format is shown below.  The
  1639.    fields are transmitted from left to right.
  1640.  
  1641.     0                   1                   2                   3
  1642.     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
  1643.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1644.    |     Code      |  Identifier   |            Length             |
  1645.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1646.    | Options ...
  1647.    +-+-+-+-+
  1648.  
  1649.  
  1650.    Code
  1651.  
  1652.       1 for Configure-Request.
  1653.  
  1654.    Identifier
  1655.  
  1656.       The Identifier field MUST be changed whenever the contents of the
  1657.       Options field changes, and whenever a valid reply has been
  1658.       received for a previous request.  For retransmissions, the
  1659.       Identifier MAY remain unchanged.
  1660.  
  1661.    Options
  1662.  
  1663.       The options field is variable in length, and contains the list of
  1664.       zero or more Configuration Options that the sender desires to
  1665.       negotiate.  All Configuration Options are always negotiated
  1666.       simultaneously.  The format of Configuration Options is further
  1667.       described in a later chapter.
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677. Simpson                                                        [Page 28]
  1678.  
  1679. RFC 1661                Point-to-Point Protocol                July 1994
  1680.  
  1681.  
  1682. 5.2.  Configure-Ack
  1683.  
  1684.    Description
  1685.  
  1686.       If every Configuration Option received in a Configure-Request is
  1687.       recognizable and all values are acceptable, then the
  1688.       implementation MUST transmit a Configure-Ack.  The acknowledged
  1689.       Configuration Options MUST NOT be reordered or modified in any
  1690.       way.
  1691.  
  1692.       On reception of a Configure-Ack, the Identifier field MUST match
  1693.       that of the last transmitted Configure-Request.  Additionally, the
  1694.       Configuration Options in a Configure-Ack MUST exactly match those
  1695.       of the last transmitted Configure-Request.  Invalid packets are
  1696.       silently discarded.
  1697.  
  1698.    A summary of the Configure-Ack packet format is shown below.  The
  1699.    fields are transmitted from left to right.
  1700.  
  1701.     0                   1                   2                   3
  1702.     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
  1703.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1704.    |     Code      |  Identifier   |            Length             |
  1705.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1706.    | Options ...
  1707.    +-+-+-+-+
  1708.  
  1709.  
  1710.    Code
  1711.  
  1712.       2 for Configure-Ack.
  1713.  
  1714.    Identifier
  1715.  
  1716.       The Identifier field is a copy of the Identifier field of the
  1717.       Configure-Request which caused this Configure-Ack.
  1718.  
  1719.    Options
  1720.  
  1721.       The Options field is variable in length, and contains the list of
  1722.       zero or more Configuration Options that the sender is
  1723.       acknowledging.  All Configuration Options are always acknowledged
  1724.       simultaneously.
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733. Simpson                                                        [Page 29]
  1734.  
  1735. RFC 1661                Point-to-Point Protocol                July 1994
  1736.  
  1737.  
  1738. 5.3.  Configure-Nak
  1739.  
  1740.    Description
  1741.  
  1742.       If every instance of the received Configuration Options is
  1743.       recognizable, but some values are not acceptable, then the
  1744.       implementation MUST transmit a Configure-Nak.  The Options field
  1745.       is filled with only the unacceptable Configuration Options from
  1746.       the Configure-Request.  All acceptable Configuration Options are
  1747.       filtered out of the Configure-Nak, but otherwise the Configuration
  1748.       Options from the Configure-Request MUST NOT be reordered.
  1749.  
  1750.       Options which have no value fields (boolean options) MUST use the
  1751.       Configure-Reject reply instead.
  1752.  
  1753.       Each Configuration Option which is allowed only a single instance
  1754.       MUST be modified to a value acceptable to the Configure-Nak
  1755.       sender.  The default value MAY be used, when this differs from the
  1756.       requested value.
  1757.  
  1758.       When a particular type of Configuration Option can be listed more
  1759.       than once with different values, the Configure-Nak MUST include a
  1760.       list of all values for that option which are acceptable to the
  1761.       Configure-Nak sender.  This includes acceptable values that were
  1762.       present in the Configure-Request.
  1763.  
  1764.       Finally, an implementation may be configured to request the
  1765.       negotiation of a specific Configuration Option.  If that option is
  1766.       not listed, then that option MAY be appended to the list of Nak'd
  1767.       Configuration Options, in order to prompt the peer to include that
  1768.       option in its next Configure-Request packet.  Any value fields for
  1769.       the option MUST indicate values acceptable to the Configure-Nak
  1770.       sender.
  1771.  
  1772.       On reception of a Configure-Nak, the Identifier field MUST match
  1773.       that of the last transmitted Configure-Request.  Invalid packets
  1774.       are silently discarded.
  1775.  
  1776.       Reception of a valid Configure-Nak indicates that when a new
  1777.       Configure-Request is sent, the Configuration Options MAY be
  1778.       modified as specified in the Configure-Nak.  When multiple
  1779.       instances of a Configuration Option are present, the peer SHOULD
  1780.       select a single value to include in its next Configure-Request
  1781.       packet.
  1782.  
  1783.       Some Configuration Options have a variable length.  Since the
  1784.       Nak'd Option has been modified by the peer, the implementation
  1785.       MUST be able to handle an Option length which is different from
  1786.  
  1787.  
  1788.  
  1789. Simpson                                                        [Page 30]
  1790.  
  1791. RFC 1661                Point-to-Point Protocol                July 1994
  1792.  
  1793.  
  1794.       the original Configure-Request.
  1795.  
  1796.    A summary of the Configure-Nak packet format is shown below.  The
  1797.    fields are transmitted from left to right.
  1798.  
  1799.     0                   1                   2                   3
  1800.     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
  1801.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1802.    |     Code      |  Identifier   |            Length             |
  1803.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1804.    | Options ...
  1805.    +-+-+-+-+
  1806.  
  1807.  
  1808.    Code
  1809.  
  1810.       3 for Configure-Nak.
  1811.  
  1812.    Identifier
  1813.  
  1814.       The Identifier field is a copy of the Identifier field of the
  1815.       Configure-Request which caused this Configure-Nak.
  1816.  
  1817.    Options
  1818.  
  1819.       The Options field is variable in length, and contains the list of
  1820.       zero or more Configuration Options that the sender is Nak'ing.
  1821.       All Configuration Options are always Nak'd simultaneously.
  1822.  
  1823.  
  1824.  
  1825. 5.4.  Configure-Reject
  1826.  
  1827.    Description
  1828.  
  1829.       If some Configuration Options received in a Configure-Request are
  1830.       not recognizable or are not acceptable for negotiation (as
  1831.       configured by a network administrator), then the implementation
  1832.       MUST transmit a Configure-Reject.  The Options field is filled
  1833.       with only the unacceptable Configuration Options from the
  1834.       Configure-Request.  All recognizable and negotiable Configuration
  1835.       Options are filtered out of the Configure-Reject, but otherwise
  1836.       the Configuration Options MUST NOT be reordered or modified in any
  1837.       way.
  1838.  
  1839.       On reception of a Configure-Reject, the Identifier field MUST
  1840.       match that of the last transmitted Configure-Request.
  1841.       Additionally, the Configuration Options in a Configure-Reject MUST
  1842.  
  1843.  
  1844.  
  1845. Simpson                                                        [Page 31]
  1846.  
  1847. RFC 1661                Point-to-Point Protocol                July 1994
  1848.  
  1849.  
  1850.       be a proper subset of those in the last transmitted Configure-
  1851.       Request.  Invalid packets are silently discarded.
  1852.  
  1853.       Reception of a valid Configure-Reject indicates that when a new
  1854.       Configure-Request is sent, it MUST NOT include any of the
  1855.       Configuration Options listed in the Configure-Reject.
  1856.  
  1857.    A summary of the Configure-Reject packet format is shown below.  The
  1858.    fields are transmitted from left to right.
  1859.  
  1860.     0                   1                   2                   3
  1861.     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
  1862.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1863.    |     Code      |  Identifier   |            Length             |
  1864.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1865.    | Options ...
  1866.    +-+-+-+-+
  1867.  
  1868.  
  1869.    Code
  1870.  
  1871.       4 for Configure-Reject.
  1872.  
  1873.    Identifier
  1874.  
  1875.       The Identifier field is a copy of the Identifier field of the
  1876.       Configure-Request which caused this Configure-Reject.
  1877.  
  1878.    Options
  1879.  
  1880.       The Options field is variable in length, and contains the list of
  1881.       zero or more Configuration Options that the sender is rejecting.
  1882.       All Configuration Options are always rejected simultaneously.
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901. Simpson                                                        [Page 32]
  1902.  
  1903. RFC 1661                Point-to-Point Protocol                July 1994
  1904.  
  1905.  
  1906. 5.5.  Terminate-Request and Terminate-Ack
  1907.  
  1908.    Description
  1909.  
  1910.       LCP includes Terminate-Request and Terminate-Ack Codes in order to
  1911.       provide a mechanism for closing a connection.
  1912.  
  1913.       An implementation wishing to close a connection SHOULD transmit a
  1914.       Terminate-Request.  Terminate-Request packets SHOULD continue to
  1915.       be sent until Terminate-Ack is received, the lower layer indicates
  1916.       that it has gone down, or a sufficiently large number have been
  1917.       transmitted such that the peer is down with reasonable certainty.
  1918.  
  1919.       Upon reception of a Terminate-Request, a Terminate-Ack MUST be
  1920.       transmitted.
  1921.  
  1922.       Reception of an unelicited Terminate-Ack indicates that the peer
  1923.       is in the Closed or Stopped states, or is otherwise in need of
  1924.       re-negotiation.
  1925.  
  1926.    A summary of the Terminate-Request and Terminate-Ack packet formats
  1927.    is shown below.  The fields are transmitted from left to right.
  1928.  
  1929.     0                   1                   2                   3
  1930.     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
  1931.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1932.    |     Code      |  Identifier   |            Length             |
  1933.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1934.    |    Data ...
  1935.    +-+-+-+-+
  1936.  
  1937.  
  1938.    Code
  1939.  
  1940.       5 for Terminate-Request;
  1941.  
  1942.       6 for Terminate-Ack.
  1943.  
  1944.    Identifier
  1945.  
  1946.       On transmission, the Identifier field MUST be changed whenever the
  1947.       content of the Data field changes, and whenever a valid reply has
  1948.       been received for a previous request.  For retransmissions, the
  1949.       Identifier MAY remain unchanged.
  1950.  
  1951.       On reception, the Identifier field of the Terminate-Request is
  1952.       copied into the Identifier field of the Terminate-Ack packet.
  1953.  
  1954.  
  1955.  
  1956.  
  1957. Simpson                                                        [Page 33]
  1958.  
  1959. RFC 1661                Point-to-Point Protocol                July 1994
  1960.  
  1961.  
  1962.    Data
  1963.  
  1964.       The Data field is zero or more octets, and contains uninterpreted
  1965.       data for use by the sender.  The data may consist of any binary
  1966.       value.  The end of the field is indicated by the Length.
  1967.  
  1968.  
  1969.  
  1970. 5.6.  Code-Reject
  1971.  
  1972.    Description
  1973.  
  1974.       Reception of a LCP packet with an unknown Code indicates that the
  1975.       peer is operating with a different version.  This MUST be reported
  1976.       back to the sender of the unknown Code by transmitting a Code-
  1977.       Reject.
  1978.  
  1979.       Upon reception of the Code-Reject of a code which is fundamental
  1980.       to this version of the protocol, the implementation SHOULD report
  1981.       the problem and drop the connection, since it is unlikely that the
  1982.       situation can be rectified automatically.
  1983.  
  1984.    A summary of the Code-Reject packet format is shown below.  The
  1985.    fields are transmitted from left to right.
  1986.  
  1987.     0                   1                   2                   3
  1988.     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
  1989.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1990.    |     Code      |  Identifier   |            Length             |
  1991.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1992.    | Rejected-Packet ...
  1993.    +-+-+-+-+-+-+-+-+
  1994.  
  1995.  
  1996.    Code
  1997.  
  1998.       7 for Code-Reject.
  1999.  
  2000.    Identifier
  2001.  
  2002.       The Identifier field MUST be changed for each Code-Reject sent.
  2003.  
  2004.    Rejected-Packet
  2005.  
  2006.       The Rejected-Packet field contains a copy of the LCP packet which
  2007.       is being rejected.  It begins with the Information field, and does
  2008.       not include any Data Link Layer headers nor an FCS.  The
  2009.       Rejected-Packet MUST be truncated to comply with the peer's
  2010.  
  2011.  
  2012.  
  2013. Simpson                                                        [Page 34]
  2014.  
  2015. RFC 1661                Point-to-Point Protocol                July 1994
  2016.  
  2017.  
  2018.       established MRU.
  2019.  
  2020.  
  2021.  
  2022. 5.7.  Protocol-Reject
  2023.  
  2024.    Description
  2025.  
  2026.       Reception of a PPP packet with an unknown Protocol field indicates
  2027.       that the peer is attempting to use a protocol which is
  2028.       unsupported.  This usually occurs when the peer attempts to
  2029.       configure a new protocol.  If the LCP automaton is in the Opened
  2030.       state, then this MUST be reported back to the peer by transmitting
  2031.       a Protocol-Reject.
  2032.  
  2033.       Upon reception of a Protocol-Reject, the implementation MUST stop
  2034.       sending packets of the indicated protocol at the earliest
  2035.       opportunity.
  2036.  
  2037.       Protocol-Reject packets can only be sent in the LCP Opened state.
  2038.       Protocol-Reject packets received in any state other than the LCP
  2039.       Opened state SHOULD be silently discarded.
  2040.  
  2041.    A summary of the Protocol-Reject packet format is shown below.  The
  2042.    fields are transmitted from left to right.
  2043.  
  2044.     0                   1                   2                   3
  2045.     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
  2046.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2047.    |     Code      |  Identifier   |            Length             |
  2048.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2049.    |       Rejected-Protocol       |      Rejected-Information ...
  2050.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2051.  
  2052.  
  2053.    Code
  2054.  
  2055.       8 for Protocol-Reject.
  2056.  
  2057.    Identifier
  2058.  
  2059.       The Identifier field MUST be changed for each Protocol-Reject
  2060.       sent.
  2061.  
  2062.    Rejected-Protocol
  2063.  
  2064.       The Rejected-Protocol field is two octets, and contains the PPP
  2065.       Protocol field of the packet which is being rejected.
  2066.  
  2067.  
  2068.  
  2069. Simpson                                                        [Page 35]
  2070.  
  2071. RFC 1661                Point-to-Point Protocol                July 1994
  2072.  
  2073.  
  2074.    Rejected-Information
  2075.  
  2076.       The Rejected-Information field contains a copy of the packet which
  2077.       is being rejected.  It begins with the Information field, and does
  2078.       not include any Data Link Layer headers nor an FCS.  The
  2079.       Rejected-Information MUST be truncated to comply with the peer's
  2080.       established MRU.
  2081.  
  2082.  
  2083.  
  2084. 5.8.  Echo-Request and Echo-Reply
  2085.  
  2086.    Description
  2087.  
  2088.       LCP includes Echo-Request and Echo-Reply Codes in order to provide
  2089.       a Data Link Layer loopback mechanism for use in exercising both
  2090.       directions of the link.  This is useful as an aid in debugging,
  2091.       link quality determination, performance testing, and for numerous
  2092.       other functions.
  2093.  
  2094.       Upon reception of an Echo-Request in the LCP Opened state, an
  2095.       Echo-Reply MUST be transmitted.
  2096.  
  2097.       Echo-Request and Echo-Reply packets MUST only be sent in the LCP
  2098.       Opened state.  Echo-Request and Echo-Reply packets received in any
  2099.       state other than the LCP Opened state SHOULD be silently
  2100.       discarded.
  2101.  
  2102.  
  2103.    A summary of the Echo-Request and Echo-Reply packet formats is shown
  2104.    below.  The fields are transmitted from left to right.
  2105.  
  2106.     0                   1                   2                   3
  2107.     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
  2108.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2109.    |     Code      |  Identifier   |            Length             |
  2110.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2111.    |                         Magic-Number                          |
  2112.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2113.    |    Data ...
  2114.    +-+-+-+-+
  2115.  
  2116.  
  2117.    Code
  2118.  
  2119.       9 for Echo-Request;
  2120.  
  2121.       10 for Echo-Reply.
  2122.  
  2123.  
  2124.  
  2125. Simpson                                                        [Page 36]
  2126.  
  2127. RFC 1661                Point-to-Point Protocol                July 1994
  2128.  
  2129.  
  2130.    Identifier
  2131.  
  2132.       On transmission, the Identifier field MUST be changed whenever the
  2133.       content of the Data field changes, and whenever a valid reply has
  2134.       been received for a previous request.  For retransmissions, the
  2135.       Identifier MAY remain unchanged.
  2136.  
  2137.       On reception, the Identifier field of the Echo-Request is copied
  2138.       into the Identifier field of the Echo-Reply packet.
  2139.  
  2140.    Magic-Number
  2141.  
  2142.       The Magic-Number field is four octets, and aids in detecting links
  2143.       which are in the looped-back condition.  Until the Magic-Number
  2144.       Configuration Option has been successfully negotiated, the Magic-
  2145.       Number MUST be transmitted as zero.  See the Magic-Number
  2146.       Configuration Option for further explanation.
  2147.  
  2148.    Data
  2149.  
  2150.       The Data field is zero or more octets, and contains uninterpreted
  2151.       data for use by the sender.  The data may consist of any binary
  2152.       value.  The end of the field is indicated by the Length.
  2153.  
  2154.  
  2155.  
  2156. 5.9.  Discard-Request
  2157.  
  2158.    Description
  2159.  
  2160.       LCP includes a Discard-Request Code in order to provide a Data
  2161.       Link Layer sink mechanism for use in exercising the local to
  2162.       remote direction of the link.  This is useful as an aid in
  2163.       debugging, performance testing, and for numerous other functions.
  2164.  
  2165.       Discard-Request packets MUST only be sent in the LCP Opened state.
  2166.       On reception, the receiver MUST silently discard any Discard-
  2167.       Request that it receives.
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181. Simpson                                                        [Page 37]
  2182.  
  2183. RFC 1661                Point-to-Point Protocol                July 1994
  2184.  
  2185.  
  2186.    A summary of the Discard-Request packet format is shown below.  The
  2187.    fields are transmitted from left to right.
  2188.  
  2189.     0                   1                   2                   3
  2190.     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
  2191.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2192.    |     Code      |  Identifier   |            Length             |
  2193.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2194.    |                         Magic-Number                          |
  2195.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2196.    |    Data ...
  2197.    +-+-+-+-+
  2198.  
  2199.    Code
  2200.  
  2201.       11 for Discard-Request.
  2202.  
  2203.    Identifier
  2204.  
  2205.       The Identifier field MUST be changed for each Discard-Request
  2206.       sent.
  2207.  
  2208.    Magic-Number
  2209.  
  2210.       The Magic-Number field is four octets, and aids in detecting links
  2211.       which are in the looped-back condition.  Until the Magic-Number
  2212.       Configuration Option has been successfully negotiated, the Magic-
  2213.       Number MUST be transmitted as zero.  See the Magic-Number
  2214.       Configuration Option for further explanation.
  2215.  
  2216.    Data
  2217.  
  2218.       The Data field is zero or more octets, and contains uninterpreted
  2219.       data for use by the sender.  The data may consist of any binary
  2220.       value.  The end of the field is indicated by the Length.
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237. Simpson                                                        [Page 38]
  2238.  
  2239. RFC 1661                Point-to-Point Protocol                July 1994
  2240.  
  2241.  
  2242. 6.  LCP Configuration Options
  2243.  
  2244.    LCP Configuration Options allow negotiation of modifications to the
  2245.    default characteristics of a point-to-point link.  If a Configuration
  2246.    Option is not included in a Configure-Request packet, the default
  2247.    value for that Configuration Option is assumed.
  2248.  
  2249.    Some Configuration Options MAY be listed more than once.  The effect
  2250.    of this is Configuration Option specific, and is specified by each
  2251.    such Configuration Option description.  (None of the Configuration
  2252.    Options in this specification can be listed more than once.)
  2253.  
  2254.    The end of the list of Configuration Options is indicated by the
  2255.    Length field of the LCP packet.
  2256.  
  2257.    Unless otherwise specified, all Configuration Options apply in a
  2258.    half-duplex fashion; typically, in the receive direction of the link
  2259.    from the point of view of the Configure-Request sender.
  2260.  
  2261.    Design Philosophy
  2262.  
  2263.       The options indicate additional capabilities or requirements of
  2264.       the implementation that is requesting the option.  An
  2265.       implementation which does not understand any option SHOULD
  2266.       interoperate with one which implements every option.
  2267.  
  2268.       A default is specified for each option which allows the link to
  2269.       correctly function without negotiation of the option, although
  2270.       perhaps with less than optimal performance.
  2271.  
  2272.       Except where explicitly specified, acknowledgement of an option
  2273.       does not require the peer to take any additional action other than
  2274.       the default.
  2275.  
  2276.       It is not necessary to send the default values for the options in
  2277.       a Configure-Request.
  2278.  
  2279.  
  2280.    A summary of the Configuration Option format is shown below.  The
  2281.    fields are transmitted from left to right.
  2282.  
  2283.     0                   1
  2284.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
  2285.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2286.    |     Type      |    Length     |    Data ...
  2287.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293. Simpson                                                        [Page 39]
  2294.  
  2295. RFC 1661                Point-to-Point Protocol                July 1994
  2296.  
  2297.  
  2298.    Type
  2299.  
  2300.       The Type field is one octet, and indicates the type of
  2301.       Configuration Option.  Up-to-date values of the LCP Option Type
  2302.       field are specified in the most recent "Assigned Numbers" RFC [2].
  2303.       This document concerns the following values:
  2304.  
  2305.          0       RESERVED
  2306.          1       Maximum-Receive-Unit
  2307.          3       Authentication-Protocol
  2308.          4       Quality-Protocol
  2309.          5       Magic-Number
  2310.          7       Protocol-Field-Compression
  2311.          8       Address-and-Control-Field-Compression
  2312.  
  2313.  
  2314.    Length
  2315.  
  2316.       The Length field is one octet, and indicates the length of this
  2317.       Configuration Option including the Type, Length and Data fields.
  2318.  
  2319.       If a negotiable Configuration Option is received in a Configure-
  2320.       Request, but with an invalid or unrecognized Length, a Configure-
  2321.       Nak SHOULD be transmitted which includes the desired Configuration
  2322.       Option with an appropriate Length and Data.
  2323.  
  2324.    Data
  2325.  
  2326.       The Data field is zero or more octets, and contains information
  2327.       specific to the Configuration Option.  The format and length of
  2328.       the Data field is determined by the Type and Length fields.
  2329.  
  2330.       When the Data field is indicated by the Length to extend beyond
  2331.       the end of the Information field, the entire packet is silently
  2332.       discarded without affecting the automaton.
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349. Simpson                                                        [Page 40]
  2350.  
  2351. RFC 1661                Point-to-Point Protocol                July 1994
  2352.  
  2353.  
  2354. 6.1.  Maximum-Receive-Unit (MRU)
  2355.  
  2356.    Description
  2357.  
  2358.       This Configuration Option may be sent to inform the peer that the
  2359.       implementation can receive larger packets, or to request that the
  2360.       peer send smaller packets.
  2361.  
  2362.       The default value is 1500 octets.  If smaller packets are
  2363.       requested, an implementation MUST still be able to receive the
  2364.       full 1500 octet information field in case link synchronization is
  2365.       lost.
  2366.  
  2367.       Implementation Note:
  2368.  
  2369.          This option is used to indicate an implementation capability.
  2370.          The peer is not required to maximize the use of the capacity.
  2371.          For example, when a MRU is indicated which is 2048 octets, the
  2372.          peer is not required to send any packet with 2048 octets.  The
  2373.          peer need not Configure-Nak to indicate that it will only send
  2374.          smaller packets, since the implementation will always require
  2375.          support for at least 1500 octets.
  2376.  
  2377.    A summary of the Maximum-Receive-Unit Configuration Option format is
  2378.    shown below.  The fields are transmitted from left to right.
  2379.  
  2380.     0                   1                   2                   3
  2381.     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
  2382.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2383.    |     Type      |    Length     |      Maximum-Receive-Unit     |
  2384.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2385.  
  2386.  
  2387.    Type
  2388.  
  2389.       1
  2390.  
  2391.    Length
  2392.  
  2393.       4
  2394.  
  2395.    Maximum-Receive-Unit
  2396.  
  2397.       The Maximum-Receive-Unit field is two octets, and specifies the
  2398.       maximum number of octets in the Information and Padding fields.
  2399.       It does not include the framing, Protocol field, FCS, nor any
  2400.       transparency bits or bytes.
  2401.  
  2402.  
  2403.  
  2404.  
  2405. Simpson                                                        [Page 41]
  2406.  
  2407. RFC 1661                Point-to-Point Protocol                July 1994
  2408.  
  2409.  
  2410. 6.2.  Authentication-Protocol
  2411.  
  2412.    Description
  2413.  
  2414.       On some links it may be desirable to require a peer to
  2415.       authenticate itself before allowing network-layer protocol packets
  2416.       to be exchanged.
  2417.  
  2418.       This Configuration Option provides a method to negotiate the use
  2419.       of a specific protocol for authentication.  By default,
  2420.       authentication is not required.
  2421.  
  2422.       An implementation MUST NOT include multiple Authentication-
  2423.       Protocol Configuration Options in its Configure-Request packets.
  2424.       Instead, it SHOULD attempt to configure the most desirable
  2425.       protocol first.  If that protocol is Configure-Nak'd, then the
  2426.       implementation SHOULD attempt the next most desirable protocol in
  2427.       the next Configure-Request.
  2428.  
  2429.       The implementation sending the Configure-Request is indicating
  2430.       that it expects authentication from its peer.  If an
  2431.       implementation sends a Configure-Ack, then it is agreeing to
  2432.       authenticate with the specified protocol.  An implementation
  2433.       receiving a Configure-Ack SHOULD expect the peer to authenticate
  2434.       with the acknowledged protocol.
  2435.  
  2436.       There is no requirement that authentication be full-duplex or that
  2437.       the same protocol be used in both directions.  It is perfectly
  2438.       acceptable for different protocols to be used in each direction.
  2439.       This will, of course, depend on the specific protocols negotiated.
  2440.  
  2441.    A summary of the Authentication-Protocol Configuration Option format
  2442.    is shown below.  The fields are transmitted from left to right.
  2443.  
  2444.     0                   1                   2                   3
  2445.     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
  2446.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2447.    |     Type      |    Length     |     Authentication-Protocol   |
  2448.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2449.    |    Data ...
  2450.    +-+-+-+-+
  2451.  
  2452.  
  2453.    Type
  2454.  
  2455.       3
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461. Simpson                                                        [Page 42]
  2462.  
  2463. RFC 1661                Point-to-Point Protocol                July 1994
  2464.  
  2465.  
  2466.    Length
  2467.  
  2468.       >= 4
  2469.  
  2470.    Authentication-Protocol
  2471.  
  2472.       The Authentication-Protocol field is two octets, and indicates the
  2473.       authentication protocol desired.  Values for this field are always
  2474.       the same as the PPP Protocol field values for that same
  2475.       authentication protocol.
  2476.  
  2477.       Up-to-date values of the Authentication-Protocol field are
  2478.       specified in the most recent "Assigned Numbers" RFC [2].  Current
  2479.       values are assigned as follows:
  2480.  
  2481.       Value (in hex)  Protocol
  2482.  
  2483.       c023            Password Authentication Protocol
  2484.       c223            Challenge Handshake Authentication Protocol
  2485.  
  2486.  
  2487.    Data
  2488.  
  2489.       The Data field is zero or more octets, and contains additional
  2490.       data as determined by the particular protocol.
  2491.  
  2492.  
  2493.  
  2494. 6.3.  Quality-Protocol
  2495.  
  2496.    Description
  2497.  
  2498.       On some links it may be desirable to determine when, and how
  2499.       often, the link is dropping data.  This process is called link
  2500.       quality monitoring.
  2501.  
  2502.       This Configuration Option provides a method to negotiate the use
  2503.       of a specific protocol for link quality monitoring.  By default,
  2504.       link quality monitoring is disabled.
  2505.  
  2506.       The implementation sending the Configure-Request is indicating
  2507.       that it expects to receive monitoring information from its peer.
  2508.       If an implementation sends a Configure-Ack, then it is agreeing to
  2509.       send the specified protocol.  An implementation receiving a
  2510.       Configure-Ack SHOULD expect the peer to send the acknowledged
  2511.       protocol.
  2512.  
  2513.       There is no requirement that quality monitoring be full-duplex or
  2514.  
  2515.  
  2516.  
  2517. Simpson                                                        [Page 43]
  2518.  
  2519. RFC 1661                Point-to-Point Protocol                July 1994
  2520.  
  2521.  
  2522.       that the same protocol be used in both directions.  It is
  2523.       perfectly acceptable for different protocols to be used in each
  2524.       direction.  This will, of course, depend on the specific protocols
  2525.       negotiated.
  2526.  
  2527.    A summary of the Quality-Protocol Configuration Option format is
  2528.    shown below.  The fields are transmitted from left to right.
  2529.  
  2530.     0                   1                   2                   3
  2531.     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
  2532.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2533.    |     Type      |    Length     |        Quality-Protocol       |
  2534.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2535.    |    Data ...
  2536.    +-+-+-+-+
  2537.  
  2538.  
  2539.    Type
  2540.  
  2541.       4
  2542.  
  2543.    Length
  2544.  
  2545.       >= 4
  2546.  
  2547.    Quality-Protocol
  2548.  
  2549.       The Quality-Protocol field is two octets, and indicates the link
  2550.       quality monitoring protocol desired.  Values for this field are
  2551.       always the same as the PPP Protocol field values for that same
  2552.       monitoring protocol.
  2553.  
  2554.       Up-to-date values of the Quality-Protocol field are specified in
  2555.       the most recent "Assigned Numbers" RFC [2].  Current values are
  2556.       assigned as follows:
  2557.  
  2558.       Value (in hex)  Protocol
  2559.  
  2560.       c025            Link Quality Report
  2561.  
  2562.  
  2563.    Data
  2564.  
  2565.       The Data field is zero or more octets, and contains additional
  2566.       data as determined by the particular protocol.
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573. Simpson                                                        [Page 44]
  2574.  
  2575. RFC 1661                Point-to-Point Protocol                July 1994
  2576.  
  2577.  
  2578. 6.4.  Magic-Number
  2579.  
  2580.    Description
  2581.  
  2582.       This Configuration Option provides a method to detect looped-back
  2583.       links and other Data Link Layer anomalies.  This Configuration
  2584.       Option MAY be required by some other Configuration Options such as
  2585.       the Quality-Protocol Configuration Option.  By default, the
  2586.       Magic-Number is not negotiated, and zero is inserted where a
  2587.       Magic-Number might otherwise be used.
  2588.  
  2589.       Before this Configuration Option is requested, an implementation
  2590.       MUST choose its Magic-Number.  It is recommended that the Magic-
  2591.       Number be chosen in the most random manner possible in order to
  2592.       guarantee with very high probability that an implementation will
  2593.       arrive at a unique number.  A good way to choose a unique random
  2594.       number is to start with a unique seed.  Suggested sources of
  2595.       uniqueness include machine serial numbers, other network hardware
  2596.       addresses, time-of-day clocks, etc.  Particularly good random
  2597.       number seeds are precise measurements of the inter-arrival time of
  2598.       physical events such as packet reception on other connected
  2599.       networks, server response time, or the typing rate of a human
  2600.       user.  It is also suggested that as many sources as possible be
  2601.       used simultaneously.
  2602.  
  2603.       When a Configure-Request is received with a Magic-Number
  2604.       Configuration Option, the received Magic-Number is compared with
  2605.       the Magic-Number of the last Configure-Request sent to the peer.
  2606.       If the two Magic-Numbers are different, then the link is not
  2607.       looped-back, and the Magic-Number SHOULD be acknowledged.  If the
  2608.       two Magic-Numbers are equal, then it is possible, but not certain,
  2609.       that the link is looped-back and that this Configure-Request is
  2610.       actually the one last sent.  To determine this, a Configure-Nak
  2611.       MUST be sent specifying a different Magic-Number value.  A new
  2612.       Configure-Request SHOULD NOT be sent to the peer until normal
  2613.       processing would cause it to be sent (that is, until a Configure-
  2614.       Nak is received or the Restart timer runs out).
  2615.  
  2616.       Reception of a Configure-Nak with a Magic-Number different from
  2617.       that of the last Configure-Nak sent to the peer proves that a link
  2618.       is not looped-back, and indicates a unique Magic-Number.  If the
  2619.       Magic-Number is equal to the one sent in the last Configure-Nak,
  2620.       the possibility of a looped-back link is increased, and a new
  2621.       Magic-Number MUST be chosen.  In either case, a new Configure-
  2622.       Request SHOULD be sent with the new Magic-Number.
  2623.  
  2624.       If the link is indeed looped-back, this sequence (transmit
  2625.       Configure-Request, receive Configure-Request, transmit Configure-
  2626.  
  2627.  
  2628.  
  2629. Simpson                                                        [Page 45]
  2630.  
  2631. RFC 1661                Point-to-Point Protocol                July 1994
  2632.  
  2633.  
  2634.       Nak, receive Configure-Nak) will repeat over and over again.  If
  2635.       the link is not looped-back, this sequence might occur a few
  2636.       times, but it is extremely unlikely to occur repeatedly.  More
  2637.       likely, the Magic-Numbers chosen at either end will quickly
  2638.       diverge, terminating the sequence.  The following table shows the
  2639.       probability of collisions assuming that both ends of the link
  2640.       select Magic-Numbers with a perfectly uniform distribution:
  2641.  
  2642.          Number of Collisions        Probability
  2643.          --------------------   ---------------------
  2644.                  1              1/2**32    = 2.3 E-10
  2645.                  2              1/2**32**2 = 5.4 E-20
  2646.                  3              1/2**32**3 = 1.3 E-29
  2647.  
  2648.  
  2649.       Good sources of uniqueness or randomness are required for this
  2650.       divergence to occur.  If a good source of uniqueness cannot be
  2651.       found, it is recommended that this Configuration Option not be
  2652.       enabled; Configure-Requests with the option SHOULD NOT be
  2653.       transmitted and any Magic-Number Configuration Options which the
  2654.       peer sends SHOULD be either acknowledged or rejected.  In this
  2655.       case, looped-back links cannot be reliably detected by the
  2656.       implementation, although they may still be detectable by the peer.
  2657.  
  2658.       If an implementation does transmit a Configure-Request with a
  2659.       Magic-Number Configuration Option, then it MUST NOT respond with a
  2660.       Configure-Reject when it receives a Configure-Request with a
  2661.       Magic-Number Configuration Option.  That is, if an implementation
  2662.       desires to use Magic Numbers, then it MUST also allow its peer to
  2663.       do so.  If an implementation does receive a Configure-Reject in
  2664.       response to a Configure-Request, it can only mean that the link is
  2665.       not looped-back, and that its peer will not be using Magic-
  2666.       Numbers.  In this case, an implementation SHOULD act as if the
  2667.       negotiation had been successful (as if it had instead received a
  2668.       Configure-Ack).
  2669.  
  2670.       The Magic-Number also may be used to detect looped-back links
  2671.       during normal operation, as well as during Configuration Option
  2672.       negotiation.  All LCP Echo-Request, Echo-Reply, and Discard-
  2673.       Request packets have a Magic-Number field.  If Magic-Number has
  2674.       been successfully negotiated, an implementation MUST transmit
  2675.       these packets with the Magic-Number field set to its negotiated
  2676.       Magic-Number.
  2677.  
  2678.       The Magic-Number field of these packets SHOULD be inspected on
  2679.       reception.  All received Magic-Number fields MUST be equal to
  2680.       either zero or the peer's unique Magic-Number, depending on
  2681.       whether or not the peer negotiated a Magic-Number.
  2682.  
  2683.  
  2684.  
  2685. Simpson                                                        [Page 46]
  2686.  
  2687. RFC 1661                Point-to-Point Protocol                July 1994
  2688.  
  2689.  
  2690.       Reception of a Magic-Number field equal to the negotiated local
  2691.       Magic-Number indicates a looped-back link.  Reception of a Magic-
  2692.       Number other than the negotiated local Magic-Number, the peer's
  2693.       negotiated Magic-Number, or zero if the peer didn't negotiate one,
  2694.       indicates a link which has been (mis)configured for communications
  2695.       with a different peer.
  2696.  
  2697.       Procedures for recovery from either case are unspecified, and may
  2698.       vary from implementation to implementation.  A somewhat
  2699.       pessimistic procedure is to assume a LCP Down event.  A further
  2700.       Open event will begin the process of re-establishing the link,
  2701.       which can't complete until the looped-back condition is
  2702.       terminated, and Magic-Numbers are successfully negotiated.  A more
  2703.       optimistic procedure (in the case of a looped-back link) is to
  2704.       begin transmitting LCP Echo-Request packets until an appropriate
  2705.       Echo-Reply is received, indicating a termination of the looped-
  2706.       back condition.
  2707.  
  2708.    A summary of the Magic-Number Configuration Option format is shown
  2709.    below.  The fields are transmitted from left to right.
  2710.  
  2711.     0                   1                   2                   3
  2712.     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
  2713.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2714.    |     Type      |    Length     |          Magic-Number
  2715.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2716.          Magic-Number (cont)       |
  2717.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2718.  
  2719.  
  2720.    Type
  2721.  
  2722.       5
  2723.  
  2724.    Length
  2725.  
  2726.       6
  2727.  
  2728.    Magic-Number
  2729.  
  2730.       The Magic-Number field is four octets, and indicates a number
  2731.       which is very likely to be unique to one end of the link.  A
  2732.       Magic-Number of zero is illegal and MUST always be Nak'd, if it is
  2733.       not Rejected outright.
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741. Simpson                                                        [Page 47]
  2742.  
  2743. RFC 1661                Point-to-Point Protocol                July 1994
  2744.  
  2745.  
  2746. 6.5.  Protocol-Field-Compression (PFC)
  2747.  
  2748.    Description
  2749.  
  2750.       This Configuration Option provides a method to negotiate the
  2751.       compression of the PPP Protocol field.  By default, all
  2752.       implementations MUST transmit packets with two octet PPP Protocol
  2753.       fields.
  2754.  
  2755.       PPP Protocol field numbers are chosen such that some values may be
  2756.       compressed into a single octet form which is clearly
  2757.       distinguishable from the two octet form.  This Configuration
  2758.       Option is sent to inform the peer that the implementation can
  2759.       receive such single octet Protocol fields.
  2760.  
  2761.       As previously mentioned, the Protocol field uses an extension
  2762.       mechanism consistent with the ISO 3309 extension mechanism for the
  2763.       Address field; the Least Significant Bit (LSB) of each octet is
  2764.       used to indicate extension of the Protocol field.  A binary "0" as
  2765.       the LSB indicates that the Protocol field continues with the
  2766.       following octet.  The presence of a binary "1" as the LSB marks
  2767.       the last octet of the Protocol field.  Notice that any number of
  2768.       "0" octets may be prepended to the field, and will still indicate
  2769.       the same value (consider the two binary representations for 3,
  2770.       00000011 and 00000000 00000011).
  2771.  
  2772.       When using low speed links, it is desirable to conserve bandwidth
  2773.       by sending as little redundant data as possible.  The Protocol-
  2774.       Field-Compression Configuration Option allows a trade-off between
  2775.       implementation simplicity and bandwidth efficiency.  If
  2776.       successfully negotiated, the ISO 3309 extension mechanism may be
  2777.       used to compress the Protocol field to one octet instead of two.
  2778.       The large majority of packets are compressible since data
  2779.       protocols are typically assigned with Protocol field values less
  2780.       than 256.
  2781.  
  2782.       Compressed Protocol fields MUST NOT be transmitted unless this
  2783.       Configuration Option has been negotiated.  When negotiated, PPP
  2784.       implementations MUST accept PPP packets with either double-octet
  2785.       or single-octet Protocol fields, and MUST NOT distinguish between
  2786.       them.
  2787.  
  2788.       The Protocol field is never compressed when sending any LCP
  2789.       packet.  This rule guarantees unambiguous recognition of LCP
  2790.       packets.
  2791.  
  2792.       When a Protocol field is compressed, the Data Link Layer FCS field
  2793.       is calculated on the compressed frame, not the original
  2794.  
  2795.  
  2796.  
  2797. Simpson                                                        [Page 48]
  2798.  
  2799. RFC 1661                Point-to-Point Protocol                July 1994
  2800.  
  2801.  
  2802.       uncompressed frame.
  2803.  
  2804.    A summary of the Protocol-Field-Compression Configuration Option
  2805.    format is shown below.  The fields are transmitted from left to
  2806.    right.
  2807.  
  2808.     0                   1
  2809.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
  2810.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2811.    |     Type      |    Length     |
  2812.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2813.  
  2814.  
  2815.    Type
  2816.  
  2817.       7
  2818.  
  2819.    Length
  2820.  
  2821.       2
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853. Simpson                                                        [Page 49]
  2854.  
  2855. RFC 1661                Point-to-Point Protocol                July 1994
  2856.  
  2857.  
  2858. 6.6.  Address-and-Control-Field-Compression (ACFC)
  2859.  
  2860.    Description
  2861.  
  2862.       This Configuration Option provides a method to negotiate the
  2863.       compression of the Data Link Layer Address and Control fields.  By
  2864.       default, all implementations MUST transmit frames with Address and
  2865.       Control fields appropriate to the link framing.
  2866.  
  2867.       Since these fields usually have constant values for point-to-point
  2868.       links, they are easily compressed.  This Configuration Option is
  2869.       sent to inform the peer that the implementation can receive
  2870.       compressed Address and Control fields.
  2871.  
  2872.       If a compressed frame is received when Address-and-Control-Field-
  2873.       Compression has not been negotiated, the implementation MAY
  2874.       silently discard the frame.
  2875.  
  2876.       The Address and Control fields MUST NOT be compressed when sending
  2877.       any LCP packet.  This rule guarantees unambiguous recognition of
  2878.       LCP packets.
  2879.  
  2880.       When the Address and Control fields are compressed, the Data Link
  2881.       Layer FCS field is calculated on the compressed frame, not the
  2882.       original uncompressed frame.
  2883.  
  2884.    A summary of the Address-and-Control-Field-Compression configuration
  2885.    option format is shown below.  The fields are transmitted from left
  2886.    to right.
  2887.  
  2888.     0                   1
  2889.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
  2890.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2891.    |     Type      |    Length     |
  2892.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2893.  
  2894.  
  2895.    Type
  2896.  
  2897.       8
  2898.  
  2899.    Length
  2900.  
  2901.       2
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909. Simpson                                                        [Page 50]
  2910.  
  2911. RFC 1661                Point-to-Point Protocol                July 1994
  2912.  
  2913.  
  2914. Security Considerations
  2915.  
  2916.    Security issues are briefly discussed in sections concerning the
  2917.    Authentication Phase, the Close event, and the Authentication-
  2918.    Protocol Configuration Option.
  2919.  
  2920.  
  2921.  
  2922. References
  2923.  
  2924.    [1]   Perkins, D., "Requirements for an Internet Standard Point-to-
  2925.          Point Protocol", RFC 1547, Carnegie Mellon University,
  2926.          December 1993.
  2927.  
  2928.    [2]   Reynolds, J., and Postel, J., "Assigned Numbers", STD 2, RFC
  2929.          1340, USC/Information Sciences Institute, July 1992.
  2930.  
  2931.  
  2932. Acknowledgements
  2933.  
  2934.    This document is the product of the Point-to-Point Protocol Working
  2935.    Group of the Internet Engineering Task Force (IETF).  Comments should
  2936.    be submitted to the ietf-ppp@merit.edu mailing list.
  2937.  
  2938.    Much of the text in this document is taken from the working group
  2939.    requirements [1]; and RFCs 1171 & 1172, by Drew Perkins while at
  2940.    Carnegie Mellon University, and by Russ Hobby of the University of
  2941.    California at Davis.
  2942.  
  2943.    William Simpson was principally responsible for introducing
  2944.    consistent terminology and philosophy, and the re-design of the phase
  2945.    and negotiation state machines.
  2946.  
  2947.    Many people spent significant time helping to develop the Point-to-
  2948.    Point Protocol.  The complete list of people is too numerous to list,
  2949.    but the following people deserve special thanks: Rick Adams, Ken
  2950.    Adelman, Fred Baker, Mike Ballard, Craig Fox, Karl Fox, Phill Gross,
  2951.    Kory Hamzeh, former WG chair Russ Hobby, David Kaufman, former WG
  2952.    chair Steve Knowles, Mark Lewis, former WG chair Brian Lloyd, John
  2953.    LoVerso, Bill Melohn, Mike Patton, former WG chair Drew Perkins, Greg
  2954.    Satz, John Shriver, Vernon Schryver, and Asher Waldfogel.
  2955.  
  2956.    Special thanks to Morning Star Technologies for providing computing
  2957.    resources and network access support for writing this specification.
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965. Simpson                                                        [Page 51]
  2966.  
  2967. RFC 1661                Point-to-Point Protocol                July 1994
  2968.  
  2969.  
  2970. Chair's Address
  2971.  
  2972.    The working group can be contacted via the current chair:
  2973.  
  2974.       Fred Baker
  2975.       Advanced Computer Communications
  2976.       315 Bollay Drive
  2977.       Santa Barbara, California  93117
  2978.  
  2979.       fbaker@acc.com
  2980.  
  2981.  
  2982.  
  2983. Editor's Address
  2984.  
  2985.    Questions about this memo can also be directed to:
  2986.  
  2987.       William Allen Simpson
  2988.       Daydreamer
  2989.       Computer Systems Consulting Services
  2990.       1384 Fontaine
  2991.       Madison Heights, Michigan  48071
  2992.  
  2993.       Bill.Simpson@um.cc.umich.edu
  2994.           bsimpson@MorningStar.com
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021. Simpson                                                        [Page 52]
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.