Link Control Protocol (LCP)
What is Link Control Protocol (LCP)?
In computer networking, Point-to-Point Protocol (PPP) provides a standard way to transport multiprotocol data over point-to-point links; within PPP, Link Control Protocol (LCP) establishes, configures and tests data link internet connections.
In a communications link, the devices using PPP employ multiple LCP frames to conduct LCP operations.
How does Link Control Protocol work?
LCP is considered a data link layer protocol because it works at the data link layer (Layer 2) of the Open System Interconnection networking reference model.
Before establishing communications over a point-to-point link, each end of the PPP link sends out LCP packets. The LCP packet either accepts or rejects the identity of its linked peer, agrees upon packet size limits and looks for common misconfiguration errors. It checks the connection to see whether it's good enough to sustain data transmission at the intended rate.
If LCP accepts the link, it establishes and configures it so that data can be transported on the network. But, if it determines that the link is not functioning properly, it terminates it, and data does not get transmitted.
LCP and NCP on a PPP link on a TCP/IP network
LCP is a distinguishing feature of PPP. Like LCP, Network Control Protocol (NCP) also provides control information by defining management procedures for frame content protocols.
Here's how LCP and NCP work on a PPP link on a Transmission Control Protocol/Internet Protocol (TCP/IP) network:
- The source configures and tests serial links by sending a series of LCP messages.
- Both ends exchange LCP messages to determine the links to be used.
- The source establishes the network layer protocol by sending a series of NCP messages.
- It sends IP packets and frames across the link.
- The link is terminated by NCP and LCP messages.
- If a link is closed down abnormally, due to the loss of a carrier signal, for example, LCP does any necessary cleanups.
Once PPP establishes the connection, higher-layer protocols -- IP, Internetwork Packet Exchange, etc. -- use the connection to exchange packets.
What are LCP frames?
LCP is used to control the PPP link by sending special LCP messages across the physical link between sending and receiving devices; the messages are called LCP packets or frames. Each LCP frame is encapsulated in the payload field of the PPP frame.
In total, there are 11 LCP frame types defined in the main PPP document. These are grouped into three classes:
- link configuration packets/frames
- used to establish and configure a link, and to verify peer identification
- four frames used
- link maintenance packets
- used to estimate optimal data packet size and manage and debug a link
- five frames used
- link termination packets
- used to terminate a link if available resources exceed requirements
- two frames used
Each frame corresponds to a life phase of a PPP link. Link configuration occurs during the initial link establishment phase of a link. This is where messages like Configure-Request and Configure-Ack are exchanged.
Link maintenance happens while the link is open. At that stage, messages such as Echo-Request and Echo-Reply are first used to test the link. Then, both devices send and receive data.
Link termination frames are used when a link is being closed down, with messages such as Terminate-Request and Terminate-Ack.
LCP and authentication protocols on PPP
To establish a PPP session, LCP can negotiate various types of authentication protocols, including the following:
- Password Authentication Protocol (PAP). To transmit usernames and passwords in cleartext using a two-way handshake.
- Shiva PAP (SPAP). Vendor-specific PAP.
- Challenge-Handshake Authentication Protocol (CHAP). Creates a secure password shared by the user and CHAP server for secure communications and is more secure than PAP or SPAP.
- Microsoft CHAP (MS-CHAP). More secure than regular CHAP.