Skip to content

Instantly share code, notes, and snippets.

@ajithbh
Last active December 20, 2015 08:39
Show Gist options
  • Save ajithbh/6102208 to your computer and use it in GitHub Desktop.
Save ajithbh/6102208 to your computer and use it in GitHub Desktop.
Gist of PPP

Point-to-Point Protocol (PPP)

  • provides a standard method for transporting multiprotocol datagrams over point-to-point links.
  • Comprised of 3 main components
    1. A method for 'encapsulating' multi-protocol datagrams
    2. A Link Control Protocol (LCP) for establishing, configuring and testing the data-link connection
    3. A family of Network Control Protocols (NCPs) for establishing and configuring different network layer protocols

Encapsulation

PPP encapsulation provides for multiplexing of different network-layer protocols simultaneously over the same link. Only 8 additional octets are necessary to form the encapsulation when used within the default framing which is similar to High-level Data Link Control (HDLC) framing. The encapsulation and framing maybe shortened to 2 or 4 octets.

- Fields
  Flag     : 1 octet
  Address  : 1 octet
  Control  : 1 octet
  Protocol : 1 or 2 octet
  Info     : 0 or more
  Padding  : 0 or more
  FCS      : 2 or 4    // Frame Check Sequence - error checking

PPP Encapsulation Summary

+------------+-----------------+---------------+
|  Protocol  |   Information   |   Padding     |
| 8/16 bits  |         *       |      *        |
+------------+-----------------+---------------+

Link Control Protocol

To be portable to a wide variety of environments 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.

Optionally - Authentication of peer and determination when a link is functioning properly and when it is failing

Network Control Protocols

PPP exacerbates problems with current family of network protocols. Eg - assignment and management of IP addresses which is a problem even in LAN env is difficult over circuit switched PPP links.

These problems are handled by a family of NCP, which handle specific needs required by their respective network-layer protocols.

High Level Datalink Control (HDLC)

Link-level protocol used ot facilitate reliable point-to-point transmission of a data packet

Bit-synchronous HDLC (RFC 1662)

A flag sequence indicates the beginning or end of a frame and is used for fram synchronization

Internet Protocol Control Protocol (IPCP)

Responsible for configuring, enabling and disabling the IP modules on both ends of the point-to-point link. It uses the same packet exchange mechanism as the Link Control Protocol.

IPCP packets may not be exchanged until PPP has reached the network-layer protocol phase.

Before any IP packets are communicated, PPP must reach NLP phase, and IPCP must reach opened state.

Van Jacobson TCP/IP header compression reduces the size of TCP/IP headers to 3 bytes.

IPCP config option is used to indicate the ability to receive compressed packets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment