Point-to-Point Protocol
In computer networking, Point-to-Point Protocol is a data link layer communication protocol between two routers directly without any host or any other networking in between. It can provide loop detection, authentication, transmission encryption, and data compression.
PPP is used over many types of physical networks, including serial cable, phone line, trunk line, cellular telephone, specialized radio links, ISDN, and fiber optic links such as SONET. Since IP packets cannot be transmitted over a modem line on their own without some data link protocol that can identify where the transmitted frame starts and where it ends, Internet service providers have used PPP for customer dial-up access to the Internet.
PPP is used on former dial-up networking lines. Two derivatives of PPP, Point-to-Point Protocol over Ethernet and Point-to-Point Protocol over ATM, are used most commonly by ISPs to establish a digital subscriber line Internet service LP connection with customers.
Description
PPP is very commonly used as a data-link-layer protocol for connection over synchronous and asynchronous circuits, where it has largely superseded the older Serial Line Internet Protocol and telephone company mandated standards. The only requirement for PPP is that the circuit provided be duplex. PPP was made to work with numerous network-layer protocols, including Internet Protocol, TRILL, Novell's Internetwork Packet Exchange, NBF, DEC net and AppleTalk. Like SLIP, this is a full Internet connection over telephone lines via modem. It is more reliable than SLIP because it double checks to ensure Internet packets arrive intact. It resends any damaged packets.PPP was designed somewhat after the original HDLC specifications. The people who had designed PPP included many additional features that had been seen only in proprietary data-link protocols up to that time. PPP is specified in RFC 1661.
RFC 2516 describes Point-to-Point Protocol over Ethernet as a method for transmitting PPP over Ethernet that is sometimes used with DSL. RFC 2364 describes Point-to-Point Protocol over ATM as a method for transmitting PPP over ATM Adaptation Layer 5, which is also a common alternative to PPPoE used with DSL.
PPP, PPPoE and PPPoA are widely used in WAN lines.
PPP is a layered protocol that has three components:
- An encapsulation component that is used to transmit datagrams over the specified physical layer.
- A Link Control Protocol to establish, configure, and test the link as well as negotiate settings, options and the use of features.
- One or more Network Control Protocols used to negotiate optional configuration parameters and facilities for the network layer. There is one [|NCP] for each higher-layer protocol supported by PPP.
Automatic self configuration
RFC 1994 describes Challenge-Handshake Authentication Protocol, which is preferred for establishing dial-up connections with ISPs.
Although deprecated, Password Authentication Protocol is still sometimes used.
Another option for authentication over PPP is Extensible Authentication Protocol described in RFC 2284.
After the link has been established, additional network configuration may take place. Most commonly, the Internet Protocol Control Protocol is used, although Internetwork Packet Exchange Control Protocol and AppleTalk Control Protocol were once popular. Internet Protocol Version 6 Control Protocol will see extended use in the future, when IPv6 replaces IPv4 as the dominant layer-3 protocol.
Multiple network layer protocols
PPP permits multiple network layer protocols to operate on the same communication link. For every network layer protocol used, a separate Network Control Protocol is provided in order to encapsulate and negotiate options for the multiple network layer protocols. It negotiates network-layer information, e.g. network address or compression options, after the connection has been established.For example, IP uses IPCP, and Internetwork Packet Exchange uses the Novell IPX Control Protocol. NCPs include fields containing standardized codes to indicate the network layer protocol type that the PPP connection encapsulates.
The following NCPs may be used with PPP:
- IPCP for IP, protocol code number 0x8021, RFC 1332
- the OSI Network Layer Control Protocol for the various OSI network layer protocols, protocol code number 0x8023, RFC 1377
- the AppleTalk Control Protocol for AppleTalk, protocol code number 0x8029, RFC 1378
- the Internetwork Packet Exchange Control Protocol for the Internet Packet Exchange, protocol code number 0x802B, RFC 1552
- the DEC net Phase IV Control Protocol for DNA Phase IV Routing protocol, protocol code number 0x8027, RFC 1762
- the NetBIOS Frames Control Protocol for the NetBIOS Frames protocol, protocol code number 0x803F, RFC 2097
- the IPv6 Control Protocol for IPv6, protocol code number 0x8057, RFC 5072
Looped link detection
Configuration options
The previous section introduced the use of LCP options to meet specific WAN connection requirements. PPP may include the following LCP options:- Authentication - Peer routers exchange authentication messages. Some authentication choices are Password Authentication Protocol, Challenge Handshake Authentication Protocol, and Extensible Authentication Protocol. Authentication is explained in the next section.
- Compression - Increases the effective throughput on PPP connections by reducing the amount of data in the frame that must travel across the link, using a agreed-on algorithm such as BSD compress or Deflate. The protocol decompresses the frame at its destination. In addition, there are compression settings for control packets and header fields. See for more details.
- Error detection - Identifies fault conditions. The Quality and Magic Number options help ensure a reliable, loop-free data link. The Magic Number field helps in detecting links that are in a looped-back condition. Until the Magic-Number Configuration Option has been successfully negotiated, the Magic-Number must be transmitted as zero. Magic numbers are generated randomly at each end of the connection.
- Multilink - Provides load balancing several interfaces used by PPP through Multilink PPP.
PPP frame
Structure
PPP frames are variants of HDLC frames:| Name | Number of bytes | Description |
| Flag | 1 | 0x7E, the beginning of a PPP frame |
| Address | 1 | 0xFF, standard broadcast address |
| Control | 1 | 0x03, unnumbered data |
| Protocol | 2 | PPP ID of embedded data |
| Information | variable | datagram |
| Padding | variable | optional padding |
| Frame Check Sequence | 2 | frame checksum |
| Flag | 1 | 0x7E, omitted for successive PPP packets |
If both peers agree to Address field and Control field compression during LCP, then those fields are omitted. Likewise if both peers agree to Protocol field compression, then the 0x00 byte can be omitted.
The Protocol field indicates the type of payload packet: 0xC021 for LCP, 0x80xy for various NCPs, 0x0021 for IP, 0x0029 AppleTalk, 0x002B for IPX, 0x003D for Multilink, 0x003F for NetBIOS, 0x00FD for MPPC and MPPE, etc. PPP is limited, and cannot contain general Layer 3 data, unlike Ether Type.
The Information field contains the PPP payload; it has a variable length with a negotiated maximum called the Maximum Transmission Unit. By default, the maximum is 1500 octets. It might be padded on transmission; if the information for a particular protocol can be padded, that protocol must allow information to be distinguished from padding.
Encapsulation
PPP frames are encapsulated in a lower-layer protocol that provides framing and may provide other functions such as a checksum to detect transmission errors. PPP on serial links is usually encapsulated in a framing similar to HDLC, described by IETF RFC 1662.| Name | Number of bytes | Description |
| Flag | 1 | indicates frame's begin or end |
| Address | 1 | broadcast address |
| Control | 1 | control byte |
| Protocol | 1 or 2 or 3 | l in information field |
| Information | variable | datagram |
| Padding | variable | optional padding |
| FCS | 2 | error check |
The Flag field is present when PPP with HDLC-like framing is used.
The Address and Control fields always have the value hex FF and hex 03, and can be omitted whenever PPP LCP Address-and-Control-Field-Compression is negotiated.
The frame check sequence field is used for determining whether an individual frame has an error. It contains a checksum computed over the frame to provide basic protection against errors in transmission. This is a CRC code similar to the one used for other layer two protocol error protection schemes such as the one used in Ethernet. According to RFC 1662, it can be either 16 bits or 32 bits in size.
The FCS is calculated over the Address, Control, Protocol, Information and Padding fields after the message has been encapsulated.