中文网站
  Advanced Search
Read the latest Blogs from IT professionals in the field. Read and write community created documents. Need IT help? Ask our staff. Connect with your peers. Check our Tech Shop for posters, books and software tools. Home

LCP: PPP Link Control Protocol

The Link Control Protocol (LCP) is used to automatically agree upon the encapsulation format options, handle varying limits on sizes of packets, detect a looped-back link and other common misconfiguration errors, and terminate the link. Other optional facilities provided are authentication of the identity of its peer on the link, and determination when a link is functioning properly and when it is failing. The Link Control Protocol LCP in PPP is versatile and portable to a wide variety of environment.

There are three classes of LCP packets:

  1. Link Configuration packets used to establish and configure a link (Configure-Request, Configure-Ack, Configure-Nak and Configure-Reject).
  2. Link Termination packets used to terminate a link (Terminate-Request and Terminate-Ack).
  3. Link Maintenance packets used to manage and debug a link (Code-Reject, Protocol-Reject, Echo-Request, Echo-Reply, and Discard-Request).

In the interest of simplicity, there is no version field in the LCP packet. A correctly functioning LCP implementation will always respond to unknown Protocols and Codes with an easily recognizable LCP packet, thus providing a deterministic fallback mechanism for implementations of other versions.

Regardless of which Configuration Options are enabled, all LCP Link Configuration, Link Termination, and Code-Reject packets (codes 1 through 7) are always sent as if no Configuration Options were negotiated. In particular, each Configuration Option specifies a default value. This ensures that such LCP packets are always recognizable, even when one end of the link mistakenly believes the link to be open.

Exactly one LCP packet is encapsulated in the PPP Information field, where the PPP Protocol field indicates type hex c021 (Link Control Protocol).

Protocol Structure

8 bits 16 bits 32 bits variable
Type Length Authentication-Protocol Data
  • Code - Decimal value which indicates the type of LCP packet:
    • 1 Configure-Request.
    • 2 Configure-Ack.
    • 3 Configure-Nak.
    • 4 Configure-Reject.
    • 5 Terminate-Request.
    • 6 Terminate-Ack.
    • 7 Code-Reject.
    • 8 Protocol-Reject.
    • 9 Echo-Request.
    • 10 Echo-Reply.
    • 11 Discard-Request.
    • 12 Link-Quality Report.
  • Identifier - Decimal value which aids in matching requests and replies.
    Length - Length of the LCP packet, including the Code, Identifier, Length and Data fields.
  • Data - Variable length field which may contain one or more configuration options.

Related protocols: PPP, PPPoE, PPPoA, SLIP, HDLC, NCP

Sponsor Source: LCP is defined by IETF (http://www.ietf.org).

Reference:
http://www.javvin.com/protocol/rfc1570.pdf: PPP LCP Extensions.
http://www.javvin.com/protocol/rfc1661.pdf: The Point-to-Point Protocol (PPP)