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

📄 rfc1171.txt

📁 RFC 的详细文档!
💻 TXT
📖 第 1 页 / 共 5 页
字号:
   In the state diagram, events are shown above horizontal lines.
   Actions are shown below horizontal lines.  Two types of LCP packets -
   Configure-Naks and Configure-Rejects - are not differentiated in the
   state diagram.  As will be described later, these packets do indeed
   serve different, though similar, functions.  However, at the level of
   detail of this state diagram, they always cause the same transition.

   Since a more detailed specification of the LCP automaton is given in
   a state transition table in the following section, implementation
   should be done by consulting it rather than this state diagram.



Perkins                                                        [Page 11]

RFC 1171                Point-to-Point Protocol                July 1990


                                    +------------------------------+
                                    |                              |
                                    V                              |
        +---2---+           PO +---1---+        RTA +---7---+      |
        |       |<-------------|       |<-----------|       |      |
        |Listen |              |Closed |            |Closing|      |
    RCR |       | C            |       | PLD        |       |      |
   +----|       |----->+------>|       |<---Any     |       |<--+  |
   |scr +-------+      ^       +-------+    State   +-------+   |  |
   |                   |     AO  |   ^                    | TO  |  |
   |       +-----------+     --- |   |                    +---->+  |
   |       |                 SCR |   |                      str ^  |
   |   C   |   RCN/TO            |   | C                        |  |
   |   --- | +-------->+<--------+   | ---                      |  |
   |       | | scr     |             |                          |  |
   |    +---3---+      V   TO  +---4---+            +-------+   |  |
   |    |       |<-----+<------|       |<-----------|       |   |  |
   |    | Req-  |          scr | Ack-  |        scn | Good  |   |  |
   |    | Sent  | RCA          | Rcvd  | RCR        | Req?  |   |  |
   |    |       |------------->|       |----------->|       |   |  |
   |    +-------+              +-------+            +-------+   |  |
   |       | ^                                         |        |  |
   |   RCR | +<--------+                               |        |  |
   |   --- | |         |     TO        RCN         --- |        |  |
   |       | | ---     +---------+   +-----+       sca |        |  |
   |       V | scn           scr |   | scr |           V        |  |
   |    +-------+              +---5---+   |        +---6---+ C |  |
   +--->|       |------------->|       |<--+        |       |---+  |
        | Good  | sca          | Ack-  |            | Open  | str  |
        | Req?  |          RCR | Sent  | RCA        |       |      |
        |       |<-------------|       |----------->|       |      |
        +-------+              +-------+            +-------+      |
              ^                                       |   |        |
              |                                   RCR |   | RTR    |
              +---------------------------------------+   +--------+
                                                  scr       sta

   Events                                  Actions

   RCR - Receive-Configure-Request         scr - Send Configure-Request
   RCA - Receive-Configure-Ack             sca - Send Configure-Ack
   RCN - Receive-Configure-Nak or Reject   scn - Send Configure-Nak
   RTR - Receive-Terminate-Req                    or Reject
   RTA - Receive-Terminate-Ack             str - Send Terminate-Req
   AO  - Active-Open                       sta - Sent Terminate-Ack
   PO  - Passive-Open
   C   - Close
   TO  - Timeout



Perkins                                                        [Page 12]

RFC 1171                Point-to-Point Protocol                July 1990


   PLD - Physical-Layer-Down

4.1.3.  State Transition Table

   The complete state transition table follows.   States  are  indicated
   horizontally,  and events are read vertically.  State transitions and
   actions are represented in the form  action/new-state.   Two  actions
   caused by the same event are represented as action1&action2.

         | State
         |   1       2        3        4        5        6        7
   Events| Closed  Listen  Req-Sent Ack-Rcvd Ack-Sent  Open    Closing
   ------+-------------------------------------------------------------
     AO  | scr/3   scr/3      3        4        5        6      scr/3
     PO  |   2       2        2*       4        5        6      sta/3*
     C   |   1       1        1*       1      str/7    str/7      7
     TO  |   1       2      scr/3    scr/3    scr/3      6      str/7*
    PLD  |   1       1        1        1        1        1        1
    RCR+ | sta/1 scr&sca/5  sca/5    sca/6    sca/5  scr&sca/5    7
    RCR- | sta/1 scr&scn/3  scn/3    scn/4    scn/3  scr&scn/3    7
    RCA  | sta/1   sta/2      4      scr/3      6      scr/3      7
    RCN  | sta/1   sta/2    scr/3    scr/3    scr/5    scr/3      7
    RTR  | sta/1   sta/2    sta/3    sta/3    sta/3    sta/1    sta/7
    RTA  |   1       2        3        3        3        1        1
    RCJ  |   1       2        1        1        1        1        1
    RUC  | scj/1   scj/2    scj/1    scj/1    scj/1    scj/1  1 scj/7
    RER  | sta/1   sta/2      3        4        5      ser/6      7

   Notes:
       RCR+ - Receive-Configure-Request (Good)
       RCR- - Receive-Configure-Request (Bad)
       RCJ  - Receive-Code-Reject
       RUC  - Receive-Unknown-Code
       RER  - Receive-Echo-Request
       scj  - Send-Code-Reject
       ser  - Send-Echo-Reply
        *   - Special attention necessary, see detailed text


