LCP operation includes provisions for link establishment, link maintenance and link termination. LCP operation uses three classes of LCP frames to accomplish the work of each of the LCP phases:
Link-establishment frames establish and configure a link (Configure-Request, Configure-Ack, Configure-Nak, and Configure-Reject)
Link-maintenance frames manage and debug a link (Code-Reject, Protocol-Reject, Echo-Request, Echo-Reply, and Discard-Request)
Link-termination frames terminate a link (Terminate-Request and Terminate-Ack)
The first phase of LCP operation is link establishment. This phase must complete successfully, before any network layer packets can be exchanged. During link establishment, the LCP opens the connection and negotiates the configuration parameters.
The link establishment process starts with the initiating device sending a Configure-Request frame to the responder. The Configure-Request frame includes a variable number of configuration options needed to set up on the link. In other words, the initiator has sent a "wish list" to the responder.
The initiator's wish list includes options for how it wants the link created, including protocol or authentication parameters. The responder processes the wish list, and if it is acceptable responds with a Configure-Ack message. After receiving the Configure-Ack message, the process moves on to the authentication stage.
If the options are not acceptable or not recognized the responder sends a Configure-Nak or Configure-Reject. If a Configure-Ack is received, the operation of the link is handed over to the NCP. If either a Configure-Nak or Configure-Reject message is sent to the requester, the link is not established. If the negotiation fails, the initiator needs to restart the process with new options.
During link maintenance, LCP can use messages to provide feedback and test the link.
Code-Reject and Protocol-Reject - These frame types provide feedback when one device receives an invalid frame due to either an unrecognized LCP code (LCP frame type) or a bad protocol identifier. For example, if an un-interpretable packet is received from the peer, a Code-Reject packet is sent in response.
Echo-Request, Echo-Reply, and Discard-Request - These frames can be used for testing the link.
After the transfer of data at the network layer completes, the LCP terminates the link. In the figure, notice that the NCP only terminates the network layer and NCP link. The link remains open until the LCP terminates it. If the LCP terminates the link before the NCP, the NCP session is also terminated.
PPP can terminate the link at any time. This might happen because of the loss of the carrier, authentication failure, link quality failure, the expiration of an idle-period timer, or the administrative closing of the link. The LCP closes the link by exchanging Terminate packets. The device initiating the shutdown sends a Terminate-Request message. The other device replies with a Terminate-Ack. A termination request indicates that the device sending it needs to close the link. When the link is closing, PPP informs the network layer protocols so that they may take appropriate action.