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