4.1.4.  Events

   Transitions and actions in the LCP state machine are caused by
   events.  Some events are caused by commands executed at the local end
   (e.g., Active-Open, Passive-Open, and Close), others are caused by
   the receipt of packets from the remote end (e.g., Receive-
   Configure-Request, Receive-Configure-Ack, Receive-Configure-Nak,
   Receive- Terminate-Request and Receive-Terminate-Ack), and still
   others are caused by the expiration of the Restart timer started as



Perkins                                                        [Page 13]

RFC 1171                Point-to-Point Protocol                July 1990


   the result of other events (e.g., Timeout).

   Following is a list of LCP events.

   Active-Open (AO)

      The Active-Open event indicates the local execution of an Active-
      Open command by the network administrator (human or program).
      When this event occurs, LCP should immediately attempt to open the
      connection by exchanging configuration packets with the LCP peer.

   Passive-Open (PO)

      The Passive-Open event is similar to the Active-Open event.
      However, instead of immediately exchanging configuration packets,
      LCP should wait for the peer to send the first packet.  This will
      only happen after an Active-Open event in the LCP peer.

   Close (C)

      The Close event indicates the local execution of a Close command.
      When this event occurs, LCP should immediately attempt to close
      the connection.

   Timeout (TO)

      The Timeout event indicates the expiration of the LCP Restart
      timer.  The LCP Restart timer is started as the result of other
      LCP events.

      The Restart timer is used to time out transmissions of Configure-
      Request and Terminate-Request packets.  Expiration of the Restart
      timer causes a Timeout event, which triggers the corresponding
      Configure-Request or Terminate-Request packet to be retransmitted.
      The Restart timer MUST be configurable, but should default to
      three (3) seconds.

   Receive-Configure-Request (RCR)

      The Receive-Configure-Request event occurs when a Configure-
      Request packet is received from the LCP peer.  The Configure-
      Request packet indicates the desire to open a LCP connection and
      may specify Configuration Options.  The Configure-Request packet
      is more fully described in a later section.

   Receive-Configure-Ack (RCA)

      The Receive-Configure-Ack event occurs when a valid Configure-Ack



Perkins                                                        [Page 14]

RFC 1171                Point-to-Point Protocol                July 1990


      packet is received from the LCP peer.  The Configure-Ack packet is
      a positive response to a Configure-Request packet.

   Receive-Configure-Nak (RCN)

      The Receive-Configure-Nak event occurs when a valid Configure-Nak
      or Configure-Reject packet is received from the LCP peer.  The
      Configure-Nak and Configure-Reject packets are negative responses
      to a Configure-Request packet.

   Receive-Terminate-Request (RTR)

      The Receive-Terminate-Request event occurs when a Terminate-
      Request packet is received from the LCP peer.  The Terminate-
      Request packet indicates the desire to close the LCP connection.

   Receive-Terminate-Ack (RTA)

      The Receive-Terminate-Ack event occurs when a Terminate-Ack packet
      is received from the LCP peer.  The Terminate-Ack packet is a
      response to a Terminate-Request packet.

   Receive-Code-Reject (RCJ)

      The Receive-Code-Reject event occurs when a Code-Reject packet is
      received from the LCP peer.  The Code-Reject packet communicates
      an error that immediately closes the connection.

   Receive-Unknown-Code (RUC)

      The Receive-Unknown-Code event occurs when an un-interpretable
      packet is received from the LCP peer.  The Code-Reject packet is a
      response to an unknown packet.

   Receive-Echo-Request (RER)

      The Receive-Echo-Request event occurs when a Echo-Request, Echo-
      Reply, or Discard-Request packet is received from the LCP peer.
      The Echo-Reply packet is a response to a Echo-Request packet.
      There is no reply to a Discard-Request.

   Physical-Layer-Down (PLD)

      The Physical-Layer-Down event occurs when the Physical Layer
      indicates that it is down.






Perkins                                                        [Page 15]

RFC 1171                Point-to-Point Protocol                July 1990


