1 \input texinfo @c -*-texinfo-*-
12 * PPP: (ppp). Point-to-Point Protocol.
18 @author by Paul Mackerras
21 @node Top, Introduction, (dir), (dir)
24 This file documents the ppp-2.x package for setting up network links
25 over serial lines using the Point-to-Point Protocol.
30 * Introduction:: What PPP is and what you can use it for.
31 * Installation:: How to compile and install the software.
32 * Configuration:: How to set up your system for
33 establishing a link to another system.
34 * Security:: Potential dangers and how to avoid them.
38 @node Introduction, Installation, Top, Top
41 The Point-to-Point Protocol (PPP) is the protocol of choice for
42 establishing network links over serial lines. This package (ppp-2.x)
43 provides an implementation of PPP which supports the Internet Protocols
44 (TCP/IP, UDP/IP, etc.) and which runs on a range of Unix
47 As an example, an otherwise isolated system could connect to another
48 system via a modem using PPP. Suppose that the second system was
49 connected to the Internet. When the PPP link is established, the first
50 system is then also connected to the Internet. It can establish
51 connections with any other Internet host. Users can then use
52 a wide range of network-based applications on the first system, such as
53 telnet, ftp, rlogin, email, Mosaic, sup, and X clients and servers.
55 Features of PPP include:
58 Multi-protocol support. The PPP packet encapsulation includes a
59 protocol field, allowing packets from many different protocols to be
60 multiplexed across a single link.
62 Negotiation of link characteristics. During link establishment, the two
63 systems negotiate about the link configuration parameters, such as the
64 IP addresses of each end of the link.
66 Authentication. Optionally, each system can be configured to require the
67 other system to authenticate itself. In this way, access can be
68 restricted to authorized systems.
70 Transparency. On asynchronous serial lines, PPP can be configured to
71 transmit certain characters as a two-character escape sequence.
73 Compression. PPP includes support for various kinds of compression to
74 be applied to the packets before they are transmitted.
77 This software consists of two parts:
82 Kernel code, which establishes a network interface and passes
83 packets between the serial port, the kernel networking code and the
84 PPP daemon (pppd). This code is implemented using STREAMS modules on
85 SunOS 4.x, AIX 4.1 and OSF/1, and as a line discipline under Ultrix,
86 NextStep, NetBSD, FreeBSD, and Linux.
89 The PPP daemon (@code{pppd}), which negotiates with the peer to establish
90 the link and sets up the ppp network interface. Pppd includes support
91 for authentication, so you can control which other systems may make a
92 PPP connection and what IP addresses they may use.
99 @node PPP Concepts, , Introduction, Introduction
100 @section PPP Concepts
102 Establishing a PPP link involves communication between two systems. The
103 two systems are called ``peers''. When we are talking from the point of
104 view of one of the systems, the other is often referred to as ``the
105 peer''. Although we may sometimes refer to one system as a ``client''
106 and the other as a ``server'', this distinction is not made in the PPP
109 PPP requires the use of a communications medium which transmits 8 bits
110 per character. Typically this is a serial line, perhaps including
111 modems and telephone lines, but other media can be used (even a telnet
112 session). The medium must be full duplex---capable of transmitting
113 characters independently in both directions. Note that PPP cannot work
114 over a serial link which transmits only 7 bits per character.
116 PPP has a mechanism to avoid sending certain characters if it is known
117 that the medium interprets them specially. For example, the DC1 and DC3
118 ASCII characters (control-Q and control-S) may be trapped by a modem if
119 it is set for ``software'' flow control. PPP can send these characters
120 as a two-character ``escape'' sequence. The set of characters which are
121 to be transmitted as an escape sequence is represented in an ``async
122 control character map'' (ACCM). The ``async'' part refers to the fact
123 that this facility is used for asynchronous serial lines. For
124 synchronous serial connections, the HDLC bit-stuffing procedure is used
127 During the lifetime of a PPP link, it proceeds through several phases:
131 Communications establishment. In this phase, the underlying
132 communications medium is prepared for use. This may involve sending
133 commands to a modem to cause it to dial the remote system. When the
134 remote system answers, there may be a dialog involving a username and
135 password. Or, in the case of two systems connected directly by a cable,
136 there may be nothing to do.
139 Link Control Protocol (LCP) negotiation. In this phase, the peers send
140 LCP packets to each other to negotiate various parameters of the
141 link, such as the ACCM to be used in each direction, whether
142 authentication is required, and whether or not to use various forms of
143 compression. When the peers reach agreement on these parameters, LCP is
147 Authentication. If one (or both) of the peers requires the other
148 peer to authenticate itself, that occurs next. If one of the peers
149 cannot successfully authenticate itself, the other peer terminates the
153 Network Control Protocol (NP) negotiation. PPP can potentially support
154 several different network protocols, although IP is the only network
155 protocol (NP) supported by the ppp-2.x package. Each NP has an
156 associated Network Control Protocol defined for it, which is used to
157 negotiate the specific parameters which affect that NP. For example,
158 the IP Control Protocol (IPCP) is used to negotiate the IP addresses for
159 each end of the link, and whether the TCP header compression method
160 described by Van Jacobsen in RFC 1144 is to be used.
163 Network communication. When each NCP has successfully negotiated the
164 parameters for its NP, that NCP is said to be ``up''. At that point,
165 the PPP link is made available for data traffic from that NP. For
166 example, when IPCP comes up, the PPP link is then available for carrying
167 IP packets (which of course includes packets from those protocols which
168 sit above IP, such as TCP, UDP, etc.)
171 Termination. When the link is no longer required, it is terminated.
172 Usually this involves an exchange of LCP packets so that one peer can
173 notify the other that it is shutting down the link, enabling both peers
174 to shut down in an orderly manner. But of course there are occasions
175 when the link terminates because the underlying communications medium is
176 interrupted, for example when the modem loses carrier and hangs up.
180 PPP is defined in several RFC (Request For Comments) documents, in
181 particular RFCs 1661, 1662, and 1334. IPCP is defined in RFC 1332.
182 Other RFCs describe the control protocols for other network protocols
183 (e.g., DECnet, OSI, Appletalk).
185 @node Installation, Configuration, Introduction, Top
186 @chapter Installation
188 Because ppp-2.x includes code which must be incorporated into the
189 kernel, its installation process is necessarily quite heavily
190 system-dependent. In addition, you will require super-user privileges
191 (root access) to install the code.
193 Some systems provide a ``modload'' facility, which
194 allows you to load new code into a running kernel without relinking the
195 kernel or rebooting. Under SunOS 4.x, AIX 4.1, OSF/1 and NextStep, this
196 is the recommended (or only) way to install the kernel portion of the
199 Under the remaining supported operating systems
200 (NetBSD, FreeBSD, Ultrix, Linux), it is necessary to go through the
201 process of creating a new kernel image and reboot. (Note that NetBSD
202 and FreeBSD have a modload facility, but ppp-2.x is currently not
203 configured to take advantage of it.)
205 @node Configuration, Security, Installation, Top
206 @chapter Configuration
208 @node Security, Compression, Configuration, Top
211 @node Compression, , Security, Top