]> git.ozlabs.org Git - ppp.git/blob - pppd/pppd.8
typo
[ppp.git] / pppd / pppd.8
1 .\" manual page [] for pppd 2.3
2 .\" $Id: pppd.8,v 1.45 1999/08/13 13:42:35 johnsonm 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 will use that terminal,
39 and will not fork to put itself in the background.  A value for this
40 option from a privileged source cannot be overridden by a
41 non-privileged user.
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.  This option is the default if the
64 system has a default route.  If neither this option nor the
65 \fInoauth\fR option is specified, pppd will only allow the peer to use
66 IP addresses to which the system does not already have a route.
67 .TP
68 .B call \fIname
69 Read options from the file /etc/ppp/peers/\fIname\fR.  This file may
70 contain privileged options, such as \fInoauth\fR, even if pppd
71 is not being run by root.  The \fIname\fR string may not begin with /
72 or include .. as a pathname component.  The format of the options file
73 is described below.
74 .TP
75 .B connect \fIscript
76 Use the executable or shell command specified by \fIscript\fR to set
77 up the serial line.  This script would typically use the chat(8)
78 program to dial the modem and start the remote ppp session.  A value
79 for this option from a privileged source cannot be overridden by a
80 non-privileged user.
81 .TP
82 .B crtscts
83 Use hardware flow control (i.e. RTS/CTS) to control the flow of
84 data on the serial port.  If neither the \fIcrtscts\fR, the
85 \fInocrtscts\fR, the \fIcdtrcts\fR nor the \fInocdtrcts\fR option
86 is given, the hardware flow control setting for the serial port is
87 left unchanged.
88 Some serial ports (such as Macintosh serial ports) lack a true
89 RTS output. Such serial ports use this mode to implement
90 unidirectional flow control. The serial port will
91 suspend transmission when requested by the modem (via CTS)
92 but will be unable to request the modem stop sending to the
93 computer. This mode retains the ability to use DTR as
94 a modem control line.
95 .TP
96 .B cdtrcts
97 Use a non-standard hardware flow control (i.e. DTR/CTS) to control
98 the flow of data on the serial port.  If neither the \fIcrtscts\fR,
99 the \fInocrtscts\fR, the \fIcdtrcts\fR nor the \fInocdtrcts\fR
100 option is given, the hardware flow control setting for the serial
101 port is left unchanged.
102 Some serial ports (such as Macintosh serial ports) lack a true
103 RTS output. Such serial ports use this mode to implement true
104 bi-directional flow control. The sacrifice is that this flow
105 control mode does not permit using DTR as a modem control line.
106 .TP
107 .B defaultroute
108 Add a default route to the system routing tables, using the peer as
109 the gateway, when IPCP negotiation is successfully completed.
110 This entry is removed when the PPP connection is broken.  This option
111 is privileged if the \fInodefaultroute\fR option has been specified.
112 .TP
113 .B disconnect \fIscript
114 Run the executable or shell command specified by \fIscript\fR after
115 pppd has terminated the link.  This script could, for example, issue
116 commands to the modem to cause it to hang up if hardware modem control
117 signals were not available.  The disconnect script is not run if the
118 modem has already hung up.  A value for this option from a privileged
119 source cannot be overridden by a non-privileged user.
120 .TP
121 .B escape \fIxx,yy,...
122 Specifies that certain characters should be escaped on transmission
123 (regardless of whether the peer requests them to be escaped with its
124 async control character map).  The characters to be escaped are
125 specified as a list of hex numbers separated by commas.  Note that
126 almost any character can be specified for the \fIescape\fR option,
127 unlike the \fIasyncmap\fR option which only allows control characters
128 to be specified.  The characters which may not be escaped are those
129 with hex values 0x20 - 0x3f or 0x5e.
130 .TP
131 .B file \fIname
132 Read options from file \fIname\fR (the format is described below).
133 The file must be readable by the user who has invoked pppd.
134 .TP
135 .B init \fIscript
136 Run the executable or shell command specified by \fIscript\fR to
137 initialize the serial line.  This script would typically use the
138 chat(8) program to configure the modem to enable auto answer.  A value
139 for this option from a privileged source cannot be overridden by a
140 non-privileged user.
141 .TP
142 .B lock
143 Specifies that pppd should create a UUCP-style lock file for the
144 serial device to ensure exclusive access to the device.
145 .TP
146 .B mru \fIn
147 Set the MRU [Maximum Receive Unit] value to \fIn\fR. Pppd
148 will ask the peer to send packets of no more than \fIn\fR bytes.  The
149 minimum MRU value is 128.  The default MRU value is 1500.  A value of
150 296 is recommended for slow links (40 bytes for TCP/IP header + 256
151 bytes of data).
152 .TP
153 .B mtu \fIn
154 Set the MTU [Maximum Transmit Unit] value to \fIn\fR.  Unless the
155 peer requests a smaller value via MRU negotiation, pppd will
156 request that the kernel networking code send data packets of no more
157 than \fIn\fR bytes through the PPP network interface. 
158 .TP
159 .B passive
160 Enables the "passive" option in the LCP.  With this option, pppd will
161 attempt to initiate a connection; if no reply is received from the
162 peer, pppd will then just wait passively for a valid LCP packet from
163 the peer, instead of exiting, as it would without this option.
164 .SH OPTIONS
165 .TP
166 .I <local_IP_address>\fB:\fI<remote_IP_address>
167 Set the local and/or remote interface IP addresses.  Either one may be
168 omitted.  The IP addresses can be specified with a host name or in
169 decimal dot notation (e.g. 150.234.56.78).  The default local
170 address is the (first) IP address of the system (unless the
171 \fInoipdefault\fR
172 option is given).  The remote address will be obtained from the peer
173 if not specified in any option.  Thus, in simple cases, this option is
174 not required.  If a local and/or remote IP address is specified with
175 this option, pppd
176 will not accept a different value from the peer in the IPCP
177 negotiation, unless the \fIipcp-accept-local\fR and/or
178 \fIipcp-accept-remote\fR options are given, respectively.
179 .TP
180 .B active-filter \fIfilter-expression
181 Specifies a packet filter to be applied to data packets to determine
182 which packets are to be regarded as link activity, and therefore reset
183 the idle timer, or cause the link to be brought up in demand-dialling
184 mode.  This option is useful in conjunction with the
185 \fBidle\fR option if there are packets being sent or received
186 regularly over the link (for example, routing information packets)
187 which would otherwise prevent the link from ever appearing to be idle.
188 The \fIfilter-expression\fR syntax is as described for tcpdump(1),
189 except that qualifiers which are inappropriate for a PPP link, such as
190 \fBether\fR and \fBarp\fR, are not permitted.  Generally the filter
191 expression should be enclosed in single-quotes to prevent whitespace
192 in the expression from being interpreted by the shell. This option
193 is currently only available under NetBSD, and then only
194 if both the kernel and pppd were compiled with PPP_FILTER defined.
195 .TP
196 .B bsdcomp \fInr,nt
197 Request that the peer compress packets that it sends, using the
198 BSD-Compress scheme, with a maximum code size of \fInr\fR bits, and
199 agree to compress packets sent to the peer with a maximum code size of
200 \fInt\fR bits.  If \fInt\fR is not specified, it defaults to the value
201 given for \fInr\fR.  Values in the range 9 to 15 may be used for
202 \fInr\fR and \fInt\fR; larger values give better compression but
203 consume more kernel memory for compression dictionaries.
204 Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables
205 compression in the corresponding direction.  Use \fInobsdcomp\fR or
206 \fIbsdcomp 0\fR to disable BSD-Compress compression entirely.
207 .TP
208 .B chap-interval \fIn
209 If this option is given, pppd will rechallenge the peer every \fIn\fR
210 seconds.
211 .TP
212 .B chap-max-challenge \fIn
213 Set the maximum number of CHAP challenge transmissions to \fIn\fR
214 (default 10).
215 .TP
216 .B chap-restart \fIn
217 Set the CHAP restart interval (retransmission timeout for challenges)
218 to \fIn\fR seconds (default 3).
219 .TP
220 .B debug
221 Enables connection debugging facilities.
222 If this option is given, pppd will log the contents of all
223 control packets sent or received in a readable form.  The packets are
224 logged through syslog with facility \fIdaemon\fR and level
225 \fIdebug\fR.  This information can be directed to a file by setting up
226 /etc/syslog.conf appropriately (see syslog.conf(5)).
227 .TP
228 .B default-asyncmap
229 Disable asyncmap negotiation, forcing all control characters to be
230 escaped for both the transmit and the receive direction.
231 .TP
232 .B default-mru
233 Disable MRU [Maximum Receive Unit] negotiation.  With this option,
234 pppd will use the default MRU value of 1500 bytes for both the
235 transmit and receive direction.
236 .TP
237 .B deflate \fInr,nt
238 Request that the peer compress packets that it sends, using the
239 Deflate scheme, with a maximum window size of \fI2**nr\fR bytes, and
240 agree to compress packets sent to the peer with a maximum window size
241 of \fI2**nt\fR bytes.  If \fInt\fR is not specified, it defaults to
242 the value given for \fInr\fR.  Values in the range 8 to 15 may be used
243 for \fInr\fR and \fInt\fR; larger values give better compression but
244 consume more kernel memory for compression dictionaries.
245 Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables
246 compression in the corresponding direction.  Use \fInodeflate\fR or
247 \fIdeflate 0\fR to disable Deflate compression entirely.  (Note: pppd
248 requests Deflate compression in preference to BSD-Compress if the peer
249 can do either.)
250 .TP
251 .B demand
252 Initiate the link only on demand, i.e. when data traffic is present.
253 With this option, the remote IP address must be specified by the user
254 on the command line or in an options file.  Pppd will initially
255 configure the interface and enable it for IP traffic without
256 connecting to the peer.  When traffic is available, pppd will
257 connect to the peer and perform negotiation, authentication, etc.
258 When this is completed, pppd will commence passing data packets
259 (i.e., IP packets) across the link.
260
261 The \fIdemand\fR option implies the \fIpersist\fR option.  If this
262 behaviour is not desired, use the \fInopersist\fR option after the
263 \fIdemand\fR option.  The \fIidle\fR and \fIholdoff\fR
264 options are also useful in conjuction with the \fIdemand\fR option.
265 .TP
266 .B domain \fId
267 Append the domain name \fId\fR to the local host name for authentication
268 purposes.  For example, if gethostname() returns the name porsche, but
269 the fully qualified domain name is porsche.Quotron.COM, you could
270 specify \fIdomain Quotron.COM\fR.  Pppd would then use the name
271 \fIporsche.Quotron.COM\fR for looking up secrets in the secrets file,
272 and as the default name to send to the peer when authenticating itself
273 to the peer.  This option is privileged.
274 .TP
275 .B hide-password
276 When logging the contents of PAP packets, this option causes pppd to
277 exclude the password string from the log.
278 .TP
279 .B holdoff \fIn
280 Specifies how many seconds to wait before re-initiating the link after
281 it terminates.  This option only has any effect if the \fIpersist\fR
282 or \fIdemand\fR option is used.  The holdoff period is not applied if
283 the link was terminated because it was idle.
284 .TP
285 .B idle \fIn
286 Specifies that pppd should disconnect if the link is idle for \fIn\fR
287 seconds.  The link is idle when no data packets (i.e. IP packets) are
288 being sent or received.  Note: it is not advisable to use this option
289 with the \fIpersist\fR option without the \fIdemand\fR option.
290 If the \fBactive-filter\fR
291 option is given, data packets which are rejected by the specified
292 activity filter also count as the link being idle.
293 .TP
294 .B ipcp-accept-local
295 With this option, pppd will accept the peer's idea of our local IP
296 address, even if the local IP address was specified in an option.
297 .TP
298 .B ipcp-accept-remote
299 With this option, pppd will accept the peer's idea of its (remote) IP
300 address, even if the remote IP address was specified in an option.
301 .TP
302 .B ipcp-max-configure \fIn
303 Set the maximum number of IPCP configure-request transmissions to
304 \fIn\fR (default 10).
305 .TP
306 .B ipcp-max-failure \fIn
307 Set the maximum number of IPCP configure-NAKs returned before starting
308 to send configure-Rejects instead to \fIn\fR (default 10).
309 .TP
310 .B ipcp-max-terminate \fIn
311 Set the maximum number of IPCP terminate-request transmissions to
312 \fIn\fR (default 3).
313 .TP
314 .B ipcp-restart \fIn
315 Set the IPCP restart interval (retransmission timeout) to \fIn\fR
316 seconds (default 3).
317 .TP
318 .B ipparam \fIstring
319 Provides an extra parameter to the ip-up and ip-down scripts.  If this
320 option is given, the \fIstring\fR supplied is given as the 6th
321 parameter to those scripts.
322 .TP
323 .B ipx
324 Enable the IPXCP and IPX protocols.  This option is presently only
325 supported under Linux, and only if your kernel has been configured to
326 include IPX support.
327 .TP
328 .B ipx-network \fIn
329 Set the IPX network number in the IPXCP configure request frame to
330 \fIn\fR, a hexadecimal number (without a leading 0x).  There is no
331 valid default.  If this option is not specified, the network number is
332 obtained from the peer.  If the peer does not have the network number,
333 the IPX protocol will not be started.
334 .TP
335 .B ipx-node \fIn\fB:\fIm
336 Set the IPX node numbers. The two node numbers are separated from each
337 other with a colon character. The first number \fIn\fR is the local
338 node number. The second number \fIm\fR is the peer's node number. Each
339 node number is a hexadecimal number, at most 10 digits long. The node
340 numbers on the ipx-network must be unique. There is no valid
341 default. If this option is not specified then the node numbers are
342 obtained from the peer.
343 .TP
344 .B ipx-router-name \fI<string>
345 Set the name of the router. This is a string and is sent to the peer
346 as information data.
347 .TP
348 .B ipx-routing \fIn
349 Set the routing protocol to be received by this option. More than one
350 instance of \fIipx-routing\fR may be specified. The '\fInone\fR'
351 option (0) may be specified as the only instance of ipx-routing. The
352 values may be \fI0\fR for \fINONE\fR, \fI2\fR for \fIRIP/SAP\fR, and
353 \fI4\fR for \fINLSP\fR.
354 .TP
355 .B ipxcp-accept-local
356 Accept the peer's NAK for the node number specified in the ipx-node
357 option. If a node number was specified, and non-zero, the default is
358 to insist that the value be used. If you include this option then you
359 will permit the peer to override the entry of the node number.
360 .TP
361 .B ipxcp-accept-network
362 Accept the peer's NAK for the network number specified in the
363 ipx-network option. If a network number was specified, and non-zero, the
364 default is to insist that the value be used. If you include this
365 option then you will permit the peer to override the entry of the node
366 number.
367 .TP
368 .B ipxcp-accept-remote
369 Use the peer's network number specified in the configure request
370 frame. If a node number was specified for the peer and this option was
371 not specified, the peer will be forced to use the value which you have
372 specified.
373 .TP
374 .B ipxcp-max-configure \fIn
375 Set the maximum number of IPXCP configure request frames which the
376 system will send to \fIn\fR. The default is 10.
377 .TP
378 .B ipxcp-max-failure \fIn
379 Set the maximum number of IPXCP NAK frames which the local system will
380 send before it rejects the options. The default value is 3.
381 .TP
382 .B ipxcp-max-terminate \fIn
383 Set the maximum nuber of IPXCP terminate request frames before the
384 local system considers that the peer is not listening to them. The
385 default value is 3.
386 .TP
387 .B kdebug \fIn
388 Enable debugging code in the kernel-level PPP driver.  The argument
389 \fIn\fR is a number which is the sum of the following values: 1 to
390 enable general debug messages, 2 to request that the contents of
391 received packets be printed, and 4 to request that the contents of
392 transmitted packets be printed.  On most systems, messages printed by
393 the kernel are logged by syslog(1) to a file as directed in the
394 /etc/syslog.conf configuration file.
395 .TP
396 .B lcp-echo-failure \fIn
397 If this option is given, pppd will presume the peer to be dead
398 if \fIn\fR LCP echo-requests are sent without receiving a valid LCP
399 echo-reply.  If this happens, pppd will terminate the
400 connection.  Use of this option requires a non-zero value for the
401 \fIlcp-echo-interval\fR parameter.  This option can be used to enable
402 pppd to terminate after the physical connection has been broken
403 (e.g., the modem has hung up) in situations where no hardware modem
404 control lines are available.
405 .TP
406 .B lcp-echo-interval \fIn
407 If this option is given, pppd will send an LCP echo-request frame to
408 the peer every \fIn\fR seconds.  Normally the peer should respond to
409 the echo-request by sending an echo-reply.  This option can be used
410 with the \fIlcp-echo-failure\fR option to detect that the peer is no
411 longer connected.
412 .TP
413 .B lcp-max-configure \fIn
414 Set the maximum number of LCP configure-request transmissions to
415 \fIn\fR (default 10).
416 .TP
417 .B lcp-max-failure \fIn
418 Set the maximum number of LCP configure-NAKs returned before starting
419 to send configure-Rejects instead to \fIn\fR (default 10).
420 .TP
421 .B lcp-max-terminate \fIn
422 Set the maximum number of LCP terminate-request transmissions to
423 \fIn\fR (default 3).
424 .TP
425 .B lcp-restart \fIn
426 Set the LCP restart interval (retransmission timeout) to \fIn\fR
427 seconds (default 3).
428 .TP
429 .B linkname \fIname\fR
430 Sets the logical name of the link to \fIname\fR.  Pppd will create a
431 file named \fBppp-\fIname\fB.pid\fR in /var/run (or /etc/ppp on some
432 systems) containing its process ID.  This can be useful in determining
433 which instance of pppd is responsible for the link to a given peer
434 system.  This is a privileged option.
435 .TP
436 .B local
437 Don't use the modem control lines.  With this option, pppd will ignore
438 the state of the CD (Carrier Detect) signal from the modem and will
439 not change the state of the DTR (Data Terminal Ready) signal.
440 .TP
441 .B logfd \fIn
442 Send log messages to file descriptor \fIn\fR.  Pppd will send log
443 messages to at most one file or file descriptor (as well as sending
444 the log messages to syslog), so this option and the \fBlogfile\fR
445 option are mutually exclusive.  The default is for pppd to send log
446 messages to stdout (file descriptor 1), unless the serial port is
447 already open on stdout.
448 .TP
449 .B logfile \fIfilename
450 Append log messages to the file \fIfilename\fR (as well as sending the
451 log messages to syslog).  The file is opened with the privileges of
452 the user who invoked pppd, in append mode.
453 .TP
454 .B login
455 Use the system password database for authenticating the peer using
456 PAP, and record the user in the system wtmp file.  Note that the peer
457 must have an entry in the /etc/ppp/pap-secrets file as well as the
458 system password database to be allowed access.
459 .TP
460 .B maxconnect \fIn
461 Terminate the connection when it has been available for network
462 traffic for \fIn\fR seconds (i.e. \fIn\fR seconds after the first
463 network control protocol comes up).
464 .TP
465 .B maxfail \fIn
466 Terminate after \fIn\fR consecutive failed connection attempts.  A
467 value of 0 means no limit.  The default value is 10.
468 .TP
469 .B modem
470 Use the modem control lines.  This option is the default.  With this
471 option, pppd will wait for the CD (Carrier Detect) signal from the
472 modem to be asserted when opening the serial device (unless a connect
473 script is specified), and it will drop the DTR (Data Terminal Ready)
474 signal briefly when the connection is terminated and before executing
475 the connect script.  On Ultrix, this option implies hardware flow
476 control, as for the \fIcrtscts\fR option.
477 .TP
478 .B ms-dns \fI<addr>
479 If pppd is acting as a server for Microsoft Windows clients, this
480 option allows pppd to supply one or two DNS (Domain Name Server)
481 addresses to the clients.  The first instance of this option specifies
482 the primary DNS address; the second instance (if given) specifies the
483 secondary DNS address.  (This option was present in some older
484 versions of pppd under the name \fBdns-addr\fR.)
485 .TP
486 .B ms-wins \fI<addr>
487 If pppd is acting as a server for Microsoft Windows or "Samba"
488 clients, this option allows pppd to supply one or two WINS (Windows
489 Internet Name Services) server addresses to the clients.  The first
490 instance of this option specifies the primary WINS address; the second
491 instance (if given) specifies the secondary WINS address.
492 .TP
493 .B name \fIname
494 Set the name of the local system for authentication purposes to
495 \fIname\fR.  This is a privileged option.  With this option, pppd will
496 use lines in the secrets files which have \fIname\fR as the second
497 field when looking for a secret to use in authenticating the peer.  In
498 addition, unless overridden with the \fIuser\fR option, \fIname\fR
499 will be used as the name to send to the peer when authenticating the
500 local system to the peer.  (Note that pppd does not append the domain
501 name to \fIname\fR.)
502 .TP
503 .B netmask \fIn
504 Set the interface netmask to \fIn\fR, a 32 bit netmask in "decimal dot"
505 notation (e.g. 255.255.255.0).  If this option is given, the value
506 specified is ORed with the default netmask.  The default netmask is
507 chosen based on the negotiated remote IP address; it is the
508 appropriate network mask for the class of the remote IP address, ORed
509 with the netmasks for any non point-to-point network interfaces in the
510 system which are on the same network.  (Note: on some platforms, pppd
511 will always use 255.255.255.255 for the netmask, if that is the only
512 appropriate value for a point-to-point interface.)
513 .TP
514 .B noaccomp
515 Disable Address/Control compression in both directions (send and
516 receive).
517 .TP
518 .B noauth
519 Do not require the peer to authenticate itself.  This option is
520 privileged.
521 .TP
522 .B nobsdcomp
523 Disables BSD-Compress compression; \fBpppd\fR will not request or
524 agree to compress packets using the BSD-Compress scheme.
525 .TP
526 .B noccp
527 Disable CCP (Compression Control Protocol) negotiation.  This option
528 should only be required if the peer is buggy and gets confused by
529 requests from pppd for CCP negotiation.
530 .TP
531 .B nocrtscts
532 Disable hardware flow control (i.e. RTS/CTS) on the serial port.
533 If neither the \fIcrtscts\fR nor the \fInocrtscts\fR nor the
534 \fIcdtrcts\fR nor the \fInodtrcts\fR option is given, the hardware
535 flow control setting for the serial port is left unchanged.
536 .TP
537 .B nodtrcts
538 This option is a synonym for \fInocrtscts\fR. Either of these options will
539 disable both forms of hardware flow control.
540 .TP
541 .B nodefaultroute
542 Disable the \fIdefaultroute\fR option.  The system administrator who
543 wishes to prevent users from creating default routes with pppd
544 can do so by placing this option in the /etc/ppp/options file.
545 .TP
546 .B nodeflate
547 Disables Deflate compression; pppd will not request or agree to
548 compress packets using the Deflate scheme.
549 .TP
550 .B nodetach
551 Don't detach from the controlling terminal.  Without this option, if a
552 serial device other than the terminal on the standard input is
553 specified, pppd will fork to become a background process.
554 .TP
555 .B noip
556 Disable IPCP negotiation and IP communication.  This option should
557 only be required if the peer is buggy and gets confused by requests
558 from pppd for IPCP negotiation.
559 .TP
560 .B noipdefault
561 Disables the default behaviour when no local IP address is specified,
562 which is to determine (if possible) the local IP address from the
563 hostname.  With this option, the peer will have to supply the local IP
564 address during IPCP negotiation (unless it specified explicitly on the
565 command line or in an options file).
566 .TP
567 .B noipx
568 Disable the IPXCP and IPX protocols.  This option should only be
569 required if the peer is buggy and gets confused by requests from pppd
570 for IPXCP negotiation.
571 .TP
572 .B nolog
573 Do not send log messages to a file or file descriptor.  This option
574 cancels the \fBlogfd\fR and \fBlogfile\fR options.
575 .B nomagic
576 Disable magic number negotiation.  With this option, pppd cannot
577 detect a looped-back line.  This option should only be needed if the
578 peer is buggy.
579 .TP
580 .B nopcomp
581 Disable protocol field compression negotiation in both the receive and
582 the transmit direction.
583 .TP
584 .B nopersist
585 Exit once a connection has been made and terminated.  This is the
586 default unless the \fIpersist\fR or \fIdemand\fR option has been
587 specified.
588 .TP
589 .B nopredictor1
590 Do not accept or agree to Predictor-1 compression.
591 .TP
592 .B noproxyarp
593 Disable the \fIproxyarp\fR option.  The system administrator who
594 wishes to prevent users from creating proxy ARP entries with pppd can
595 do so by placing this option in the /etc/ppp/options file.
596 .TP
597 .B notty
598 Normally, pppd requires a terminal device.  With this option, pppd
599 will allocate itself a pseudo-tty master/slave pair and use the slave
600 as its terminal device.  Pppd will create a child process to act as a
601 `character shunt' to transfer characters between the pseudo-tty master
602 and its standard input and output.  Thus pppd will transmit characters
603 on its standard output and receive characters on its standard input
604 even if they are not terminal devices.  This option increases the
605 latency and CPU overhead of transferring data over the ppp interface
606 as all of the characters sent and received must flow through the
607 character shunt process.  An explicit device name may not be given if
608 this option is used.
609 .TP
610 .B novj
611 Disable Van Jacobson style TCP/IP header compression in both the
612 transmit and the receive direction.
613 .TP
614 .B novjccomp
615 Disable the connection-ID compression option in Van Jacobson style
616 TCP/IP header compression.  With this option, pppd will not omit the
617 connection-ID byte from Van Jacobson compressed TCP/IP headers, nor
618 ask the peer to do so.
619 .TP
620 .B papcrypt
621 Indicates that all secrets in the /etc/ppp/pap-secrets file which are
622 used for checking the identity of the peer are encrypted, and thus
623 pppd should not accept a password which, before encryption, is
624 identical to the secret from the /etc/ppp/pap-secrets file.
625 .TP
626 .B pap-max-authreq \fIn
627 Set the maximum number of PAP authenticate-request transmissions to
628 \fIn\fR (default 10).
629 .TP
630 .B pap-restart \fIn
631 Set the PAP restart interval (retransmission timeout) to \fIn\fR
632 seconds (default 3).
633 .TP
634 .B pap-timeout \fIn
635 Set the maximum time that pppd will wait for the peer to authenticate
636 itself with PAP to \fIn\fR seconds (0 means no limit).
637 .TP
638 .B pass-filter \fIfilter-expression
639 Specifies a packet filter to applied to data packets being sent or
640 received to determine which packets should be allowed to pass.
641 Packets which are rejected by the filter are silently discarded.  This
642 option can be used to prevent specific network daemons (such as
643 routed) using up link bandwidth, or to provide a basic firewall
644 capability.
645 The \fIfilter-expression\fR syntax is as described for tcpdump(1),
646 except that qualifiers which are inappropriate for a PPP link, such as
647 \fBether\fR and \fBarp\fR, are not permitted.  Generally the filter
648 expression should be enclosed in single-quotes to prevent whitespace
649 in the expression from being interpreted by the shell.  Note that it
650 is possible to apply different constraints to incoming and outgoing
651 packets using the \fBinbound\fR and \fBoutbound\fR qualifiers. This
652 option is currently only available under NetBSD, and then only if both
653 the kernel and pppd were compiled with PPP_FILTER defined.
654 .TP
655 .B persist
656 Do not exit after a connection is terminated; instead try to reopen
657 the connection.
658 .TP
659 .B predictor1
660 Request that the peer compress frames that it sends using Predictor-1
661 compression, and agree to compress transmitted frames with Predictor-1
662 if requested.  This option has no effect unless the kernel driver
663 supports Predictor-1 compression.
664 .TP
665 .B privgroup \fIgroup-name
666 Allows members of group \fIgroup-name\fR to use privileged options.
667 This is a privileged option.  Use of this option requires care as
668 there is no guarantee that members of \fIgroup-name\fR cannot use pppd
669 to become root themselves.  Consider it equivalent to putting the
670 members of \fIgroup-name\fR in the kmem or disk group.
671 .TP
672 .B proxyarp
673 Add an entry to this system's ARP [Address Resolution Protocol] table
674 with the IP address of the peer and the Ethernet address of this
675 system.  This will have the effect of making the peer appear to other
676 systems to be on the local ethernet.
677 .TP
678 .B pty \fIscript
679 Specifies that the command \fIscript\fR is to be used to communicate
680 rather than a specific terminal device.  Pppd will allocate itself a
681 pseudo-tty master/slave pair and use the slave as its terminal
682 device.  The \fIscript\fR will be run in a child process with the
683 pseudo-tty master as its standard input and output.  An explicit
684 device name may not be given if this option is used.
685 .TP
686 .B receive-all
687 With this option, pppd will accept all control characters from the
688 peer, including those marked in the receive asyncmap.  Without this
689 option, pppd will discard those characters as specified in RFC1662.
690 This option should only be needed if the peer is buggy.
691 .TP
692 .B record \fIfilename
693 Specifies that pppd should record all characters sent and received to
694 a file named \fIfilename\fR.  This file is opened in append mode,
695 using the user's user-ID and permissions.  This option is implemented
696 using a pseudo-tty and a process to transfer characters between the
697 pseudo-tty and the real serial device, so it will increase the latency
698 and CPU overhead of transferring data over the ppp interface.  The
699 characters are stored in a tagged format with timestamps, which can be
700 displayed in readable form using the pppdump(8) program.
701 .TP
702 .B remotename \fIname
703 Set the assumed name of the remote system for authentication purposes
704 to \fIname\fR.
705 .TP
706 .B refuse-chap
707 With this option, pppd will not agree to authenticate itself to the
708 peer using CHAP.
709 .TP
710 .B refuse-pap
711 With this option, pppd will not agree to authenticate itself to the
712 peer using PAP.
713 .TP
714 .B require-chap
715 Require the peer to authenticate itself using CHAP [Challenge
716 Handshake Authentication Protocol] authentication.
717 .TP
718 .B require-pap
719 Require the peer to authenticate itself using PAP [Password
720 Authentication Protocol] authentication.
721 .TP
722 .B silent
723 With this option, pppd will not transmit LCP packets to initiate a
724 connection until a valid LCP packet is received from the peer (as for
725 the `passive' option with ancient versions of pppd).
726 .TP
727 .B sync
728 Use synchronous HDLC serial encoding instead of asynchronous.
729 The device used by pppd with this option must have sync support.
730 Currently supports Microgate SyncLink adapters
731 under Linux and FreeBSD 2.2.8 and later.
732 .TP
733 .B updetach
734 With this option, pppd will detach from its controlling terminal once
735 it has successfully established the ppp connection (to the point where
736 the first network control protocol, usually the IP control protocol,
737 has come up).
738 .TP
739 .B usehostname
740 Enforce the use of the hostname (with domain name appended, if given)
741 as the name of the local system for authentication purposes (overrides
742 the \fIname\fR option).  This option is not normally needed since the
743 \fIname\fR option is privileged.
744 .TP
745 .B usepeerdns
746 Ask the peer for up to 2 DNS server addresses.  The addresses supplied
747 by the peer (if any) are passed to the /etc/ppp/ip-up script in the
748 environment variables DNS1 and DNS2.
749 .TP
750 .B user \fIname
751 Sets the name used for authenticating the local system to the peer to
752 \fIname\fR.
753 .TP
754 .B vj-max-slots \fIn
755 Sets the number of connection slots to be used by the Van Jacobson
756 TCP/IP header compression and decompression code to \fIn\fR, which
757 must be between 2 and 16 (inclusive).
758 .TP
759 .B welcome \fIscript
760 Run the executable or shell command specified by \fIscript\fR before
761 initiating PPP negotiation, after the connect script (if any) has
762 completed.  A value for this option from a privileged source cannot be
763 overridden by a non-privileged user.
764 .TP
765 .B xonxoff
766 Use software flow control (i.e. XON/XOFF) to control the flow of data on
767 the serial port.
768 .SH OPTIONS FILES
769 Options can be taken from files as well as the command line.  Pppd
770 reads options from the files /etc/ppp/options, ~/.ppprc and
771 /etc/ppp/options.\fIttyname\fR (in that order) before processing the
772 options on the command line.  (In fact, the command-line options are
773 scanned to find the terminal name before the options.\fIttyname\fR
774 file is read.)  In forming the name of the options.\fIttyname\fR file,
775 the initial /dev/ is removed from the terminal name, and any remaining
776 / characters are replaced with dots.
777 .PP
778 An options file is parsed into a series of words, delimited by
779 whitespace.  Whitespace can be included in a word by enclosing the
780 word in double-quotes (").  A backslash (\\) quotes the following character.
781 A hash (#) starts a comment, which continues until the end of the
782 line.  There is no restriction on using the \fIfile\fR or \fIcall\fR
783 options within an options file.
784 .SH SECURITY
785 .I pppd
786 provides system administrators with sufficient access control that PPP
787 access to a server machine can be provided to legitimate users without
788 fear of compromising the security of the server or the network it's
789 on.  This control is provided through restrictions on which IP
790 addresses the peer may use, based on its authenticated identity (if
791 any), and through restrictions on which options a non-privileged user
792 may use.  Several of pppd's options are privileged, in particular
793 those which permit potentially insecure configurations; these options
794 are only accepted in files which are under the control of the system
795 administrator, or if pppd is being run by root.
796 .PP
797 The default behaviour of pppd is to allow an unauthenticated peer to
798 use a given IP address only if the system does not already have a
799 route to that IP address.  For example, a system with a
800 permanent connection to the wider internet will normally have a
801 default route, and thus all peers will have to authenticate themselves
802 in order to set up a connection.  On such a system, the \fIauth\fR
803 option is the default.  On the other hand, a system where the
804 PPP link is the only connection to the internet will not normally have
805 a default route, so the peer will be able to use almost any IP address
806 without authenticating itself.
807 .PP
808 As indicated above, some security-sensitive options are privileged,
809 which means that they may not be used by an ordinary non-privileged
810 user running a setuid-root pppd, either on the command line, in the
811 user's ~/.ppprc file, or in an options file read using the \fIfile\fR
812 option.  Privileged options may be used in /etc/ppp/options file or in
813 an options file read using the \fIcall\fR option.  If pppd is being
814 run by the root user, privileged options can be used without
815 restriction.
816 .PP
817 When opening the device, pppd uses either the invoking user's user ID
818 or the root UID (that is, 0), depending on whether the device name was
819 specified by the user or the system administrator.  If the device name
820 comes from a privileged source, that is, /etc/ppp/options or an
821 options file read using the \fIcall\fR option, pppd uses full root
822 privileges when opening the device.  Thus, by creating an appropriate
823 file under /etc/ppp/peers, the system administrator can allow users to
824 establish a ppp connection via a device which they would not normally
825 have permission to access.  Otherwise pppd uses the invoking user's
826 real UID when opening the device.
827 .SH AUTHENTICATION
828 Authentication is the process whereby one peer convinces the other of
829 its identity.  This involves the first peer sending its name to the
830 other, together with some kind of secret information which could only
831 come from the genuine authorized user of that name.  In such an
832 exchange, we will call the first peer the "client" and the other the
833 "server".  The client has a name by which it identifies itself to the
834 server, and the server also has a name by which it identifies itself
835 to the client.  Generally the genuine client shares some secret (or
836 password) with the server, and authenticates itself by proving that it
837 knows that secret.  Very often, the names used for authentication
838 correspond to the internet hostnames of the peers, but this is not
839 essential.
840 .LP
841 At present, pppd supports two authentication protocols: the Password
842 Authentication Protocol (PAP) and the Challenge Handshake
843 Authentication Protocol (CHAP).  PAP involves the client sending its
844 name and a cleartext password to the server to authenticate itself.
845 In contrast, the server initiates the CHAP authentication exchange by
846 sending a challenge to the client (the challenge packet includes the
847 server's name).  The client must respond with a response which
848 includes its name plus a hash value derived from the shared secret and
849 the challenge, in order to prove that it knows the secret.
850 .LP
851 The PPP protocol, being symmetrical, allows both peers to require the
852 other to authenticate itself.  In that case, two separate and
853 independent authentication exchanges will occur.  The two exchanges
854 could use different authentication protocols, and in principle,
855 different names could be used in the two exchanges.
856 .LP
857 The default behaviour of pppd is to agree to authenticate if
858 requested, and to not require authentication from the peer.  However,
859 pppd will not agree to authenticate itself with a particular protocol
860 if it has no secrets which could be used to do so.
861 .LP
862 Pppd stores secrets for use in authentication in secrets
863 files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP).
864 Both secrets files have the same format.  The secrets files can
865 contain secrets for pppd to use in authenticating itself to other
866 systems, as well as secrets for pppd to use when authenticating other
867 systems to itself.
868 .LP
869 Each line in a secrets file contains one secret.  A given secret is
870 specific to a particular combination of client and server - it can
871 only be used by that client to authenticate itself to that server.
872 Thus each line in a secrets file has at least 3 fields: the name of
873 the client, the name of the server, and the secret.  These fields may
874 be followed by a list of the IP addresses that the specified client
875 may use when connecting to the specified server.
876 .LP
877 A secrets file is parsed into words as for a options file, so the
878 client name, server name and secrets fields must each be one word,
879 with any embedded spaces or other special characters quoted or
880 escaped.  Any following words on the same line are taken to be a list
881 of acceptable IP addresses for that client.  If there are only 3 words
882 on the line, or if the first word is "-", then all IP addresses are
883 disallowed.  To allow any address, use "*".
884 A word starting with "!" indicates that the
885 specified address is \fInot\fR acceptable.  An address may be followed
886 by "/" and a number \fIn\fR, to indicate a whole subnet, i.e. all
887 addresses which have the same value in the most significant \fIn\fR
888 bits.  Note that case is significant in the client and server names
889 and in the secret.
890 .LP
891 If the secret starts with an `@', what follows is assumed to be the
892 name of a file from which to read the secret.  A "*" as the client or
893 server name matches any name.  When selecting a secret, pppd takes the
894 best match, i.e.  the match with the fewest wildcards.
895 .LP
896 Thus a secrets file contains both secrets for use in authenticating
897 other hosts, plus secrets which we use for authenticating ourselves to
898 others.  When pppd is authenticating the peer (checking the peer's
899 identity), it chooses a secret with the peer's name in the first
900 field and the name of the local system in the second field.  The
901 name of the local system defaults to the hostname, with the domain
902 name appended if the \fIdomain\fR option is used.  This default can be
903 overridden with the \fIname\fR option, except when the
904 \fIusehostname\fR option is used.
905 .LP
906 When pppd is choosing a secret to use in authenticating itself to the
907 peer, it first determines what name it is going to use to identify
908 itself to the peer.  This name can be specified by the user with the
909 \fIuser\fR option.  If this option is not used, the name defaults to
910 the name of the local system, determined as described in the previous
911 paragraph.  Then pppd looks for a secret with this name in the first
912 field and the peer's name in the second field.  Pppd will know the
913 name of the peer if CHAP authentication is being used, because the
914 peer will have sent it in the challenge packet.  However, if PAP is being
915 used, pppd will have to determine the peer's name from the options
916 specified by the user.  The user can specify the peer's name directly
917 with the \fIremotename\fR option.  Otherwise, if the remote IP address
918 was specified by a name (rather than in numeric form), that name will
919 be used as the peer's name.  Failing that, pppd will use the null
920 string as the peer's name.
921 .LP
922 When authenticating the peer with PAP, the supplied password is first
923 compared with the secret from the secrets file.  If the password
924 doesn't match the secret, the password is encrypted using crypt() and
925 checked against the secret again.  Thus secrets for authenticating the
926 peer can be stored in encrypted form if desired.  If the
927 \fIpapcrypt\fR option is given, the first (unencrypted) comparison is
928 omitted, for better security.
929 .LP
930 Furthermore, if the \fIlogin\fR option was specified, the username and
931 password are also checked against the system password database.  Thus,
932 the system administrator can set up the pap-secrets file to allow PPP
933 access only to certain users, and to restrict the set of IP addresses
934 that each user can use.  Typically, when using the \fIlogin\fR option,
935 the secret in /etc/ppp/pap-secrets would be "", which will match any
936 password supplied by the peer.  This avoids the need to have the same
937 secret in two places.
938 .LP
939 Authentication must be satisfactorily completed before IPCP (or any
940 other Network Control Protocol) can be started.  If the peer is
941 required to authenticate itself, and fails to do so, pppd will
942 terminated the link (by closing LCP).  If IPCP negotiates an
943 unacceptable IP address for the remote host, IPCP will be closed.  IP
944 packets can only be sent or received when IPCP is open.
945 .LP
946 In some cases it is desirable to allow some hosts which can't
947 authenticate themselves to connect and use one of a restricted set of
948 IP addresses, even when the local host generally requires
949 authentication.  If the peer refuses to authenticate itself when
950 requested, pppd takes that as equivalent to authenticating with PAP
951 using the empty string for the username and password.  Thus, by adding
952 a line to the pap-secrets file which specifies the empty string for
953 the client and password, it is possible to allow restricted access to
954 hosts which refuse to authenticate themselves.
955 .SH ROUTING
956 .LP
957 When IPCP negotiation is completed successfully, pppd will inform the
958 kernel of the local and remote IP addresses for the ppp interface.
959 This is sufficient to create a host route to the remote end of the
960 link, which will enable the peers to exchange IP packets.
961 Communication with other machines generally requires further
962 modification to routing tables and/or ARP (Address Resolution
963 Protocol) tables.  In most cases the \fIdefaultroute\fR and/or
964 \fIproxyarp\fR options are sufficient for this, but in some cases
965 further intervention is required.  The /etc/ppp/ip-up script can be
966 used for this.
967 .LP
968 Sometimes it is desirable to add a default route through the remote
969 host, as in the case of a machine whose only connection to the
970 Internet is through the ppp interface.  The \fIdefaultroute\fR option
971 causes pppd to create such a default route when IPCP comes up, and
972 delete it when the link is terminated.
973 .LP
974 In some cases it is desirable to use proxy ARP, for example on a
975 server machine connected to a LAN, in order to allow other hosts to
976 communicate with the remote host.  The \fIproxyarp\fR option causes
977 pppd to look for a network interface on the same subnet as the remote
978 host (an interface supporting broadcast and ARP, which is up and not a
979 point-to-point or loopback interface).  If found, pppd creates a
980 permanent, published ARP entry with the IP address of the remote host
981 and the hardware address of the network interface found.
982 .LP
983 When the \fIdemand\fR option is used, the interface IP addresses have
984 already been set at the point when IPCP comes up.  If pppd has not
985 been able to negotiate the same addresses that it used to configure
986 the interface (for example when the peer is an ISP that uses dynamic
987 IP address assignment), pppd has to change the interface IP addresses
988 to the negotiated addresses.  This may disrupt existing connections,
989 and the use of demand dialling with peers that do dynamic IP address
990 assignment is not recommended.
991 .SH EXAMPLES
992 .LP
993 The following examples assume that the /etc/ppp/options file contains
994 the \fIauth\fR option (as in the default /etc/ppp/options file in the
995 ppp distribution).
996 .LP
997 Probably the most common use of pppd is to dial out to an ISP.  This
998 can be done with a command such as
999 .IP
1000 pppd call isp
1001 .LP
1002 where the /etc/ppp/peers/isp file is set up by the system
1003 administrator to contain something like this:
1004 .IP
1005 ttyS0 19200 crtscts
1006 .br
1007 connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp'
1008 .br
1009 noauth
1010 .LP
1011 In this example, we are using chat to dial the ISP's modem and go
1012 through any logon sequence required.  The /etc/ppp/chat-isp file
1013 contains the script used by chat; it could for example contain
1014 something like this:
1015 .IP
1016 ABORT "NO CARRIER"
1017 .br
1018 ABORT "NO DIALTONE"
1019 .br
1020 ABORT "ERROR"
1021 .br
1022 ABORT "NO ANSWER"
1023 .br
1024 ABORT "BUSY"
1025 .br
1026 ABORT "Username/Password Incorrect"
1027 .br
1028 "" "at"
1029 .br
1030 OK "at&d0&c1"
1031 .br
1032 OK "atdt2468135"
1033 .br
1034 "name:" "^Umyuserid"
1035 .br
1036 "word:" "\\qmypassword"
1037 .br
1038 "ispts" "\\q^Uppp"
1039 .br
1040 "~-^Uppp-~"
1041 .LP
1042 See the chat(8) man page for details of chat scripts.
1043 .LP
1044 Pppd can also be used to provide a dial-in ppp service for users.  If
1045 the users already have login accounts, the simplest way to set up the
1046 ppp service is to let the users log in to their accounts and run pppd
1047 (installed setuid-root) with a command such as
1048 .IP
1049 pppd proxyarp
1050 .LP
1051 To allow a user to use the PPP facilities, you need to allocate an IP
1052 address for that user's machine and create an entry in
1053 /etc/ppp/pap-secrets or /etc/ppp/chap-secrets (depending on which
1054 authentication method the PPP implementation on the user's machine
1055 supports), so that the user's
1056 machine can authenticate itself.  For example, if Joe has a machine
1057 called "joespc" which is to be allowed to dial in to the machine
1058 called "server" and use the IP address joespc.my.net, you would add an
1059 entry like this to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets:
1060 .IP
1061 joespc  server  "joe's secret"  joespc.my.net
1062 .LP
1063 Alternatively, you can create a username called (for example) "ppp",
1064 whose login shell is pppd and whose home directory is /etc/ppp.
1065 Options to be used when pppd is run this way can be put in
1066 /etc/ppp/.ppprc.
1067 .LP
1068 If your serial connection is any more complicated than a piece of
1069 wire, you may need to arrange for some control characters to be
1070 escaped.  In particular, it is often useful to escape XON (^Q) and
1071 XOFF (^S), using \fIasyncmap a0000\fR.  If the path includes a telnet,
1072 you probably should escape ^] as well (\fIasyncmap 200a0000\fR).  If
1073 the path includes an rlogin, you will need to use the \fIescape ff\fR
1074 option on the end which is running the rlogin client, since many
1075 rlogin implementations are not transparent; they will remove the
1076 sequence [0xff, 0xff, 0x73, 0x73, followed by any 8 bytes] from the
1077 stream.
1078 .SH DIAGNOSTICS
1079 .LP
1080 Messages are sent to the syslog daemon using facility LOG_DAEMON.
1081 (This can be overriden by recompiling pppd with the macro
1082 LOG_PPP defined as the desired facility.)  In order to see the error
1083 and debug messages, you will need to edit your /etc/syslog.conf file
1084 to direct the messages to the desired output device or file.
1085 .LP
1086 The \fIdebug\fR option causes the contents of all control packets sent
1087 or received to be logged, that is, all LCP, PAP, CHAP or IPCP packets.
1088 This can be useful if the PPP negotiation does not succeed or if
1089 authentication fails.
1090 If debugging is enabled at compile time, the \fIdebug\fR option also
1091 causes other debugging messages to be logged.
1092 .LP
1093 Debugging can also be enabled or disabled by sending a SIGUSR1 signal
1094 to the pppd process.  This signal acts as a toggle.
1095 .SH EXIT STATUS
1096 The exit status of pppd is set to indicate whether any error was
1097 detected, or the reason for the link being terminated.  The values
1098 used are:
1099 .TP
1100 .B 0
1101 Pppd has detached, or otherwise the connection was successfully
1102 established and terminated at the peer's request.
1103 .TP
1104 .B 1
1105 An immediately fatal error of some kind occurred, such as an essential
1106 system call failing, or running out of virtual memory.
1107 .TP
1108 .B 2
1109 An error was detected in processing the options given, such as two
1110 mutually exclusive options being used.
1111 .TP
1112 .B 3
1113 Pppd is not setuid-root and the invoking user is not root.
1114 .TP
1115 .B 4
1116 The kernel does not support PPP, for example, the PPP kernel driver is
1117 not included or cannot be loaded.
1118 .TP
1119 .B 5
1120 Pppd terminated because it was sent a SIGINT, SIGTERM or SIGHUP
1121 signal.
1122 .TP
1123 .B 6
1124 The serial port could not be locked.
1125 .TP
1126 .B 7
1127 The serial port could not be opened.
1128 .TP
1129 .B 8
1130 The connect script failed (returned a non-zero exit status).
1131 .TP
1132 .B 9
1133 The command specified as the argument to the \fIpty\fR option could
1134 not be run.
1135 .TP
1136 .B 10
1137 The PPP negotiation failed, that is, it didn't reach the point where
1138 at least one network protocol (e.g. IP) was running.
1139 .TP
1140 .B 11
1141 The peer system failed (or refused) to authenticate itself.
1142 .TP
1143 .B 12
1144 The link was established successfully and terminated because it was
1145 idle.
1146 .TP
1147 .B 13
1148 The link was established successfully and terminated because the
1149 connect time limit was reached.
1150 .TP
1151 .B 14
1152 Callback was negotiated and an incoming call should arrive shortly.
1153 .TP
1154 .B 15
1155 The link was terminated because the peer is not responding to echo
1156 requests.
1157 .TP
1158 .B 16
1159 The link was terminated by the modem hanging up.
1160 .TP
1161 .B 17
1162 The PPP negotiation failed because serial loopback was detected.
1163 .TP
1164 .B 18
1165 The init script failed (returned a non-zero exit status).
1166 .TP
1167 .B 19
1168 We failed to authenticate ourselves to the peer.
1169 .SH SCRIPTS
1170 Pppd invokes scripts at various stages in its processing which can be
1171 used to perform site-specific ancillary processing.  These scripts are
1172 usually shell scripts, but could be executable code files instead.
1173 Pppd does not wait for the scripts to finish.  The scripts are
1174 executed as root (with the real and effective user-id set to 0), so
1175 that they can do things such as update routing tables or run
1176 privileged daemons.  Be careful that the contents of these scripts do
1177 not compromise your system's security.  Pppd runs the scripts with
1178 standard input, output and error redirected to /dev/null, and with an
1179 environment that is empty except for some environment variables that
1180 give information about the link.  The environment variables that pppd
1181 sets are:
1182 .TP
1183 .B DEVICE
1184 The name of the serial tty device being used.
1185 .TP
1186 .B IFNAME
1187 The name of the network interface being used.
1188 .TP
1189 .B IPLOCAL
1190 The IP address for the local end of the link.  This is only set when
1191 IPCP has come up.
1192 .TP
1193 .B IPREMOTE
1194 The IP address for the remote end of the link.  This is only set when
1195 IPCP has come up.
1196 .TP
1197 .B PEERNAME
1198 The authenticated name of the peer.  This is only set if the peer
1199 authenticates itself.
1200 .TP
1201 .B SPEED
1202 The baud rate of the tty device.
1203 .TP
1204 .B ORIG_UID
1205 The real user-id of the user who invoked pppd.
1206 .TP
1207 .B PPPLOGNAME
1208 The username of the real user-id that invoked pppd. This is always set.
1209 .P
1210 For the ip-down and auth-down scripts, pppd also sets the following
1211 variables giving statistics for the connection:
1212 .TP
1213 .B CONNECT_TIME
1214 The number of seconds from when the PPP negotiation started until the
1215 connection was terminated.
1216 .TP
1217 .B BYTES_SENT
1218 The number of bytes sent (at the level of the serial port) during the
1219 connection.
1220 .TP
1221 .B BYTES_RCVD
1222 The number of bytes received (at the level of the serial port) during
1223 the connection.
1224 .TP
1225 .B LINKNAME
1226 The logical name of the link, set with the \fIlinkname\fR option.
1227 .P
1228 Pppd invokes the following scripts, if they exist.  It is not an error
1229 if they don't exist.
1230 .TP
1231 .B /etc/ppp/auth-up
1232 A program or script which is executed after the remote system
1233 successfully authenticates itself.  It is executed with the parameters
1234 .IP
1235 \fIinterface-name peer-name user-name tty-device speed\fR
1236 .IP
1237 Note that this script is not executed if the peer doesn't authenticate
1238 itself, for example when the \fInoauth\fR option is used.
1239 .TP
1240 .B /etc/ppp/auth-down
1241 A program or script which is executed when the link goes down, if
1242 /etc/ppp/auth-up was previously executed.  It is executed in the same
1243 manner with the same parameters as /etc/ppp/auth-up.
1244 .TP
1245 .B /etc/ppp/ip-up
1246 A program or script which is executed when the link is available for
1247 sending and receiving IP packets (that is, IPCP has come up).  It is
1248 executed with the parameters
1249 .IP
1250 \fIinterface-name tty-device speed local-IP-address
1251 remote-IP-address ipparam\fR
1252 .TP
1253 .B /etc/ppp/ip-down
1254 A program or script which is executed when the link is no longer
1255 available for sending and receiving IP packets.  This script can be
1256 used for undoing the effects of the /etc/ppp/ip-up script.  It is
1257 invoked in the same manner and with the same parameters as the ip-up
1258 script.
1259 .TP
1260 .B /etc/ppp/ipx-up
1261 A program or script which is executed when the link is available for
1262 sending and receiving IPX packets (that is, IPXCP has come up).  It is
1263 executed with the parameters
1264 .IP
1265 \fIinterface-name tty-device speed network-number local-IPX-node-address
1266 remote-IPX-node-address local-IPX-routing-protocol remote-IPX-routing-protocol
1267 local-IPX-router-name remote-IPX-router-name ipparam pppd-pid\fR 
1268 .IP
1269 The local-IPX-routing-protocol and remote-IPX-routing-protocol field
1270 may be one of the following:
1271 .IP
1272 NONE      to indicate that there is no routing protocol
1273 .br
1274 RIP       to indicate that RIP/SAP should be used
1275 .br
1276 NLSP      to indicate that Novell NLSP should be used
1277 .br
1278 RIP NLSP  to indicate that both RIP/SAP and NLSP should be used
1279 .TP
1280 .B /etc/ppp/ipx-down
1281 A program or script which is executed when the link is no longer
1282 available for sending and receiving IPX packets.  This script can be
1283 used for undoing the effects of the /etc/ppp/ipx-up script.  It is
1284 invoked in the same manner and with the same parameters as the ipx-up
1285 script.
1286 .SH FILES
1287 .TP
1288 .B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)
1289 Process-ID for pppd process on ppp interface unit \fIn\fR.
1290 .TP
1291 .B /var/run/ppp-\fIname\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp-\fIname\fB.pid \fR(others)
1292 Process-ID for pppd process for logical link \fIname\fR (see the
1293 \fIlinkname\fR option).
1294 .TP
1295 .B /etc/ppp/pap-secrets
1296 Usernames, passwords and IP addresses for PAP authentication.  This
1297 file should be owned by root and not readable or writable by any other
1298 user.  Pppd will log a warning if this is not the case.
1299 .TP
1300 .B /etc/ppp/chap-secrets
1301 Names, secrets and IP addresses for CHAP authentication.  As for
1302 /etc/ppp/pap-secrets, this file should be owned by root and not
1303 readable or writable by any other user.  Pppd will log a warning if
1304 this is not the case.
1305 .TP
1306 .B /etc/ppp/options
1307 System default options for pppd, read before user default options or
1308 command-line options.
1309 .TP
1310 .B ~/.ppprc
1311 User default options, read before /etc/ppp/options.\fIttyname\fR.
1312 .TP
1313 .B /etc/ppp/options.\fIttyname
1314 System default options for the serial port being used, read after
1315 ~/.ppprc.  In forming the \fIttyname\fR part of this
1316 filename, an initial /dev/ is stripped from the port name (if
1317 present), and any slashes in the remaining part are converted to
1318 dots.
1319 .TP
1320 .B /etc/ppp/peers
1321 A directory containing options files which may contain privileged
1322 options, even if pppd was invoked by a user other than root.  The
1323 system administrator can create options files in this directory to
1324 permit non-privileged users to dial out without requiring the peer to
1325 authenticate, but only to certain trusted peers.
1326 .SH SEE ALSO
1327 .TP
1328 .B RFC1144
1329 Jacobson, V.
1330 \fICompressing TCP/IP headers for low-speed serial links.\fR
1331 February 1990.
1332 .TP
1333 .B RFC1321
1334 Rivest, R.
1335 .I The MD5 Message-Digest Algorithm.
1336 April 1992.
1337 .TP
1338 .B RFC1332
1339 McGregor, G.
1340 .I PPP Internet Protocol Control Protocol (IPCP).
1341 May 1992.
1342 .TP
1343 .B RFC1334
1344 Lloyd, B.; Simpson, W.A.
1345 .I PPP authentication protocols.
1346 October 1992.
1347 .TP
1348 .B RFC1661
1349 Simpson, W.A.
1350 .I The Point\-to\-Point Protocol (PPP).
1351 July 1994.
1352 .TP
1353 .B RFC1662
1354 Simpson, W.A.
1355 .I PPP in HDLC-like Framing.
1356 July 1994.
1357 .SH NOTES
1358 The following signals have the specified effect when sent to pppd.
1359 .TP
1360 .B SIGINT, SIGTERM
1361 These signals cause pppd to terminate the link (by closing LCP),
1362 restore the serial device settings, and exit.
1363 .TP
1364 .B SIGHUP
1365 This signal causes pppd to terminate the link, restore the serial
1366 device settings, and close the serial device.  If the \fIpersist\fR or
1367 \fIdemand\fR option has been specified, pppd will try to reopen the
1368 serial device and start another connection (after the holdoff period).
1369 Otherwise pppd will exit.  If this signal is received during the
1370 holdoff period, it causes pppd to end the holdoff period immediately.
1371 .TP
1372 .B SIGUSR1
1373 This signal toggles the state of the \fIdebug\fR option.
1374 .TP
1375 .B SIGUSR2
1376 This signal causes pppd to renegotiate compression.  This can be
1377 useful to re-enable compression after it has been disabled as a result
1378 of a fatal decompression error.  (Fatal decompression errors generally
1379 indicate a bug in one or other implementation.)
1380
1381 .SH AUTHORS
1382 Paul Mackerras (Paul.Mackerras@cs.anu.edu.au), based on earlier work by
1383 Drew Perkins,
1384 Brad Clements,
1385 Karl Fox,
1386 Greg Christy,
1387 and
1388 Brad Parker.