4.1.5.  Actions

   Actions in the LCP state machine are caused by events and typically
   indicate the transmission of packets and/or the starting or stopping
   of the Restart timer.  Following is a list of LCP actions.

   Send-Configure-Request (scr)

      The Send-Configure-Request action transmits a Configure-Request
      packet.  This indicates the desire to open a LCP connection with a
      specified set of Configuration Options.  The Restart timer is
      started after the Configure-Request packet is transmitted, to
      guard against packet loss.

   Send-Configure-Ack (sca)

      The Send-Configure-Ack action transmits a Configure-Ack packet.
      This acknowledges the receipt of a Configure-Request packet with
      an acceptable set of Configuration Options.

   Send-Configure-Nak (scn)

      The Send-Configure-Nak action transmits a Configure-Nak or
      Configure-Reject packet, as appropriate.  This negative response
      reports the receipt of a Configure-Request packet with an
      unacceptable set of Configuration Options.  Configure-Nak packets
      are used to refuse a Configuration Option value, and to suggest a
      new, acceptable value.  Configure-Reject packets are used to
      refuse all negotiation about a Configuration Option, typically
      because it is not recognized or implemented.  The use of
      Configure-Nak vs. Configure-Reject is more fully described in the
      section on LCP Packet Formats.

   Send-Terminate-Req (str)

      The Send-Terminate-Request action transmits a Terminate-Request
      packet.  This indicates the desire to close a LCP connection.  The
      Restart timer is started after the Terminate-Request packet is
      transmitted, to guard against packet loss.

   Send-Terminate-Ack (sta)

      The Send-Terminate-Request action transmits a Terminate-Ack
      packet.  This acknowledges the receipt of a Terminate-Request
      packet or otherwise confirms the belief that a LCP connection is
      Closed.





Perkins                                                        [Page 16]

RFC 1171                Point-to-Point Protocol                July 1990


   Send-Code-Reject (scj)

      The Send-Code-Reject action transmits a Code-Reject packet.  This
      indicates the receipt of an unknown type of packet.  This is an
      unrecoverable error which causes immediate transitions to the
      Closed state on both ends of the link.

   Send-Echo-Reply (ser)

      The Send-Echo-Reply action transmits an Echo-Reply packet.  This
      acknowledges the receipt of an Echo-Request packet.

4.1.6.  States

   Following is a more detailed description of each LCP state.

   Closed (1)

      The initial and final state is the Closed state.  In the Closed
      state the connection is down and there is no attempt to open it;
      all connection requests from peers are rejected.  Physical-Layer-
      Down events always cause an immediate transition to the Closed
      state.

      There are two events which cause a transition out of the Closed
      state, Active-Open and Passive-Open.  Upon an Active-Open event, a
      Configure-Request is transmitted, the Restart timer is started,
      and the Request-Sent state is entered.  Upon a Passive-Open event,
      the Listen state is entered immediately.  Upon receipt of any
      packet, with the exception of a Terminate-Ack, a Terminate-Ack is
      sent.  Terminate-Acks are silently discarded to avoid creating a
      loop.

      The Restart timer is not running in the Closed state.

      The Physical Layer connection may be disconnected at any time when
      in the LCP Closed state.

   Listen (2)

      The Listen state is similar to the Closed state in that the
      connection is down and there is no attempt to open it.  However,
      peer connection requests are no longer rejected.

      Upon receipt of a Configure-Request, a Configure-Request is
      immediately transmitted and the Restart timer is started.  The
      received Configuration Options are examined and the proper
      response is sent.  If a Configure-Ack is sent, the Ack-Sent state



Perkins                                                        [Page 17]

RFC 1171                Point-to-Point Protocol                July 1990


      is entered.  Otherwise, if a Configure-Nak or Configure-Reject is
      sent, the Request-Sent state is entered.  In either case, LCP
      exits its passive state, and begins to actively open the
      connection.  Terminate-Ack packets are sent in response to either
      Configure-Ack or Configure-Nak packets,

      The Restart timer is not running in the Listen state.

   Request-Sent (3)

      In the Request-Sent state an active attempt is made to open the
      connection.  A Configure-Request has been sent and the Restart
      timer is running, but a Configure-Ack has not yet been received
      nor has one been sent.

      Upon receipt of a Configure-Ack, the Ack-Received state is
      immediately entered.  Upon receipt of a Configure-Nak or
      Configure-Reject, the Configure-Request Configuration Options are
      adjusted appropriately, a new Configure-Request is transmitted,
      and the Restart timer is restarted.  Similarly, upon the
      expiration of the Restart timer, a new Configure-Request is
      transmitted and the Restart timer is restarted.  Upon receipt of a
      Configure-Request, the Configuration Options are examined and if
      acceptable, a Configure-Ack is sent and the Ack-Sent state is
      entered.  If the Configuration Options are unacceptable, a
      Configure-Nak or Configure-Reject is sent as appropriate.

      Since there is an outstanding Configure-Request in the Request-
      Sent state, special care must be taken to implement the Passive-
      Open and Close events; otherwise, it is possible for the LCP peer
      to think the connection is open.  Processing of either event
      should be postponed until there is reasonable assurance that the

⌨️ 快捷键说明

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