]> git.ozlabs.org Git - ppp.git/blob - pppd/pppd.8
699bccee927a9a608dd3ee8b7a5615fdf99527e3
[ppp.git] / pppd / pppd.8
1 .\" manual page [] for pppd 2.0
2 .\" $Id: pppd.8,v 1.1 1994/02/08 05:24:41 paulus Exp $
3 .\" SH section heading
4 .\" SS subsection heading
5 .\" LP paragraph
6 .\" IP indented paragraph
7 .\" TP hanging label
8 .TH PPPD 8
9 .SH NAME
10 pppd \- Point to Point Protocol daemon
11 .SH SYNOPSIS
12 .B pppd
13 [
14 .I options
15 ] [
16 .I tty_name
17 ] [
18 .I speed
19 ]
20 .SH DESCRIPTION
21 .LP
22 The Point-to-Point Protocol (PPP) provides a method for transmitting
23 datagrams over serial point-to-point links.  PPP
24 is composed of three parts: a method for encapsulating datagrams over
25 serial links, an extensible Link Control Protocol (LCP), and
26 a family of Network Control Protocols (NCP) for establishing
27 and configuring different network-layer protocols.
28 .LP
29 The encapsulation scheme is provided by driver code in the kernel.
30 .B pppd
31 provides the basic LCP, authentication support, and an
32 NCP for establishing and configuring the Internet Protocol (IP)
33 (called the IP Control Protocol, IPCP).
34 .SH FREQUENTLY USED OPTIONS
35 .TP
36 .I <tty_name>
37 Communicate over the named device.  The string "/dev/"
38 is prepended if necessary.  If no device name is given,
39 .I pppd
40 will use the controlling terminal, and will not fork to put itself in
41 the background.
42 .TP
43 .I <speed>
44 Set the baud rate to <speed>.  On systems such as 4.4BSD and NetBSD,
45 any speed can be specified.  Other systems (e.g. SunOS) allow only a
46 limited set of speeds.
47 .TP
48 .B asyncmap \fI<map>
49 Set the async character map to <map>.
50 This map describes which control characters cannot be successfully
51 received over the serial line.
52 .I pppd
53 will ask the peer to send these characters as a 2-byte "escape" sequence.
54 The argument is a 32 bit hex number
55 with each bit representing a character to escape. 
56 Bit 0 (00000001) represents the character 0x00;
57 bit 31 (80000000) represents the character 0x1f or ^_.
58 The default asyncmap is 0.  If multiple \fBasyncmap\fR options are
59 given, the values are ORed together.
60 .TP
61 .B auth
62 Require the peer to authenticate itself before allowing network
63 packets to be sent or received.
64 .TP
65 .B connect \fI<p>
66 Use the executable or shell command specified by <p> to set up the
67 serial line.  This script would typically use the "chat" program to
68 dial the modem and start the remote ppp session.
69 .TP
70 .B crtscts
71 Use hardware flow control (i.e. RTS/CTS) to control the flow of data on
72 the serial port.
73 .TP
74 .B defaultroute
75 Add a default route to the system routing tables, using the peer as
76 the gateway, when IPCP negotiation is successfully completed.
77 This entry is removed when the PPP connection is broken.
78 .TP
79 .B file \fI<f>
80 Read options from file <f> (the format is described below).
81 .TP
82 .B mru \fI<n>
83 Set the MRU [Maximum Receive Unit] value to <n> for negotiation.
84 .I pppd
85 will ask the peer to send packets of no more than <n> bytes.
86  The minimum MRU value is 128. 
87 The default MRU value is 1500.  A value of 296 is recommended for slow
88 links (40 bytes for TCP/IP header + 256 bytes of data).
89 .TP
90 .B netmask \fI<n>
91 Set the interface netmask to <n>, a 32 bit netmask in "decimal dot" notation
92 (e.g. 255.255.255.0).
93 .TP
94 .B passive
95 Enables the "passive" option in the LCP.  With this option,
96 .I pppd
97 will attempt to initiate a connection; if no reply is received from
98 the peer,
99 .I pppd
100 will then just wait passively for a valid LCP packet from the peer
101 (instead of exiting, as it does without this option).
102 .TP
103 .B silent
104 With this option,
105 .I pppd
106 will not transmit LCP packets to initiate a connection until a valid
107 LCP packet is received from the peer (as for the "passive" option with
108 old versions of \fIpppd\fR).
109 .SH OPTIONS
110 .TP
111 .I <local_IP_address>\fB:\fI<remote_IP_address>
112 Set the local and/or remote interface IP addresses.  Either one may be
113 omitted.  The IP addresses can be specified with a host name or in
114 "decimal dot" notation (e.g. "150.203.23.247").  The default local
115 address is the (first) IP address of the system.  The remote address
116 will be obtained from the peer if not specified in any option.  Thus,
117 in simple cases, this option is not required.
118 .TP
119 .B -all
120 Don't request or allow negotiation of any options for LCP and IPCP (use
121 default values).
122 .TP
123 .B -ac
124 Disable Address/Control compression negotiation (use default, i.e.
125 disabled).
126 .TP
127 .B -am
128 Disable asyncmap negotiation (use default, i.e. 0xffffffff).
129 .TP
130 .B -as \fI<n>
131 Same as
132 .B asyncmap \fI<n>
133 .TP
134 .B -d
135 Increase debugging level.
136 .TP
137 .B -detach
138 Don't fork to become a background process (otherwise
139 .I pppd
140 will do so if a serial device is specified).
141 .TP
142 .B -ip
143 Disable IP address negotiation (with this option, the remote IP
144 address must be specified with an option on the command line or in an
145 options file).
146 .TP
147 .B -mn
148 Disable magic number negotiation.  With this option,
149 .I pppd
150 cannot detect a looped-back line.
151 .TP
152 .B -mru
153 Disable MRU [Maximum Receive Unit] negotiation (use default, i.e. 1500).
154 .TP
155 .B -p
156 Same as the
157 .B passive
158 option.
159 .TP
160 .B -pc
161 Disable protocol field compression negotiation (use default, i.e. disabled).
162 .TP
163 .B +ua \fI<p>
164 Agree to authenticate using PAP [Password Authentication Protocol] if
165 requested by the peer, and
166 use the data in file <p> for the user and password to send to the
167 peer. The file contains the remote user name, followed by a newline,
168 followed by the remote password, followed by a newline.  This option
169 is obsolescent.
170 .TP
171 .B +pap
172 Require the peer to authenticate itself using PAP.
173 .TP
174 .B -pap
175 Don't agree to authenticate using PAP.
176 .TP
177 .B +chap
178 Require the peer to authenticate itself using CHAP [Cryptographic
179 Handshake Authentication Protocol] authentication.
180 .TP
181 .B -chap
182 Don't agree to authenticate using CHAP.
183 .TP
184 .B -vj
185 Disable negotiation of Van Jacobson style IP header compression (use
186 default, i.e. no compression).
187 .TP
188 .B debug
189 Increase debugging level (same as
190 .B -d
191 ).
192 .TP
193 .B domain \fI<d>
194 Append the domain name <d> to the local host name for authentication
195 purposes.  For example, if gethostname() returns the name porsche, but the
196 fully qualified domain name is porsche.Quotron.COM, you would use the
197 domain option to set the domain name to Quotron.COM.
198 .TP
199 .B modem
200 Use the modem control lines.  (This option is not fully implemented.)
201 .TP
202 .B local
203 Don't use the modem control lines.
204 .TP
205 .B name \fI<n>
206 Set the name of the local system for authentication purposes to <n>.
207 .TP
208 .B user \fI<u>
209 Set the user name to use for authenticating this machine with the peer
210 using PAP to <u>.
211 .TP
212 .B usehostname
213 Enforce the use of the hostname as the name of the local system for
214 authentication purposes (overrides the
215 .B name
216 option).
217 .TP
218 .B remotename \fI<n>
219 Set the assumed name of the remote system for authentication purposes
220 to <n>.
221 .TP
222 .B proxyarp
223 Add an entry to this system's ARP [Address Resolution Protocol] table
224 with the IP address of the peer and the Ethernet address of this
225 system.
226 .TP
227 .B login
228 Use the system password database for authenticating the peer using
229 PAP.
230 .TP
231 .B lcp-restart \fI<n>
232 Set the LCP restart interval (retransmission timeout) to <n> seconds
233 (default 3).
234 .TP
235 .B lcp-max-terminate \fI<n>
236 Set the maximum number of LCP terminate-request transmissions to <n>
237 (default 3).
238 .TP
239 .B lcp-max-configure \fI<n>
240 Set the maximum number of LCP configure-request transmissions to <n>
241 (default 10).
242 .TP
243 .B lcp-max-failure \fI<n>
244 Set the maximum number of LCP configure-NAKs returned before starting
245 to send configure-Rejects instead to <n> (default 10).
246 .TP
247 .B ipcp-restart \fI<n>
248 Set the IPCP restart interval (retransmission timeout) to <n> seconds
249 (default 3).
250 .TP
251 .B ipcp-max-terminate \fI<n>
252 Set the maximum number of IPCP terminate-request transmissions to <n>
253 (default 3).
254 .TP
255 .B ipcp-max-configure \fI<n>
256 Set the maximum number of IPCP configure-request transmissions to <n>
257 (default 10).
258 .TP
259 .B ipcp-max-failure \fI<n>
260 Set the maximum number of IPCP configure-NAKs returned before starting
261 to send configure-Rejects instead to <n> (default 10).
262 .TP
263 .B pap-restart \fI<n>
264 Set the PAP restart interval (retransmission timeout) to <n> seconds
265 (default 3).
266 .TP
267 .B pap-max-authreq \fI<n>
268 Set the maximum number of PAP authenticate-request transmissions to
269 <n> (default 10).
270 .TP
271 .B chap-restart \fI<n>
272 Set the CHAP restart interval (retransmission timeout for challenges)
273 to <n> seconds (default 3).
274 .TP
275 .B chap-max-challenge \fI<n>
276 Set the maximum number of CHAP challenge transmissions to <n> (default
277 10).
278 .TP
279 .B chap-interval \fI<n>
280 If this option is given,
281 .I pppd
282 will rechallenge the peer every <n> seconds.
283 .SH OPTIONS FILES
284 Options can be taken from files as well as the command line.  
285 .I pppd
286 reads options from the files /etc/ppp/options and $HOME/.ppprc before
287 looking at the command line.  An options file is parsed into a series
288 of words, delimited by whitespace.  Whitespace can be included in a
289 word by enclosing the word in quotes (").  A backslash (\\) quotes the
290 following character.  A hash (#) starts a comment, which continues
291 until the end of the line.
292 .SH AUTHENTICATION
293 .I pppd
294 provides system administrators with sufficient access control that PPP
295 access to a server machine can be provided to legitimate users without
296 fear of compromising the security of the server or the network it's
297 on.  In part this is provided by the /etc/ppp/options file, where the
298 administrator can place options to require authentication whenever
299 .I pppd
300 is run, and in part by the PAP and CHAP secrets files, where the
301 administrator can restrict the set of IP addresses which individual
302 users may use.
303 .LP
304 The default behaviour of
305 .I pppd
306 is to agree to authenticate if requested, and to not
307 require authentication from the peer.  However, 
308 .I pppd
309 will not agree to
310 authenticate itself with a particular protocol if it has no secrets
311 which could be used to do so.
312 .LP
313 Authentication is based on secrets, which are selected from secrets
314 files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP).
315 Both secrets files have the same format, and both can store secrets
316 for several combinations of server (authenticating peer) and client
317 (peer being authenticated).  Note that
318 .I pppd
319 can be both a server
320 and client, and that different protocols can be used in the two
321 directions if desired.
322 .LP
323 A secrets file is parsed into words as for a options file.  A secret
324 is specified by a line containing at least 3 words, in the order
325 client, server, secret.  Any following words on the same line are
326 taken to be a list of acceptable IP addresses for that client.  If
327 there are only 3 words on the line, it is assumed that any IP address
328 is OK; to disallow all IP addresses, use "-".  If the secret starts
329 with an `@', what follows is assumed to be the name of a file from
330 which to read the secret.  A "*" as the client or server name matches
331 any name.  When selecting a secret, \fIpppd\fR takes the best match, i.e.
332 the match with the fewest wildcards.
333 .LP
334 Thus a secrets file contains both secrets for use in authenticating
335 other hosts, plus secrets which we use for authenticating ourselves to
336 others.  Which secret to use is chosen based on the names of the host
337 (the `local name') and its peer (the `remote name').  The local name
338 is set as follows:
339 .TP 3
340 if the \fBusehostname\fR option is given,
341 then the local name is the hostname of this machine
342 (with the domain appended, if given)
343 .TP 3
344 else if the \fBname\fR option is given,
345 then use the argument of the first \fBname\fR option seen
346 .TP 3
347 else if the local IP address is specified with a hostname,
348 then use that name
349 .TP 3
350 else use the hostname of this machine (with the domain appended, if given)
351 .LP
352 When authenticating ourselves using PAP, there is also a `username'
353 which is the local name by default, but can be set with the \fBuser\fR
354 option or the \fB+ua\fR option.
355 .LP
356 The remote name is set as follows:
357 .TP 3
358 if the \fBremotename\fR option is given,
359 then use the argument of the last \fBremotename\fR option seen
360 .TP 3
361 else if the remote IP address is specified with a hostname,
362 then use that host name
363 .TP 3
364 else the remote name is the null string "".
365 .LP
366 Secrets are selected from the PAP secrets file as follows:
367 .TP 2
368 *
369 For authenticating the peer, look for a secret with client ==
370 username specified in the PAP authenticate-request, and server ==
371 local name.
372 .TP 2
373 *
374 For authenticating ourselves to the peer, look for a secret with
375 client == our username, server == remote name.
376 .LP
377 When authenticating the peer with PAP, a secret of "" matches any
378 password supplied by the peer.  If the password doesn't match the
379 secret, the password is encrypted using crypt() and checked against
380 the secret again; thus secrets for authenticating the peer can be
381 stored in encrypted form.  If the \fBlogin\fR option was specified, the
382 username and password are also checked against the system password
383 database.  Thus, the system administrator can set up the pap-secrets
384 file to allow PPP access only to certain users, and to restrict the
385 set of IP addresses that each user can use.
386 .LP
387 Secrets are selected from the CHAP secrets file as follows:
388 .TP 2
389 *
390 For authenticating the peer, look for a secret with client == name
391 specified in the CHAP-Response message, and server == local name.
392 .TP 2
393 *
394 For authenticating ourselves to the peer, look for a secret with
395 client == local name, and server == name specified in the
396 CHAP-Challenge message.
397 .LP
398 Authentication must be satisfactorily completed before IPCP (or any
399 other Network Control Protocol) can be started.  If authentication
400 fails, \fIpppd\fR will terminated the link (by closing LCP).  If IPCP
401 negotiates an unacceptable IP address for the remote host, IPCP will
402 be closed.  IP packets can only be sent or received when IPCP is open.
403 .SH ROUTING
404 .LP
405 When IPCP negotiation is completed successfully,
406 .I pppd
407 will inform the kernel of the local and remote IP addresses for the
408 ppp interface.  This is sufficient to create a
409 host route to the remote end of the link, which will enable the peers
410 to exchange IP packets.  Communication with other machines generally
411 requires further modification to routing tables and/or ARP (Address
412 Resolution Protocol) tables.  In some cases this will be done
413 automatically through the actions of the \fIrouted\fR or \fIgated\fR
414 daemons, but in most cases some further intervention is required.
415 .LP
416 Sometimes it is desirable
417 to add a default route through the remote host, as in the case of a
418 machine whose only connection to the Internet is through the ppp
419 interface.  The \fBdefaultroute\fR option causes \fIpppd\fR to create such a
420 default route when IPCP comes up, and delete it when the link is
421 terminated.
422 .LP
423 In some cases it is desirable to use proxy ARP, for example on a
424 server machine connected to a LAN, in order to allow other hosts to
425 communicate with the remote host.  The \fBproxyarp\fR option causes \fIpppd\fR
426 to look for a network interface on the same subnet as the remote host
427 (an interface supporting broadcast and ARP, which is up and not a
428 point-to-point or loopback interface).  If found, \fIpppd\fR creates a
429 permanent, published ARP entry with the IP address of the remote host
430 and the hardware address of the network interface found.
431 .SH EXAMPLES
432 .LP
433 In the simplest case, you can connect the serial ports of two machines
434 and issue a command like
435 .IP
436 pppd /dev/ttya 9600 passive
437 .LP
438 to each machine, assuming there is no \fIgetty\fR running on the
439 serial ports.  If one machine has a \fIgetty\fR running, you can use
440 \fIkermit\fR or \fItip\fR on the other machine to log in to the first
441 machine and issue a command like
442 .IP
443 pppd passive
444 .LP
445 Then exit from the communications program (making sure the connection
446 isn't dropped), and issue a command like
447 .IP
448 pppd /dev/ttya 9600
449 .LP
450 The process of logging in to the other machine and starting \fIpppd\fR
451 can be automated by using the \fBconnect\fR option to run \fIchat\fR,
452 for example:
453 .IP
454 pppd /dev/ttya 38400 connect 'chat "" "" "login:" "username"
455 "Password:" "password" "% " "exec pppd passive"'
456 .LP
457 If your serial connection is any more complicated than a piece of
458 wire, you may need to arrange for some control characters to be
459 escaped.  In particular, it is often useful to escape XON (^Q) and
460 XOFF (^S), using \fBasyncmap a0000\fR.  If the path includes a telnet,
461 you probably should escape ^] as well (\fBasyncmap 200a0000\fR).
462 Don't use an rlogin in the path - many implementations are not
463 transparent; they will remove the sequence [0xff, 0xff, 0x73, 0x73,
464 followed by any 8 bytes] from the stream.
465 .SH DIAGNOSTICS
466 .LP
467 Messages are sent to the syslog daemon using facility
468 LOG_DAEMON unless
469 .I pppd
470 has been compiled with debugging code.  In this case the logging
471 facility used will be LOG_LOCAL2 in order to allow separation of the debug
472 output from the other daemons using the  LOG_DAEMON facility.  You can
473 override this by defining the macro LOG_PPP to the desired facility
474 and recompiling.  In order to see the error and debug messages, you
475 will need to edit your /etc/syslog.conf file to direct the messages to
476 the desired output device or file.
477 .LP
478 If enabled at compile time, debugging printout can be enabled by
479 setting the -d or debug flag on the command line, or by sending a
480 SIGUSR1 to the
481 .I pppd
482 process.
483 Debugging may be disabled by sending a SIGUSR2 to the
484 .I pppd
485 process.
486 .SH FILES
487 .TP
488 .B /var/run/ppp\fIn\fB.pid \fR(BSD), \fB/etc/ppp/ppp\fIn\fB.pid \fR(SunOS)
489 Process-ID for \fIpppd\fR process on ppp interface unit \fIn\fR.
490 .TP
491 .B /etc/ppp/pap-secrets
492 Usernames, passwords and IP addresses for PAP authentication.
493 .TP
494 .B /etc/ppp/chap-secrets
495 Names, secrets and IP addresses for CHAP authentication.
496 .TP
497 .B /etc/ppp/options
498 System default options for
499 .I pppd,
500 read before user default options or command-line options.
501 .TP
502 .B $HOME/.ppprc
503 User default options, read before command-line options.
504 .SH SEE ALSO
505 .TP
506 .B RFC1144
507 Jacobson, V.
508 .I Compressing TCP/IP headers for low-speed serial links.
509 1990 February.
510 .TP
511 .B RFC1321
512 Rivest, R.
513 .I The MD5 Message-Digest Algorithm.
514 1992 April.
515 .TP
516 .B RFC1331
517 Simpson, W.A.
518 .I Point\-to\-Point Protocol (PPP) for the transmission of multi\-protocol
519 .I datagrams over point\-to\-point links.
520 1992 May.
521 .TP
522 .B RFC1332
523 McGregor, G.
524 .I PPP Internet Protocol Control Protocol (IPCP).
525 1992 May.
526 .TP
527 .B RFC1334
528 Lloyd, B.; Simpson, W.A.
529 .I PPP authentication protocols.
530 1992 October.
531 .SH NOTES
532 The following signals have the specified effect when sent to the
533 .I pppd
534 process.
535 .TP
536 .B SIGINT, SIGTERM
537 These signals cause \fIpppd\fR to terminate the link (by closing LCP),
538 restore the serial device settings, and exit.
539 .TP
540 .B SIGHUP
541 Indicates that the physical layer has been disconnected.  \fIpppd\fR
542 will attempt to restore the serial device settings (this may produce
543 error messages on Suns), and then exit.
544 .SH BUGS
545 The use of the modem control lines and the effects of the \fBmodem\fR
546 and \fBlocal\fR options are not well defined.
547 .SH AUTHORS
548 Drew Perkins,
549 Brad Clements,
550 Karl Fox,
551 Greg Christy,
552 Brad Parker (brad@fcr.com),
553 Paul Mackerras (paulus@cs.anu.edu.au)