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