Like SLIP, PPP is a means for encapsulating packets from other protocols and transmitting them across a serial (or other point-to-point) link. Unlike SLIP, PPP provides a wide range of features that improve on the simple process of just sending data packets across the wire. PPP is documented in RFC 1662, "The Point-to-Point Protocol (PPP)." The pertinent features that PPP offers are listed here:
For more information about PPP, extensions, and other specific details, many RFCs are available for you to examine. Table 14.1 lists several RFCs that might be relevant to your situation. Tip In Table 14.1 some of the RFCs listed are now standards, whereas others are proposed standards. Yet hardware vendors tend not to wait for a standard to become final before adopting the technology. For more information about RFCs, visit the Web site www.rfc-editor.org.
PPP negotiates a link with a remote system, tests the link, sets up different protocol connections, and then sends your data from one computer to another. Because PPP is used across a point-to-point link instead of a packet-switched network, it can be assumed that packets arrive at the destination in the same order in which they are transmitted. PPP also allows for sending more than one protocol packet type across the same link by multiplexing the various protocols. It also supports full-duplex communications (communications in both directions) on the same link. Additionally, PPP doesn't just use a special character to indicate the end of a packet (like SLIP does), but instead uses a frame header so that the data packet being transported across the link is fully encapsulated inside the PPP frame. Figure 14.1 shows the basic layout of a PPP frame.
The fields in Figure 14.1 are used in this way:
The payload section of the PPP frame carries the packet of another protocol, as indicated by the Protocol ID field. The standard maximum length of a PPP frame, called the maximum receive unit (MRU), is defined in the standard as 1,500 bytes in length (which can accommodate a standard IP packet). However, this value can be increased or decreased during the original link negotiations. Establishing a Link: The Link Control Protocol (LCP)The process in which a PPP link is established is an orderly process. Each end of the connection first sends LCP frames that are used to test the data link and to configure the parameters that will be used on the link. Next, NCP packets are sent to configure any required options for the protocol(s) that will be encapsulated and sent across the link. After this, the data exchange can begin. When the link is no longer needed, LCP or NCP packets can be used to close the link. Alternatively, an external event, such as a timer, can be used to close an idle link. If you've ever been disconnected from a dial-up link to an ISP, you understand this process! Figure 14.2 shows an example of the phases that a PPP link goes through for establishing and terminating a link. Figure 14.2. The PPP link must be established before data transfer occurs and terminated when communications are finished.
The steps here are simple:
LCP is used by both ends of the connection to negotiate the encapsulation options and packet size and then to terminate the link. Each side of the link sends information to the other about the configuration options it supports and which ones it wants to use. A large number of packet types are used by the LCP process to establish, manage, and tear down a link. They can be grouped into three general categories:
An LCP packet can be identified by examining the Protocol ID field of the PPP frame. LCP packets use the protocol ID value of 0xC021. The rest of the LCP frame structure consists of a code that identifies the type of LCP message (one byte) and an identifier field (one byte) that is used to match up requests with replies during the exchange of LCP packets. A length field (2 bytes) is then used to indicate the size of the LCP packet. This is followed by the actual data used for the particular LCP message. The LCP packet rides in the payload section of the PPP frame just like any other protocol. LCP operates in a request/reply mode in which the LCP Configure-Request packet is first sent to open a link, and contains a list of options that the sender wants to use if they differ from the default values for the option. The Configure-Ack packet type is used for acknowledging that all the received options are acceptable to the other end of the connection. The Configure-Nack message is used by the receiving end to indicate that it recognizes all the options that were sent, but is rejecting the configuration as a whole because one or more of the option values cannot be used on its side of the connection. This packet also contains a list of the options that are causing the negative acknowledgment along with values it would find okay to use. The Configure-Reject message is similar to the Configure-Nack but is used when some of the options are not recognized by the receiver or are nonnegotiable. Again, a list of these unrecognized or rejected options is returned in this rejection packet so that the sender can determine what the receiving end is trying to negotiate. After receiving a Configure-Nack or Configure-Reject message, the sender can send additional Configure-Request packets, changing the values of options so that both sides can come to an agreement. Note that because this is a bidirectional communications path, the options negotiated for traffic going in one direction don't have to match the options used for traffic going in the opposite direction. Each side sends a Configure-Request to the other side to establish the options it is allowed to use to configure the link for sending to the other side. After all options in a Configure-Request packet are acceptable to the receiving end, it sends the Configure-Ack message and the link setup is complete. After the link has been established using LCP, NCP packets are used to configure protocol-specific options that will be used on the PPP link. During the time that the link is maintained, LCP uses maintenance packets for routine procedures to be sure that the link is still up and performing as it should. For example, the Echo-Request packet can be sent to determine whether the link is still operational after some time has passed with no transmissions. The Echo-Reply packet is returned in response to keep the link open. Other maintenance LCP packets are used to indicate that the protocol the sender wants to negotiate is not supported by the receiver or that the LCP code is not understood by the receiver. When either side of the connection wants to tear down the link, the Terminate-Request LCP packet is transmitted. The proper response is a Terminate-Ack packet. For a complete listing of LCP packets and their particular formats, see the RFCs listed in Table 15.1. Network Control Protocols (NCPs)The most popular protocol stack used with PPP today is TCP/IP. Millions of people each day use TCP/IP to connect to the public Internet. PPP is used to encapsulate the data and pass it to the next point, which allows for the use of multiple NCPs that further configure the protocols that are carried across the PPP link. For example, in the case of IP, the dial-in client must be provided with IP addressing information, which usually is done by a DHCP server. The Internet Protocol Control Protocol (IPCP) is the NCP used to configure parameters for using the PPP link for transmitting IP packets. The Internetwork Packet Exchange Control Protocol (IPXCP) is used to set up IPX. Other protocols for which there are NCPs include AppleTalk, DECnet Phase IV (oh, the good old days!), and NetBIOS, among others. The important thing to remember is that the PPP link parameters are negotiated before any actual network protocols are configured or are able to use the link. After the link is established, one or more NCPs use the link to configure the parameters for the protocol that will be carried in the payload section of PPP frames that use the link. |