The Point-to-Point Protocol (PPP)


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:

  • High-Level Data Link Control (HDLC) You can use PPP not only for IP, but for a wide range of other protocols as well. PPP bases its frame format on the High-Level Data Link Control protocol, which is a standard method used for point-to-point connections.

  • Link Control Protocol (LCP) This is an extensible protocol used to establish, configure, and test the data-link connection. Both sides of the link negotiate with the other side parameters that will be used for the connection, such as the maximum packet size.

  • Network Control Protocols (NCPs) NCPs allow for different configuration options, depending on the protocol type of the packets being transported across the PPP link. NCPs enable specific network protocol sessions to be negotiated and set up after the link is established. Even better, PPP allows for multiplexing several different protocols on the same link.

For more information about PPP, extensions, and other specific details, many RFCs are available for you to examine. Table 15.1 lists several RFCs that might be relevant to your situation.

Tip

In Table 15.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.

Table 15.1. RFCs Related to PPP

RFC Number

Title

1662

PPP in HDLC-like Framing

1552

The PPP Internetwork Packet Exchange Control Protocol (IPXCP)

1334

PPP Authentication Protocols

3241

Updates RFC 1332

2615

PPP Over SONET/SDH

2878

PPP Bridging Control Protocol (BCP)

1332

The PPP Internet Protocol Control Protocol (IPCP)

1661

Link Control Protocol (LCP)

1990

PPP Multilink Protocol

2484

PPP LCP Internationalization Configuration Option

2125

The PPP Bandwidth Allocation Protocol (BAP), the PPP Bandwidth Allocation Control Protocol (BACP)

2097

The PPP NetBIOS Frames Control Protocol (NBFCP)

1962

The PPP Compression Control Protocol (CCP)

1570

PPP LCP Extensions

2284

PPP Extensible Authentication Protocol (EAP)

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 15.1 shows the basic layout of a PPP frame.

Figure 15.1. The PPP frame consists of a simple header, the packet being transmitted as payload, and an error-detection field at the end of the frame.

graphics/15fig01.gif

The fields in Figure 15.1 are used in this way:

  • Flag This is used to indicate the start of a frame, and it consists of the binary value 01111110.

  • Address This field always contains a string of eight 1s, which is interpreted as a broadcast address by many protocols. Because PPP is a point-to-point link, no addressing is required.

  • Control This always contains the binary value 00000011. It is used in HDLC to indicate that this is an unsequenced information (UI) frame. PPP provides a connectionless service.

  • Protocol ID This 2-byte field is used to identify the protocol that is being transmitted inside the payload section of the PPP frame. Protocol ID numbers are assigned by Internet Corporation for Assigned Names and Numbers (ICANN). You can visit its Web site to learn more about protocol number assignment at www.icann.org.

  • Frame Check Sequence (FCS) This field can vary from 2 to 4 bytes in length, depending on the implementation. This provides the capability to store a 16- to 32-bit checksum calculation to ensure the integrity of the frame. This value is calculated by the sender based on the contents of the entire frame. The receiving end of the frame performs the same calculation. If the value does not match that stored in the FCS field, the packet is discarded.

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 15.2 shows an example of the phases that a PPP link goes through for establishing and terminating a link.

Figure 15.2. The PPP link must be established before data transfer occurs, and terminated when communications are finished.

graphics/15fig02.gif

The steps here are simple:

  1. In the beginning, the link is "dead." No communications exist between the two nodes. This is also where you end up when the link is closed.

  2. When some event (such as a modem dialing into a remote access server) occurs, LCP takes over to negotiate the link. When this task has finished successfully, the PPP link is in the Establish phase. The link is then Up. If the two endpoints of the communication cannot agree on a link, the attempt fails and, as you can see in the diagram, the PPP link is considered again to be in the Dead state.

  3. If LCP is able to exchange configuration packets that both sides can agree on, the link is in the Opened state and, if required by the link, an Authenticate state must be reached. This can be done using various methods , which are specified during the link establishment phase. If the authentication method fails, the link proceeds to the Closing state. If it succeeds, or if no authentication is required, then the Network phase is reached.

  4. During the Network phase, NCP is used to configure one or more network protocols that will use the link. Remember that PPP can multiplex several protocols across the same link. After this is done, communication takes place using the protocols that are configured. Note that any network protocol can terminate its usage of the link at any time without causing the termination of the actual PPP link.

  5. A link can be terminated due to an external event, such as the loss of the carrier signal or because of excessive noise on the line. However, an orderly termination can be done through the exchange of LCP packets. PPP is then considered to be in the Closing state. During the Closing state, PPP signals the network-layer protocols that are using the link so that they can gracefully close their connections.

  6. PPP proceeds to the Terminate state, the link is then considered to be Down, and you end up back at the beginning of the model shown in the diagram, where it all started. The PPP link is dead.

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:

  • Link establishment frames These frames are used to set up a link and configure the parameters to be used for the link.

  • Link termination frames These frames are used to perform an orderly shutdown of the link.

  • Link maintenance frames These frames are used to manage the link and for debugging purposes.

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 used with PPP today is probably IP, because millions of people each day use PPP to dial in to the Internet. However, PPP 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.



Upgrading and Repairing Networks
Upgrading and Repairing Networks (5th Edition)
ISBN: 078973530X
EAN: 2147483647
Year: 2003
Pages: 434

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net