TCP/IP Explained

RFC 1334 defines two authentication protocols for use in a PPP environment, namely the Password Authentication Protocol (PAP), and the Challenge Handshake Authentication Protocol (CHAP). However, while these protocols are the most common in a PPP environment, due to the nature of PPP, other proprietary protocols (beyond the scope of this book) could also be used.
The Password Authentication Protocol is a simple method by which a peer can learn the identity of its partner. The actual process takes place only after the initial Link Establishment phase has been completed, and takes the form of a two-way handshake. Essentially, after completion of the Link Establishment phase, the peer continually sends an Identification/Password pair until they are either acknowledged or the link is terminated.
As we saw in section 22.3.4, authentication is requested through a LCP option. For PAP the Type field contains a value of 3, the Length field 4, and the 16 bit Authentication Protocol field the value C023 16. The Data field is then unused. The PAP then travels in a PPP packet with a Protocol field value of C023 16. The general format of a PAP packet is shown in Figure 22-28.

The Code field can contain the values 1, 2, or 3 indicating an Authenticate Request, Positive Acknowledgement (Ack), or Negative Acknowledgement (Nak) respectively. The Identifier field is a unique...