The following part takes PPPoE CHAP as an example to illustrate the access process of a PPP user.
Figure 6-7 Access process of a PPP user
2.PADO 1.PADI
3.PADR 4.PADS
5.LCP negotiation£¨CHAP authentication£©
6.Challenge 7.Response
8.Access Request 9.Access Accept/Reject 10.Success/Failure
11 NCP negotiation PPPoE
negotiation
PPP negotiation
User logs in
User CX AAA Server
6.4.2 PPP State Machine
LCPs and NCPs run in compliance with the PPP state machine, whereas PAP and CHAP do not.
All PPP negotiation processes are implemented through the PPP state machine. As the core of PPP, the PPP state machine provides the following status:
Initial: In the Initial state, the lower layer is unavailable and no Open event has occurred.
The Restart timer does not run in the Initial state.
Starting: In the Starting state, an Open event has occurred, but the lower layer is still unavailable (Down) and the Restart timer does not run. When the lower layer becomes available (Up), a Configure-Request packet is sent and the system enters the
Request-Sent state.
Closed: In the Closed state, the link is available (Up), but no Open event has occurred.
The Restart timer does not run in the Closed state.
Stopped: After a link is disconnected, the link configuration fails, or a state machine fault occurs, a Terminate -Ack or This-layer-Finished event occurs, the system enters the Stopped state. The Restart timer does not run in the Stopped state. The automation machine enters the Starting state after receiving a Down event. A new configuration negotiation starts upon reception of Configure-Request packets.
Closing: In the Closing state, an attempt is made to terminate the connection. A Terminate-Request packet has been sent and the Restart timer runs, but no
Terminate-Ack packet has been received. Upon reception of a Terminate-Ack packet, the system enters the Closed state. Upon the expiration of the Restart timer, a new
Terminate-Request packet is sent, and the Restart timer is restarted. After the Restart timer has expired Max-Terminate times, the system enters the Closed state.
Stopping: In the Stopping state, a Terminate-Request packet has been sent and the Restart timer runs, but no Terminate-Ack packet has been received. After the link has been terminated, a protocol can be re-configured in the Stopped or Starting state. The difference between the Stopping state and the Closing state is that an Open event has occurred in the Stopping state whereas no Open event occurs in the Closing state.
Request-Sent: In the Request-Sent state, an attempt is made to negotiate connection parameters. A Configure-Request packet has been sent and the Restart timer runs, but no Configure-Ack packet has been received.
Ack-Rcvd: In the Ack-Rcvd state, a Configure-Request packet has been sent and a Configure-Ack packet has been received. The Restart timer still runs because no Configure-Ack packet has been sent.
Ack-Sent: In the Ack-Sent state, a Configure-Ack packet is sent.
Opened: In the Opened state, negotiation succeeds and the Restart timer is not closed.
When the system enters the Opened state, the lower layer notifies the upper layer that the lower layer goes Up. When the system quits the Opened state, the lower layer notifies the upper layer that the lower layer goes Down.
State transitions in the state machine are caused by the following events:
Up: This event occurs when the lower layer gets ready for transmitting packets. The low layer notifies the upper layer of the Up event indicating that the upper layer can use the lower layer protocol.
Down: This event occurs when the lower layer will no longer transmit packets. The lower layer notifies the upper layer of the Down event indicating that the upper layer can no longer use the lower layer protocol. Then, resources can be released.
6 PPPoE Access
HUAWEI CX600 Metro Services Platform Feature Description - User Access
6-10 Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
Issue 01 (2010-06-25)
Open: This event indicates that a link is available. When this event occurs and the link is not in the Opened state, the automaton attempts to send packets to the peer for
negotiation.
Close: This event indicates that a link is unavailable. When this event occurs and the link is not in the Closed state, the automaton attempts to terminate the connection. Further attempts for connecting the link will be denied until a new Open event occurs.
Timeout(T0+,T0-): This event indicates the expiration of the Restart timer. The Restart timer is used for responses to Configure-Request and Terminate-Request packets. The TO+ event indicates that the value of the Restart timer is greater than 0, which triggers retransmission of the corresponding Configure-Request or Terminate-Request packet.
The TO- event indicates that the value of the Restart timer is smaller than 0, and no more packets need to be retransmitted.
Receive-Configure-Request(RCR+,RCR-): This event occurs when a Configure-Request packet is received from the peer. The RCR+ event indicates that the Configure-Request is acceptable, which triggers transmission of a corresponding Configure-Ack packet. The RCR- event indicates that the Configure-Request is unacceptable, which triggers
transmission of a corresponding Configure-Nak or Configure-Reject packet.
Receive-Configure-Ack(RCA): This event occurs when a valid Configure-Ack packet is received from the peer.
Receive-Configure-Nak/Reject(RCN): This event occurs when a valid Configure-Nak or Configure-Reject packet is received from the peer. A Configure-Nak packet contains valid but rejected options, excluding acceptable options. A Configure-Reject packet contains unacceptable options.
Receive-Terminate-Request(RTR): This event occurs when a Terminate-Request packet is received. The Terminate-Request packet indicates that the peer intends to close the connection.
Receive-Terminate-Ack(RTA): This event occurs when a Terminate-Ack packet is received. The Terminate-Ack packet is usually in response to a Terminate-Request packet. The Terminate-Ack packet may also indicate that the peer is in the Closed or Stopped state.
Receive-Unknown-Code(RUC): This event occurs when an un-interpretable packet is received. A Code-Reject packet is sent in response.
Receive-Code-Reject, Receive-Protocol-Reject(RXJ+,RXJ-): This event occurs when a Code-Reject or a Protocol-Reject packet is received. The RXJ+ event occurs when the rejected value is acceptable; the RXJ- event occurs when the rejected value is
unacceptable, which terminates the connection.
Receive-Echo-Request,Receive-Echo-Reply,Receive-Discard-Request(RXR): This event occurs when an Echo-Request packet, an Echo-Reply packet, or a Discard-Request packet is received. An Echo-Reply packet is sent in response to an Echo-Request packet and no packet is sent in response to an Echo-Reply packet or a Discard-Request packet.