]> git.ozlabs.org Git - ppp.git/blob - pppd/pppd.8
priv option stuff; add option_error proto
[ppp.git] / pppd / pppd.8
1 .\" manual page [] for pppd 2.3
2 .\" $Id: pppd.8,v 1.21 1996/08/28 06:41:53 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 tty_name
15 ] [
16 .I speed
17 ] [
18 .I options
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 Pppd provides the basic LCP, authentication support, and an NCP for
31 establishing and configuring the Internet Protocol (IP) (called the IP
32 Control Protocol, IPCP).
33 .SH FREQUENTLY USED OPTIONS
34 .TP
35 .I <tty_name>
36 Communicate over the named device.  The string "/dev/" is prepended if
37 necessary.  If no device name is given, or if the name of the terminal
38 connected to the standard input is given, pppd
39 will use that terminal, and will not fork to put itself in the
40 background.  This option is privileged if the \fInoauth\fR option is
41 used.
42 .TP
43 .I <speed>
44 Set the baud rate to <speed> (a decimal number).  On systems such as
45 4.4BSD and NetBSD, any speed can be specified.  Other systems
46 (e.g. SunOS) allow only a limited set of speeds.
47 .TP
48 .B asyncmap \fI<map>
49 Set the async character map to <map>.  This map describes which
50 control characters cannot be successfully received over the serial
51 line.  Pppd will ask the peer to send these characters as a 2-byte
52 escape sequence.  The argument is a 32 bit hex number with each bit
53 representing a character to escape.  Bit 0 (00000001) represents the
54 character 0x00; bit 31 (80000000) represents the character 0x1f or ^_.
55 If multiple \fIasyncmap\fR options are given, the values are ORed
56 together.  If no \fIasyncmap\fR option is given, no async character
57 map will be negotiated for the receive direction; the peer should then
58 escape \fIall\fR control characters.  To escape transmitted
59 characters, use the \fIescape\fR option.
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 call \fIname
66 Read options from the file /etc/ppp/peers/\fIname\fR.  This file may
67 contain privileged options, such as \fInoauth\fR, even if pppd
68 is not being run by root.  The \fIname\fR string may not begin with /
69 or include .. as a pathname component.
70 .TP
71 .B connect \fIscript
72 Use the executable or shell command specified by \fIscript\fR to set
73 up the serial line.  This script would typically use the chat(8)
74 program to dial the modem and start the remote ppp session.  This
75 option is privileged if the \fInoauth\fR option is used.
76 .TP
77 .B crtscts
78 Use hardware flow control (i.e. RTS/CTS) to control the flow of data
79 on the serial port.  If neither the \fIcrtscts\fR nor the
80 \fI\nocrtscts\fR option is given, the hardware flow control setting
81 for the serial port is left unchanged.
82 .TP
83 .B defaultroute
84 Add a default route to the system routing tables, using the peer as
85 the gateway, when IPCP negotiation is successfully completed.
86 This entry is removed when the PPP connection is broken.  This option
87 is privileged if the \fInodefaultroute\fR option has been specified.
88 .TP
89 .B disconnect \fIscript
90 Run the executable or shell command specified by \fIscript\fR after
91 pppd has terminated the link.  This script could, for example, issue
92 commands to the modem to cause it to hang up if hardware modem control
93 signals were not available.  The disconnect script is not run if the
94 modem has already hung up.  This option is privileged if the
95 \fInoauth\fR option is used.
96 .TP
97 .B escape \fIxx,yy,...
98 Specifies that certain characters should be escaped on transmission
99 (regardless of whether the peer requests them to be escaped with its
100 async control character map).  The characters to be escaped are
101 specified as a list of hex numbers separated by commas.  Note that
102 almost any character can be specified for the \fIescape\fR option,
103 unlike the \fIasyncmap\fR option which only allows control characters
104 to be specified.  The characters which may not be escaped are those
105 with hex values 0x20 - 0x3f or 0x5e.
106 .TP
107 .B file \fIname
108 Read options from file \fIname\fR (the format is described below).
109 The file must be readable by the user who has invoked pppd.
110 .TP
111 .B lock
112 Specifies that pppd should create a UUCP-style lock file for the
113 serial device to ensure exclusive access to the device.
114 .TP
115 .B mru \fIn
116 Set the MRU [Maximum Receive Unit] value to \fIn\fR. Pppd
117 will ask the peer to send packets of no more than \fIn\fR bytes.  The
118 minimum MRU value is 128.  The default MRU value is 1500.  A value of
119 296 is recommended for slow links (40 bytes for TCP/IP header + 256
120 bytes of data).
121 .TP
122 .B mtu \fIn
123 Set the MTU [Maximum Transmit Unit] value to \fIn\fR.  Unless the
124 peer requests a smaller value via MRU negotiation, pppd will
125 request that the kernel networking code send data packets of no more
126 than \fIn\fR bytes through the PPP network interface. 
127 .TP
128 .B passive
129 Enables the "passive" option in the LCP.  With this option, pppd will
130 attempt to initiate a connection; if no reply is received from the
131 peer, pppd will then just wait passively for a valid LCP packet from
132 the peer, instead of exiting, as it would without this option.
133 .SH OPTIONS
134 .TP
135 .I <local_IP_address>\fB:\fI<remote_IP_address>
136 Set the local and/or remote interface IP addresses.  Either one may be
137 omitted.  The IP addresses can be specified with a host name or in
138 decimal dot notation (e.g. 150.234.56.78).  The default local
139 address is the (first) IP address of the system (unless the
140 \fInoipdefault\fR
141 option is given).  The remote address will be obtained from the peer
142 if not specified in any option.  Thus, in simple cases, this option is
143 not required.  If a local and/or remote IP address is specified with
144 this option, pppd
145 will not accept a different value from the peer in the IPCP
146 negotiation, unless the \fIipcp-accept-local\fR and/or
147 \fIipcp-accept-remote\fR options are given, respectively.
148 .TP
149 .B bsdcomp \fInr,nt
150 Request that the peer compress packets that it sends, using the
151 BSD-Compress scheme, with a maximum code size of \fInr\fR bits, and
152 agree to compress packets sent to the peer with a maximum code size of
153 \fInt\fR bits.  If \fInt\fR is not specified, it defaults to the value
154 given for \fInr\fR.  Values in the range 9 to 15 may be used for
155 \fInr\fR and \fInt\fR; larger values give better compression but
156 consume more kernel memory for compression dictionaries.
157 Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables
158 compression in the corresponding direction.
159 .TP
160 .B chap-interval \fIn
161 If this option is given, pppd will rechallenge the peer every \fIn\fR
162 seconds.
163 .TP
164 .B chap-max-challenge \fIn
165 Set the maximum number of CHAP challenge transmissions to \fIn\fR
166 (default 10).
167 .TP
168 .B chap-restart \fIn
169 Set the CHAP restart interval (retransmission timeout for challenges)
170 to \fIn\fR seconds (default 3).
171 .TP
172 .B debug
173 Increase debugging level.
174 If this option is given, pppd will log the contents of all
175 control packets sent or received in a readable form.  The packets are
176 logged through syslog with facility \fIdaemon\fR and level
177 \fIdebug\fR.  This information can be directed to a file by setting up
178 /etc/syslog.conf appropriately (see syslog.conf(5)).
179 .TP
180 .B default-asyncmap
181 Disable asyncmap negotiation, forcing all control characters to be
182 escaped for both the transmit and the receive direction.
183 .TP
184 .B default-mru
185 Disable MRU [Maximum Receive Unit] negotiation.  With this option,
186 pppd will use the default MRU value of 1500 bytes for both the
187 transmit and receive direction.
188 .TP
189 .B deflate \fInr,nt
190 Request that the peer compress packets that it sends, using the
191 Deflate scheme, with a maximum window size of \fI2**nr\fR bytes, and
192 agree to compress packets sent to the peer with a maximum window size
193 of \fI2**nt\fR bytes.  If \fInt\fR is not specified, it defaults to
194 the value given for \fInr\fR.  Values in the range 8 to 15 may be used
195 for \fInr\fR and \fInt\fR; larger values give better compression but
196 consume more kernel memory for compression dictionaries.
197 Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables
198 compression in the corresponding direction.  (Note: pppd requests
199 Deflate compression in preference to BSD-Compress if the peer can do
200 either.)
201 .TP
202 .B demand
203 Initiate the link only on demand, i.e. when data traffic is present.
204 With this option, the remote IP address must be specified by the user
205 on the command line or in an options file.  Pppd will initially
206 configure the interface and enable it for IP traffic without
207 connecting to the peer.  When traffic is available, pppd will
208 connect to the peer and perform negotiation, authentication, etc.
209 When this is completed, pppd will commence passing data packets
210 (i.e., IP packets) across the link.
211
212 The \fIdemand\fR option implies the \fIpersist\fR option.  If this
213 behaviour is not desired, use the \fInopersist\fR option after the
214 \fIdemand\fR option.  The \fIidle\fR and \fIholdoff\fR
215 options are also useful in conjuction with the \fIdemand\fR option.
216 .TP
217 .B domain \fId
218 Append the domain name \fId\fR to the local host name for authentication
219 purposes.  For example, if gethostname() returns the name porsche, but
220 the fully qualified domain name is porsche.Quotron.COM, you could
221 specify \fIdomain Quotron.COM\fR.  Pppd would then use the name
222 \fIporsche.Quotron.COM\fR for looking up secrets in the secrets file,
223 and as the default name to send to the peer when authenticating itself
224 to the peer.  This option is privileged.
225 .TP
226 .B holdoff \fIn
227 Specifies how many seconds to wait before re-initiating the link after
228 it terminates.  This option only has any effect if the \fIpersist\fR
229 or \fIdemand\fR option is used.  The holdoff period is not applied if
230 the link was terminated because it was idle.
231 .TP
232 .B idle \fIn
233 Specifies that pppd should disconnect if the link is idle for \fIn\fR
234 seconds.  The link is idle when no data packets (i.e. IP packets) are
235 being sent or received.  Note: it is not advisable to use this option
236 with the \fIpersist\fR option without the \fIdemand\fR option.
237 .TP
238 .B ipx
239 Enable the IPXCP and IPX protocols.  Under Linux, this is the default
240 condition if your kernel supports IPX.  This option is presently only
241 supported under Linux.
242 .TP
243 .B ipcp-accept-local
244 With this option, pppd will accept the peer's idea of our local IP
245 address, even if the local IP address was specified in an option.
246 .TP
247 .B ipcp-accept-remote
248 With this option, pppd will accept the peer's idea of its (remote) IP
249 address, even if the remote IP address was specified in an option.
250 .TP
251 .B ipcp-max-configure \fIn
252 Set the maximum number of IPCP configure-request transmissions to
253 \fIn\fR (default 10).
254 .TP
255 .B ipcp-max-failure \fIn
256 Set the maximum number of IPCP configure-NAKs returned before starting
257 to send configure-Rejects instead to \fIn\fR (default 10).
258 .TP
259 .B ipcp-max-terminate \fIn
260 Set the maximum number of IPCP terminate-request transmissions to
261 \fIn\fR (default 3).
262 .TP
263 .B ipcp-restart \fIn
264 Set the IPCP restart interval (retransmission timeout) to \fIn\fR
265 seconds (default 3).
266 .TP
267 .B ipparam \fIstring
268 Provides an extra parameter to the ip-up and ip-down scripts.  If this
269 option is given, the \fIstring\fR supplied is given as the 6th
270 parameter to those scripts.
271 .TP
272 .B ipx-network \fIn
273 Set the IPX network number in the IPXCP configure request frame to
274 \fIn\fR, a hexadecimal number (without a leading 0x).  There is no
275 valid default.  If this option is not specified, the network number is
276 obtained from the peer.  If the peer does not have the network number,
277 the IPX protocol will not be started.
278 .TP
279 .B ipx-node \fIn\fB:\fIm
280 Set the IPX node numbers. The two node numbers are separated from each
281 other with a colon character. The first number \fIn\fR is the local
282 node number. The second number \fIm\fR is the peer's node number. Each
283 node number is a hexadecimal number, at most 10 digits long. The node
284 numbers on the ipx-network must be unique. There is no valid
285 default. If this option is not specified then the node numbers are
286 obtained from the peer.
287 .TP
288 .B ipx-router-name \fI<string>
289 Set the name of the router. This is a string and is sent to the peer
290 as information data.
291 .TP
292 .B ipx-routing \fIn
293 Set the routing protocol to be received by this option. More than one
294 instance of \fIipx-routing\fR may be specified. The '\fInone\fR'
295 option (0) may be specified as the only instance of ipx-routing. The
296 values may be \fI0\fR for \fINONE\fR, \fI2\fR for \fIRIP/SAP\fR, and
297 \fI4\fR for \fINLSP\fR.
298 .TP
299 .B ipxcp-accept-local
300 Accept the peer's NAK for the node number specified in the ipx-node
301 option. If a node number was specified, and non-zero, the default is
302 to insist that the value be used. If you include this option then you
303 will permit the peer to override the entry of the node number.
304 .TP
305 .B ipxcp-accept-network
306 Accept the peer's NAK for the network number specified in the
307 ipx-network option. If a network number was specified, and non-zero, the
308 default is to insist that the value be used. If you include this
309 option then you will permit the peer to override the entry of the node
310 number.
311 .TP
312 .B ipxcp-accept-remote
313 Use the peer's network number specified in the configure request
314 frame. If a node number was specified for the peer and this option was
315 not specified, the peer will be forced to use the value which you have
316 specified.
317 .TP
318 .B ipxcp-max-configure \fIn
319 Set the maximum number of IPXCP configure request frames which the
320 system will send to \fIn\fR. The default is 10.
321 .TP
322 .B ipxcp-max-failure \fIn
323 Set the maximum number of IPXCP NAK frames which the local system will
324 send before it rejects the options. The default value is 3.
325 .TP
326 .B ipxcp-max-terminate \fIn
327 Set the maximum nuber of IPXCP terminate request frames before the
328 local system considers that the peer is not listening to them. The
329 default value is 3.
330 .TP
331 .B kdebug \fIn
332 Enable debugging code in the kernel-level PPP driver.  The argument
333 \fIn\fR is a number which is the sum of the following values: 1 to
334 enable general debug messages, 2 to request that the contents of
335 received packets be printed, and 4 to request that the contents of
336 transmitted packets be printed.
337 .TP
338 .B lcp-echo-failure \fIn
339 If this option is given, pppd will presume the peer to be dead
340 if \fIn\fR LCP echo-requests are sent without receiving a valid LCP
341 echo-reply.  If this happens, pppd will terminate the
342 connection.  Use of this option requires a non-zero value for the
343 \fIlcp-echo-interval\fR parameter.  This option can be used to enable
344 pppd to terminate after the physical connection has been broken
345 (e.g., the modem has hung up) in situations where no hardware modem
346 control lines are available.
347 .TP
348 .B lcp-echo-interval \fIn
349 If this option is given, pppd will send an LCP echo-request frame to
350 the peer every \fIn\fR seconds.  Normally the peer should respond to
351 the echo-request by sending an echo-reply.  This option can be used
352 with the \fIlcp-echo-failure\fR option to detect that the peer is no
353 longer connected.
354 .TP
355 .B lcp-max-configure \fIn
356 Set the maximum number of LCP configure-request transmissions to
357 \fIn\fR (default 10).
358 .TP
359 .B lcp-max-failure \fIn
360 Set the maximum number of LCP configure-NAKs returned before starting
361 to send configure-Rejects instead to \fIn\fR (default 10).
362 .TP
363 .B lcp-max-terminate \fIn
364 Set the maximum number of LCP terminate-request transmissions to
365 \fIn\fR (default 3).
366 .TP
367 .B lcp-restart \fIn
368 Set the LCP restart interval (retransmission timeout) to \fIn\fR
369 seconds (default 3).
370 .TP
371 .B local
372 Don't use the modem control lines.  With this option, pppd will ignore
373 the state of the CD (Carrier Detect) signal from the modem and will
374 not change the state of the DTR (Data Terminal Ready) signal.
375 .TP
376 .B login
377 Use the system password database for authenticating the peer using
378 PAP, and record the user in the system wtmp file.  Note that if the
379 /etc/ppp/pap-secrets file exists, the peer must have an entry in that
380 file as well as the system password database to be allowed access.
381 .TP
382 .B maxconnect \fIn
383 Terminate the connection after \fIn\fR seconds.
384 .TP
385 .B modem
386 Use the modem control lines.  This option is the default.  With this
387 option, pppd will wait for the CD (Carrier Detect) signal from the
388 modem to be asserted when opening the serial device (unless a connect
389 script is specified), and it will drop the DTR (Data Terminal Ready)
390 signal briefly when the connection is terminated and before executing
391 the connect script.  On Ultrix, this option implies hardware flow
392 control, as for the \fIcrtscts\fR option.
393 .TP
394 .B ms-dns \fI<addr>
395 If pppd is acting as a server for Microsoft Windows clients, this
396 option allows pppd to supply one or two DNS (Domain Name Server)
397 addresses to the clients.  The first instance of this option specifies
398 the primary DNS address; the second instance (if given) specifies the
399 secondary DNS address.
400 .TP
401 .B name \fIname
402 Set the name of the local system for authentication purposes to
403 \fIname\fR.  This is a privileged option.  With this option, pppd will
404 use lines in the secrets files which have \fIname\fR as the second
405 field when looking for a secret to use in authenticating the peer.  In
406 addition, unless overridden with the \fIuser\fR option, \fIname\fR
407 will be used as the name to send to the peer when authenticating the
408 local system to the peer.
409 .TP
410 .B netmask \fIn
411 Set the interface netmask to \fIn\fR, a 32 bit netmask in "decimal dot"
412 notation (e.g. 255.255.255.0).  If this option is given, the value
413 specified is ORed with the default netmask.  The default netmask is
414 chosen based on the negotiated remote IP address; it is the
415 appropriate network mask for the class of the remote IP address, ORed
416 with the netmasks for any non point-to-point network interfaces in the
417 system which are on the same network.
418 .TP
419 .B noaccomp
420 Disable Address/Control compression in both directions (send and
421 receive).
422 .TP
423 .B noauth
424 Do not require the peer to authenticate itself.  This option is
425 privileged if the \fIauth\fR option is specified in /etc/ppp/options.
426 .TP
427 .B nobsdcomp
428 Disables BSD-Compress compression; \fBpppd\fR will not request or
429 agree to compress packets using the BSD-Compress scheme.
430 .TP
431 .B noccp
432 Disable CCP (Compression Control Protocol) negotiation.  This option
433 should only be required if the peer is buggy and gets confused by
434 requests from pppd for CCP negotiation.
435 .TP
436 .B nocrtscts
437 Disable hardware flow control (i.e. RTS/CTS) on the serial port.  If
438 neither the \fIcrtscts\fR nor the \fI\nocrtscts\fR option is given,
439 the hardware flow control setting for the serial port is left
440 unchanged.
441 .TP
442 .B nodefaultroute
443 Disable the \fIdefaultroute\fR option.  The system administrator who
444 wishes to prevent users from creating default routes with pppd
445 can do so by placing this option in the /etc/ppp/options file.
446 .TP
447 .B nodeflate
448 Disables Deflate compression; pppd will not request or agree to
449 compress packets using the Deflate scheme.
450 .TP
451 .B nodetach
452 Don't detach from the controlling terminal.  Without this option, if a
453 serial device other than the terminal on the standard input is
454 specified, pppd will fork to become a background process.
455 .TP
456 .B noip
457 Disable IPCP negotiation and IP communication.  This option should
458 only be required if the peer is buggy and gets confused by requests
459 from pppd for IPCP negotiation.
460 .TP
461 .B noipdefault
462 Disables the default behaviour when no local IP address is specified,
463 which is to determine (if possible) the local IP address from the
464 hostname.  With this option, the peer will have to supply the local IP
465 address during IPCP negotiation (unless it specified explicitly on the
466 command line or in an options file).
467 .TP
468 .B noipx
469 Disable the IPXCP and IPX protocols.  This option should only be
470 required if the peer is buggy and gets confused by requests from pppd
471 for IPXCP negotiation.
472 .TP
473 .B nomagic
474 Disable magic number negotiation.  With this option, pppd cannot
475 detect a looped-back line.  This option should only be needed if the
476 peer is buggy.
477 .TP
478 .B nopcomp
479 Disable protocol field compression negotiation in both the receive and
480 the transmit direction.
481 .TP
482 .B nopersist
483 Exit once a connection has been made and terminated.  This is the
484 default unless the \fIpersist\fR or \fIdemand\fR option has been
485 specified.
486 .TP
487 .B nopredictor1
488 Do not accept or agree to Predictor-1 comprssion.
489 .TP
490 .B noproxyarp
491 Disable the \fIproxyarp\fR option.  The system administrator who
492 wishes to prevent users from creating proxy ARP entries with pppd can
493 do so by placing this option in the /etc/ppp/options file.
494 .TP
495 .B novj
496 Disable Van Jacobson style TCP/IP header compression in both the
497 transmit and the receive direction.
498 .TP
499 .B novjccomp
500 Disable the connection-ID compression option in Van Jacobson style
501 TCP/IP header compression.  With this option, pppd will not omit the
502 connection-ID byte from Van Jacobson compressed TCP/IP headers, nor
503 ask the peer to do so.
504 .TP
505 .B papcrypt
506 Indicates that all secrets in the /etc/ppp/pap-secrets file which are
507 used for checking the identity of the peer are encrypted, and thus
508 pppd should not accept a password which, before encryption, is
509 identical to the secret from the /etc/ppp/pap-secrets file.
510 .TP
511 .B pap-max-authreq \fIn
512 Set the maximum number of PAP authenticate-request transmissions to
513 \fIn\fR (default 10).
514 .TP
515 .B pap-restart \fIn
516 Set the PAP restart interval (retransmission timeout) to \fIn\fR
517 seconds (default 3).
518 .TP
519 .B pap-timeout \fIn
520 Set the maximum time that pppd will wait for the peer to authenticate
521 itself with PAP to \fIn\fR seconds (0 means no limit).
522 .TP
523 .B persist
524 Do not exit after a connection is terminated; instead try to reopen
525 the connection.
526 .TP
527 .B predictor1
528 Request that the peer compress frames that it sends using Predictor-1
529 compression, and agree to compress transmitted frames with Predictor-1
530 if requested.  This option has no effect unless the kernel driver
531 supports Predictor-1 compression.
532 .TP
533 .B proxyarp
534 Add an entry to this system's ARP [Address Resolution Protocol] table
535 with the IP address of the peer and the Ethernet address of this
536 system.  This will have the effect of making the peer appear to other
537 systems to be on the local ethernet.
538 .TP
539 .B remotename \fIname
540 Set the assumed name of the remote system for authentication purposes
541 to \fIname\fR.
542 .TP
543 .B refuse-chap
544 With this option, pppd will not agree to authenticate itself to the
545 peer using CHAP.
546 .TP
547 .B refuse-pap
548 With this option, pppd will not agree to authenticate itself to the
549 peer using PAP.
550 .TP
551 .B require-chap
552 Require the peer to authenticate itself using CHAP [Challenge
553 Handshake Authentication Protocol] authentication.
554 .TP
555 .B require-pap
556 Require the peer to authenticate itself using PAP [Password
557 Authentication Protocol] authentication.
558 .TP
559 .B silent
560 With this option, pppd will not transmit LCP packets to initiate a
561 connection until a valid LCP packet is received from the peer (as for
562 the `passive' option with ancient versions of pppd).
563 .TP
564 .B usehostname
565 Enforce the use of the hostname (with domain name appended, if given)
566 as the name of the local system for authentication purposes (overrides
567 the \fIname\fR option).
568 .TP
569 .B user \fIname
570 Sets the name used for authenticating the local system to the peer to
571 \fIname\fR.
572 .TP
573 .B vj-max-slots \fIn
574 Sets the number of connection slots to be used by the Van Jacobson
575 TCP/IP header compression and decompression code to \fIn\fR, which
576 must be between 2 and 16 (inclusive).
577 .TP
578 .B welcome \fIscript
579 Run the executable or shell command specified by \fIscript\fR before
580 initiating PPP negotiation, after the connect script (if any) has
581 completed.  This option is privileged if the \fInoauth\fR option is
582 used.
583 .TP
584 .B xonxoff
585 Use software flow control (i.e. XON/XOFF) to control the flow of data on
586 the serial port.
587 .SH OPTIONS FILES
588 Options can be taken from files as well as the command line.  Pppd
589 reads options from the files /etc/ppp/options, ~/.ppprc and
590 /etc/ppp/options.\fIttyname\fR (in that order) before processing the
591 options on the command line.  (In fact, the command-line options are
592 scanned to find the terminal name before the options.\fIttyname\fR
593 file is read.)  In forming the name of the options.\fIttyname\fR file,
594 the initial /dev/ is removed from the terminal name, and any remaining
595 / characters are replaced with dots.
596 .PP
597 An options file is parsed into a series of words, delimited by
598 whitespace.  Whitespace can be included in a word by enclosing the
599 word in quotes (").  A backslash (\\) quotes the following character.
600 A hash (#) starts a comment, which continues until the end of the
601 line.
602 .SH PRIVILEGED OPTIONS
603 As indicated above, some security-sensitive options are privileged,
604 which means that they may not be used by an ordinary non-privileged
605 user running a setuid-root pppd, either on the command line, in the
606 user's ~/.ppprc file, or in an options file read using the \fIfile\fR
607 option.  Privileged options may be used in /etc/ppp/options file or in
608 an options file read using the \fIcall\fR option.  If pppd is being
609 run by the root user, privileged options can be used without
610 restriction.
611 .PP
612 The normal way that pppd should be set up is to have the \fIauth\fR
613 option in the /etc/ppp/options file.  (This may become the default in
614 later releases.)  If users wish to use pppd to dial out to a peer
615 which will refuse to authenticate itself (such as an internet service
616 provider), the system administrator should create an options file
617 under /etc/ppp/peers containing the \fInoauth\fR option, the name of
618 the serial port to use, and the \fIconnect\fR option (if required),
619 plus any other appropriate options.  In this way, pppd can be set up
620 to allow non-privileged users to make unauthenticated connections only
621 to trusted peers.
622 .SH AUTHENTICATION
623 .I pppd
624 provides system administrators with sufficient access control that PPP
625 access to a server machine can be provided to legitimate users without
626 fear of compromising the security of the server or the network it's
627 on.  In part this is provided by the /etc/ppp/options file, where the
628 administrator can place options to restrict the ways in which pppd can
629 be used, and in part by the PAP and CHAP secrets files, where the
630 administrator can restrict the set of IP addresses which individual
631 users may use.
632 .LP
633 The default behaviour of pppd is to agree to authenticate if
634 requested, and to not require authentication from the peer.  However,
635 pppd will not agree to authenticate itself with a particular protocol
636 if it has no secrets which could be used to do so.
637 .LP
638 Authentication is based on secrets, which are selected from secrets
639 files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP).
640 Both secrets files have the same format, and both can store secrets
641 for several combinations of server (authenticating peer) and client
642 (peer being authenticated).  Note that pppd can be both a server and
643 client, and that different protocols can be used in the two directions
644 if desired.
645 .LP
646 A secrets file is parsed into words as for a options file.  A secret
647 is specified by a line containing at least 3 words, in the order
648 client name, server name, secret.  Any following words on the same
649 line are taken to be a list of acceptable IP addresses for that
650 client.  If there are only 3 words on the line, it is assumed that any
651 IP address is OK; to disallow all IP addresses, use "-".  A word
652 starting with "!" indicates that the specified address is \fInot\fR
653 acceptable.  An address may be followed by "/" and a number \fIn\fR,
654 to indicate a whole subnet, i.e. all addresses which have the same
655 value in the most significant \fIn\fR bits.
656 .LP
657 If the secret starts with an `@', what follows is assumed to be the
658 name of a file from which to read the secret.  A "*" as the client or
659 server name matches any name.  When selecting a secret, pppd takes the
660 best match, i.e.  the match with the fewest wildcards.
661 .LP
662 Thus a secrets file contains both secrets for use in authenticating
663 other hosts, plus secrets which we use for authenticating ourselves to
664 others.  When pppd is authenticating the peer (checking the peer's
665 identity), it chooses a secret with the peer's name in the first
666 column and the name of the local system in the second column.  The
667 name of the local system defaults to the hostname, with the domain
668 name appended if the \fIdomain\fR option is used.  This default can be
669 overridden with the \fIname\fR option (unless the \fIusehostname\fR
670 option is used.)
671 .LP
672 When pppd is choosing a secret to use in authenticating itself to the
673 peer, it looks for a secret with the local name in the first column
674 and the name of the remote system in the second column.  The local
675 name is determined as described in the previous paragraph, except that
676 it may be overridden with the \fIuser\fR option.  The remote name will
677 have been received from the peer if CHAP authentication is being
678 used.  However, with PAP, pppd does not know the remote name at the
679 time when it has to look for the secret.  In this case, it will use
680 the value given for the \fIremotename\fR option if specified.  Failing
681 that, if the remote IP address was given as a name (rather than in
682 numeric form), it will use that name.  Failing that, it will use the
683 empty string.
684 .LP
685 When authenticating the peer with PAP, a secret of "" matches any
686 password supplied by the peer.  If the password doesn't match the
687 secret, the password is encrypted using crypt() and checked against
688 the secret again; thus secrets for authenticating the peer can be
689 stored in encrypted form.  If the \fIpapcrypt\fR option is given, the
690 first (unencrypted) comparison is omitted, for better security.
691 .LP
692 If the \fIlogin\fR option was specified, the username and password are
693 also checked against the system password database.  Thus, the system
694 administrator can set up the pap-secrets file to allow PPP access only
695 to certain users, and to restrict the set of IP addresses that each
696 user can use.  Typically, when using the \fIlogin\fR option, the
697 secret in /etc/ppp/pap-secrets would be "", to avoid the need to have
698 the same secret in two places.
699 .LP
700 Authentication must be satisfactorily completed before IPCP (or any
701 other Network Control Protocol) can be started.  If the peer is
702 required to authenticate itself, and fails to do so, pppd will
703 terminated the link (by closing LCP).  If IPCP negotiates an
704 unacceptable IP address for the remote host, IPCP will be closed.  IP
705 packets can only be sent or received when IPCP is open.
706 .LP
707 In some cases it is desirable to allow some hosts which can't
708 authenticate themselves to connect and use one of a restricted set of
709 IP addresses, even when the local host generally requires
710 authentication.  If the peer refuses to authenticate itself when
711 requested, pppd takes that as equivalent to authenticating with PAP
712 using the empty string for the username and password.  Thus, by adding
713 a line to the pap-secrets file which specifies the empty string for
714 the client and password, it is possible to allow restricted access to
715 hosts which refuse to authenticate themselves.
716 .SH ROUTING
717 .LP
718 When IPCP negotiation is completed successfully, pppd will inform the
719 kernel of the local and remote IP addresses for the ppp interface.
720 This is sufficient to create a host route to the remote end of the
721 link, which will enable the peers to exchange IP packets.
722 Communication with other machines generally requires further
723 modification to routing tables and/or ARP (Address Resolution
724 Protocol) tables.  In some cases this will be done automatically
725 through the actions of the \fIrouted\fR or \fIgated\fR daemons, but in
726 most cases some further intervention is required.
727 .LP
728 Sometimes it is desirable to add a default route through the remote
729 host, as in the case of a machine whose only connection to the
730 Internet is through the ppp interface.  The \fIdefaultroute\fR option
731 causes pppd to create such a default route when IPCP comes up, and
732 delete it when the link is terminated.
733 .LP
734 In some cases it is desirable to use proxy ARP, for example on a
735 server machine connected to a LAN, in order to allow other hosts to
736 communicate with the remote host.  The \fIproxyarp\fR option causes
737 pppd to look for a network interface on the same subnet as the remote
738 host (an interface supporting broadcast and ARP, which is up and not a
739 point-to-point or loopback interface).  If found, pppd creates a
740 permanent, published ARP entry with the IP address of the remote host
741 and the hardware address of the network interface found.
742 .SH EXAMPLES
743 .LP
744 In the simplest case, you can connect the serial ports of two machines
745 and issue a command like
746 .IP
747 pppd /dev/ttya 9600 passive
748 .LP
749 to each machine, assuming there is no \fIgetty\fR running on the
750 serial ports.  If one machine has a \fIgetty\fR running, you can use
751 \fIkermit\fR or \fItip\fR on the other machine to log in to the first
752 machine and issue a command like
753 .IP
754 pppd passive
755 .LP
756 Then exit from the communications program (making sure the connection
757 isn't dropped), and issue a command like
758 .IP
759 pppd /dev/ttya 9600
760 .LP
761 The process of logging in to the other machine and starting \fIpppd\fR
762 can be automated by using the \fIconnect\fR option to run \fIchat\fR,
763 for example:
764 .IP
765 pppd /dev/ttya 38400 connect 'chat "" "" "login:" "username"
766 "Password:" "password" "% " "exec pppd passive"'
767 .LP
768 (Note however that running chat like this will leave the password
769 visible in the parameter list of pppd and chat.)
770 .LP
771 If your serial connection is any more complicated than a piece of
772 wire, you may need to arrange for some control characters to be
773 escaped.  In particular, it is often useful to escape XON (^Q) and
774 XOFF (^S), using \fIasyncmap a0000\fR.  If the path includes a telnet,
775 you probably should escape ^] as well (\fIasyncmap 200a0000\fR).  If
776 the path includes an rlogin, you will need to use the \fIescape ff\fR
777 option on the end which is running the rlogin client, since many
778 rlogin implementations are not transparent; they will remove the
779 sequence [0xff, 0xff, 0x73, 0x73, followed by any 8 bytes] from the
780 stream.
781 .SH DIAGNOSTICS
782 .LP
783 Messages are sent to the syslog daemon using facility LOG_DAEMON.
784 (This can be overriden by recompiling pppd with the macro
785 LOG_PPP defined as the desired facility.)  In order to see the error
786 and debug messages, you will need to edit your /etc/syslog.conf file
787 to direct the messages to the desired output device or file.
788 .LP
789 The \fIdebug\fR option causes the contents of all control packets sent
790 or received to be logged, that is, all LCP, PAP, CHAP or IPCP packets.
791 This can be useful if the PPP negotiation does not succeed.
792 If debugging is enabled at compile time, the \fIdebug\fR option also
793 causes other debugging messages to be logged.
794 .LP
795 Debugging can also be enabled or disabled by sending a SIGUSR1 signal
796 to the pppd process.  This signal acts as a toggle.
797 .SH FILES
798 .TP
799 .B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)
800 Process-ID for pppd process on ppp interface unit \fIn\fR.
801 .TP
802 .B /etc/ppp/auth-up
803 A program or script which is executed after the remote system
804 successfully authenticates itself.  It is executed with the parameters
805 .IP
806 \fIinterface-name peer-name user-name tty-device speed\fR
807 .IP
808 and with its standard input, output and error redirected to
809 /dev/null.  This program or script is executed with the real and
810 effective user-IDs set to root, and with an empty environment.
811 .TP
812 .B /etc/ppp/auth-down
813 A program or script which is executed when the link goes down, if
814 /etc/ppp/auth-up was previously executed.  It is executed in the same
815 manner with the same parameters as /etc/ppp/auth-up.
816 .TP
817 .B /etc/ppp/ip-up
818 A program or script which is executed when the link is available for
819 sending and receiving IP packets (that is, IPCP has come up).  It is
820 executed with the parameters
821 .IP
822 \fIinterface-name tty-device speed local-IP-address
823 remote-IP-address ipparam\fR
824 .IP
825 and with its standard input,
826 output and error streams redirected to /dev/null.
827 .IP
828 This program or script is executed with the real and effective
829 user-IDs set to root.  This is so that it can be used to manipulate
830 routes, run privileged daemons (e.g. \fIsendmail\fR), etc.  Be
831 careful that the contents of the /etc/ppp/ip-up and /etc/ppp/ip-down
832 scripts do not compromise your system's security.
833 .IP
834 This program or script is executed with an empty environment, so you
835 must either specify a PATH or use full pathnames.
836 .TP
837 .B /etc/ppp/ip-down
838 A program or script which is executed when the link is no longer
839 available for sending and receiving IP packets.  This script can be
840 used for undoing the effects of the /etc/ppp/ip-up script.  It is
841 invoked in the same manner and with the same parameters as the ip-up
842 script, and the same security considerations apply.
843 .TP
844 .B /etc/ppp/ipx-up
845 A program or script which is executed when the link is available for
846 sending and receiving IPX packets (that is, IPXCP has come up).  It is
847 executed with the parameters
848 .IP
849 \fIinterface-name tty-device speed network-number local-IPX-node-address
850 remote-IPX-node-address local-IPX-routing-protocol remote-IPX-routing-protocol
851 local-IPX-router-name remote-IPX-router-name ipparam pppd-pid\fR 
852 .IP
853 and with its standard input,
854 output and error streams redirected to /dev/null.
855 .br
856 .IP
857 The local-IPX-routing-protocol and remote-IPX-routing-protocol field
858 may be one of the following:
859 .IP
860 NONE      to indicate that there is no routing protocol
861 .br
862 RIP       to indicate that RIP/SAP should be used
863 .br
864 NLSP      to indicate that Novell NLSP should be used
865 .br
866 RIP NLSP  to indicate that both RIP/SAP and NLSP should be used
867 .br
868 .IP
869 This program or script is executed with the real and effective
870 user-IDs set to root, and with an empty environment.  This is so
871 that it can be used to manipulate routes, run privileged daemons (e.g.
872 \fIripd\fR), etc.  Be careful that the contents of the /etc/ppp/ipx-up
873 and /etc/ppp/ipx-down scripts do not compromise your system's
874 security.
875 .TP
876 .B /etc/ppp/ipx-down
877 A program or script which is executed when the link is no longer
878 available for sending and receiving IPX packets.  This script can be
879 used for undoing the effects of the /etc/ppp/ipx-up script.  It is
880 invoked in the same manner and with the same parameters as the ipx-up
881 script, and the same security considerations apply.
882 .TP
883 .B /etc/ppp/pap-secrets
884 Usernames, passwords and IP addresses for PAP authentication.
885 .TP
886 .B /etc/ppp/chap-secrets
887 Names, secrets and IP addresses for CHAP authentication.
888 .TP
889 .B /etc/ppp/options
890 System default options for pppd, read before user default options or
891 command-line options.
892 .TP
893 .B ~/.ppprc
894 User default options, read before /etc/ppp/options.\fIttyname\fR.
895 .TP
896 .B /etc/ppp/options.\fIttyname
897 System default options for the serial port being used, read after
898 ~/.ppprc.  In forming the \fIttyname\fR part of this
899 filename, an initial /dev/ is stripped from the port name (if
900 present), and any slashes in the remaining part are converted to
901 dots.
902 .SH SEE ALSO
903 .TP
904 .B RFC1144
905 Jacobson, V.
906 \fICompressing TCP/IP headers for low-speed serial links.\fR
907 February 1990.
908 .TP
909 .B RFC1321
910 Rivest, R.
911 .I The MD5 Message-Digest Algorithm.
912 April 1992.
913 .TP
914 .B RFC1332
915 McGregor, G.
916 .I PPP Internet Protocol Control Protocol (IPCP).
917 May 1992.
918 .TP
919 .B RFC1334
920 Lloyd, B.; Simpson, W.A.
921 .I PPP authentication protocols.
922 October 1992.
923 .TP
924 .B RFC1661
925 Simpson, W.A.
926 .I The Point\-to\-Point Protocol (PPP).
927 July 1994.
928 .TP
929 .B RFC1662
930 Simpson, W.A.
931 .I PPP in HDLC-like Framing.
932 July 1994.
933 .SH NOTES
934 The following signals have the specified effect when sent to pppd.
935 .TP
936 .B SIGINT, SIGTERM
937 These signals cause pppd to terminate the link (by closing LCP),
938 restore the serial device settings, and exit.
939 .TP
940 .B SIGHUP
941 This signal causes pppd to terminate the link, restore the serial
942 device settings, and close the serial device.  If the \fIpersist\fR or
943 \fIdemand\fR option has been specified, pppd will try to reopen the
944 serial device and start another connection (after the holdoff period).
945 Otherwise pppd will exit.  If this signal is received during the
946 holdoff period, it causes pppd to end the holdoff period immediately.
947 .TP
948 .B SIGUSR2
949 This signal causes pppd to renegotiate compression.  This can be
950 useful to re-enable compression after it has been disabled as a result
951 of a fatal decompression error.  (Fatal decompression errors generally
952 indicate a bug in one or other implementation.)
953
954 .SH AUTHORS
955 Paul Mackerras (Paul.Mackerras@cs.anu.edu.au), based on earlier work by
956 Drew Perkins,
957 Brad Clements,
958 Karl Fox,
959 Greg Christy,
960 and
961 Brad Parker.