]> git.ozlabs.org Git - ppp.git/blob - pppd/pppd.8
Updates from Al's ppp-2.2.0d release
[ppp.git] / pppd / pppd.8
1 .\" manual page [] for pppd 2.0
2 .\" $Id: pppd.8,v 1.15 1995/08/17 01:52:17 paulus Exp $
3 .\" SH section heading
4 .\" SS subsection heading
5 .\" LP paragraph
6 .\" IP indented paragraph
7 .\" TP hanging label
8 .TH PPPD 8
9 .SH NAME
10 pppd \- Point to Point Protocol daemon
11 .SH SYNOPSIS
12 .B pppd
13 [
14 .I tty_name
15 ] [
16 .I speed
17 ] [
18 .I options
19 ]
20 .SH DESCRIPTION
21 .LP
22 The Point-to-Point Protocol (PPP) provides a method for transmitting
23 datagrams over serial point-to-point links.  PPP
24 is composed of three parts: a method for encapsulating datagrams over
25 serial links, an extensible Link Control Protocol (LCP), and
26 a family of Network Control Protocols (NCP) for establishing
27 and configuring different network-layer protocols.
28 .LP
29 The encapsulation scheme is provided by driver code in the kernel.
30 .B pppd
31 provides the basic LCP, authentication support, and an
32 NCP for establishing and configuring the Internet Protocol (IP)
33 (called the IP Control Protocol, IPCP).
34 .SH FREQUENTLY USED OPTIONS
35 .TP
36 .I <tty_name>
37 Communicate over the named device.  The string "/dev/"
38 is prepended if necessary.  If no device name is given,
39 or if the name of the controlling terminal is given,
40 .I pppd
41 will use the controlling terminal, and will not fork to put itself in
42 the background.
43 .TP
44 .I <speed>
45 Set the baud rate to <speed> (a decimal number).  On systems such as
46 4.4BSD and NetBSD, any speed can be specified.  Other systems
47 (e.g. SunOS) allow only a limited set of speeds.
48 .TP
49 .B asyncmap \fI<map>
50 Set the async character map to <map>.
51 This map describes which control characters cannot be successfully
52 received over the serial line.
53 .I pppd
54 will ask the peer to send these characters as a 2-byte escape sequence.
55 The argument is a 32 bit hex number
56 with each bit representing a character to escape. 
57 Bit 0 (00000001) represents the character 0x00;
58 bit 31 (80000000) represents the character 0x1f or ^_.
59 If multiple \fBasyncmap\fR options are
60 given, the values are ORed together.
61 If no \fBasyncmap\fR option is given, no async character map will be
62 negotiated for the receive direction; the peer should then escape
63 \fIall\fR control characters.
64 .TP
65 .B auth
66 Require the peer to authenticate itself before allowing network
67 packets to be sent or received.
68 .TP
69 .B connect \fI<p>
70 Use the executable or shell command specified by \fI<p>\fR to set up the
71 serial line.  This script would typically use the chat(8) program to
72 dial the modem and start the remote ppp session.
73 .TP
74 .B crtscts
75 Use hardware flow control (i.e. RTS/CTS) to control the flow of data
76 on the serial port.  If neither the \fBcrtscts\fR nor the
77 \fB\-crtscts\fR option is given, the hardware flow control setting for
78 the serial port is left unchanged.
79 .TP
80 .B defaultroute
81 Add a default route to the system routing tables, using the peer as
82 the gateway, when IPCP negotiation is successfully completed.
83 This entry is removed when the PPP connection is broken.
84 .TP
85 .B disconnect \fI<p>
86 Run the executable or shell command specified by \fI<p>\fR after
87 \fIpppd\fR has terminated the link.  This script could, for example,
88 issue commands to the modem to cause it to hang up if hardware modem
89 control signals were not available.
90 .TP
91 .B escape \fIxx,yy,...
92 Specifies that certain characters should be escaped on transmission
93 (regardless of whether the peer requests them to be escaped with its
94 async control character map).  The characters to be escaped are
95 specified as a list of hex numbers separated by commas.  Note that
96 almost any character can be specified for the \fBescape\fR option,
97 unlike the \fBasyncmap\fR option which only allows control characters
98 to be specified.  The characters which may not be escaped are those
99 with hex values 0x20 - 0x3f or 0x5e.
100 .TP
101 .B file \fI<f>
102 Read options from file <f> (the format is described below).
103 .TP
104 .B lock
105 Specifies that \fIpppd\fR should create a UUCP-style lock file for the
106 serial device to ensure exclusive access to the device.
107 .TP
108 .B mru \fI<n>
109 Set the MRU [Maximum Receive Unit] value to <n> for negotiation.
110 .I pppd
111 will ask the peer to send packets of no more than <n> bytes.  The
112 minimum MRU value is 128.  The default MRU value is 1500.  A value of
113 296 is recommended for slow links (40 bytes for TCP/IP header + 256
114 bytes of data).
115 .TP
116 .B mtu \fI<n>
117 Set the MTU [Maximum Transmit Unit] value to \fI<n>\fR.  Unless the
118 peer requests a smaller value via MRU negotiation, \fIpppd\fR will
119 request that the kernel networking code send data packets of no more
120 than \fIn\fR bytes through the PPP network interface. 
121 .TP
122 .B netmask \fI<n>
123 Set the interface netmask to <n>, a 32 bit netmask in "decimal dot"
124 notation (e.g. 255.255.255.0).  If this option is given, the value
125 specified is ORed with the default netmask.  The default netmask is
126 chosen based on the negotiated remote IP address; it is the
127 appropriate network mask for the class of the remote IP address, ORed
128 with the netmasks for any non point-to-point network interfaces in the
129 system which are on the same network.
130 .TP
131 .B passive
132 Enables the "passive" option in the LCP.  With this option,
133 .I pppd
134 will attempt to initiate a connection; if no reply is received from
135 the peer,
136 .I pppd
137 will then just wait passively for a valid LCP packet from the peer
138 (instead of exiting, as it does without this option).
139 .TP
140 .B silent
141 With this option,
142 .I pppd
143 will not transmit LCP packets to initiate a connection until a valid
144 LCP packet is received from the peer (as for the `passive' option with
145 ancient versions of \fIpppd\fR).
146 .SH OPTIONS
147 .TP
148 .I <local_IP_address>\fB:\fI<remote_IP_address>
149 Set the local and/or remote interface IP addresses.  Either one may be
150 omitted.  The IP addresses can be specified with a host name or in
151 decimal dot notation (e.g. 150.234.56.78).  The default local
152 address is the (first) IP address of the system (unless the
153 .B noipdefault
154 option is given).  The remote address will be obtained from the peer
155 if not specified in any option.  Thus, in simple cases, this option is
156 not required.  If a local and/or remote IP address is specified with
157 this option,
158 .I pppd
159 will not accept a different value from the peer in the IPCP
160 negotiation, unless the
161 .B ipcp-accept-local
162 and/or
163 .B ipcp-accept-remote
164 options are given, respectively.
165 .TP
166 .B -ac
167 Disable Address/Control compression negotiation (use default, i.e.
168 address/control field compression disabled).
169 .TP
170 .B -all
171 Don't request or allow negotiation of any options for LCP and IPCP (use
172 default values).
173 .TP
174 .B -am
175 Disable asyncmap negotiation (use the default asyncmap, i.e. escape
176 all control characters).
177 .TP
178 .B -as \fI<n>
179 Same as
180 .B asyncmap \fI<n>
181 .TP
182 .B bsdcomp \fInr,nt
183 Request that the peer compress packets that it sends, using the
184 BSD-Compress scheme, with a maximum code size of \fInr\fR bits, and
185 agree to compress packets sent to the peer with a maximum code size of
186 \fInt\fR bits.  If \fInt\fR is not specified, it defaults to the value
187 given for \fInr\fR.  Values in the range 9 to 15 may be used for
188 \fInr\fR and \fInt\fR; larger values give better compression but
189 consume more kernel memory for compression dictionaries.
190 Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables
191 compression in the corresponding direction.
192 .TP
193 .B \-bsdcomp
194 Disables compression; \fBpppd\fR will not request or agree to compress
195 packets using the BSD-Compress scheme.
196 .TP
197 .B +chap
198 Require the peer to authenticate itself using CHAP [Cryptographic
199 Handshake Authentication Protocol] authentication.
200 .TP
201 .B -chap
202 Don't agree to authenticate using CHAP.
203 .TP
204 .B chap-interval \fI<n>
205 If this option is given,
206 .I pppd
207 will rechallenge the peer every <n> seconds.
208 .TP
209 .B chap-max-challenge \fI<n>
210 Set the maximum number of CHAP challenge transmissions to <n> (default
211 10).
212 .TP
213 .B chap-restart \fI<n>
214 Set the CHAP restart interval (retransmission timeout for challenges)
215 to <n> seconds (default 3).
216 .TP
217 .B -crtscts
218 Disable hardware flow control (i.e. RTS/CTS) on the serial port.  If
219 neither the \fBcrtscts\fR nor the \fB\-crtscts\fR option is given,
220 the hardware flow control setting for the serial port is left
221 unchanged.
222 .TP
223 .B -d
224 Increase debugging level (same as the \fBdebug\fR option).
225 .TP
226 .B debug
227 Increase debugging level (same as \fB\-d\fR).
228 If this
229 option is given, \fIpppd\fR will log the contents of all control
230 packets sent or received in a readable form.  The packets are logged
231 through syslog with facility \fIdaemon\fR and level \fIdebug\fR.  This
232 information can be directed to a file by setting up /etc/syslog.conf
233 appropriately (see syslog.conf(5)).
234 .TP
235 .B \-defaultroute
236 Disable the \fBdefaultroute\fR option.  The system administrator who
237 wishes to prevent users from creating default routes with \fIpppd\fR
238 can do so by placing this option in the /etc/ppp/options file.
239 .TP
240 .B -detach
241 Don't fork to become a background process (otherwise
242 .I pppd
243 will do so if a serial device other than its controlling terminal is
244 specified).
245 .TP
246 .B domain \fI<d>
247 Append the domain name <d> to the local host name for authentication
248 purposes.  For example, if gethostname() returns the name porsche, but the
249 fully qualified domain name is porsche.Quotron.COM, you would use the
250 domain option to set the domain name to Quotron.COM.
251 .TP
252 .B -ip
253 Disable IP address negotiation.  If this option is used, the remote IP
254 address must be specified with an option on the command line or in an
255 options file.
256 .TP
257 .B ipcp-accept-local
258 With this option,
259 .I pppd
260 will accept the peer's idea of our local IP address, even if the
261 local IP address was specified in an option.
262 .TP
263 .B ipcp-accept-remote
264 With this option,
265 .I pppd
266 will accept the peer's idea of its (remote) IP address, even if the
267 remote IP address was specified in an option.
268 .TP
269 .B ipcp-max-configure \fI<n>
270 Set the maximum number of IPCP configure-request transmissions to <n>
271 (default 10).
272 .TP
273 .B ipcp-max-failure \fI<n>
274 Set the maximum number of IPCP configure-NAKs returned before starting
275 to send configure-Rejects instead to <n> (default 10).
276 .TP
277 .B ipcp-max-terminate \fI<n>
278 Set the maximum number of IPCP terminate-request transmissions to <n>
279 (default 3).
280 .TP
281 .B ipcp-restart \fI<n>
282 Set the IPCP restart interval (retransmission timeout) to <n> seconds
283 (default 3).
284 .TP
285 .B ipparam \fIstring
286 Provides an extra parameter to the ip-up and ip-down scripts.  If this
287 option is given, the \fIstring\fR supplied is given as the 6th
288 parameter to those scripts.
289 .TP
290 .B kdebug \fIn
291 Enable debugging code in the kernel-level PPP driver.  The argument
292 \fIn\fR is a number which is the sum of the following values: 1 to
293 enable general debug messages, 2 to request that the contents of
294 received packets be printed, and 4 to request that the contents of
295 transmitted packets be printed.
296 .TP
297 .B lcp-echo-failure \fI<n>
298 If this option is given, \fIpppd\fR will presume the peer to be dead
299 if \fIn\fR LCP echo-requests are sent without receiving a valid LCP
300 echo-reply.  If this happens, \fIpppd\fR will terminate the
301 connection.  Use of this option requires a non-zero value for the
302 \fIlcp-echo-interval\fR parameter.  This option can be used to enable
303 \fIpppd\fR to terminate after the physical connection has been broken
304 (e.g., the modem has hung up) in situations where no hardware modem
305 control lines are available.
306 .TP
307 .B lcp-echo-interval \fI<n>
308 If this option is given, \fIpppd\fR will send an LCP echo-request
309 frame to the peer every \fIn\fR seconds.  Under Linux, the
310 echo-request is sent when no packets have been received from the peer
311 for \fIn\fR seconds.  Normally the peer should respond to the
312 echo-request by sending an echo-reply.  This option can be used with
313 the \fIlcp-echo-failure\fR option to detect that the peer is no longer
314 connected.
315 .TP
316 .B lcp-max-configure \fI<n>
317 Set the maximum number of LCP configure-request transmissions to <n>
318 (default 10).
319 .TP
320 .B lcp-max-failure \fI<n>
321 Set the maximum number of LCP configure-NAKs returned before starting
322 to send configure-Rejects instead to <n> (default 10).
323 .TP
324 .B lcp-max-terminate \fI<n>
325 Set the maximum number of LCP terminate-request transmissions to <n>
326 (default 3).
327 .TP
328 .B lcp-restart \fI<n>
329 Set the LCP restart interval (retransmission timeout) to <n> seconds
330 (default 3).
331 .TP
332 .B local
333 Don't use the modem control lines.  With this option,
334 .B pppd
335 will ignore the state of the CD (Carrier Detect) signal from the modem and
336 will not change the state of the DTR (Data Terminal Ready) signal.
337 .TP
338 .B login
339 Use the system password database for authenticating the peer using
340 PAP, and record the user in the system wtmp file.
341 .TP
342 .B modem
343 Use the modem control lines.  This option is the default.  With this
344 option,
345 .B pppd
346 will wait for the CD (Carrier Detect) signal from the modem to be asserted
347 when opening the serial device
348 (unless a connect script is specified), and it will drop the DTR (Data
349 Terminal Ready) signal briefly when the connection is terminated and before
350 executing the connect script.
351 On Ultrix, this option implies hardware
352 flow control, as for the \fBcrtscts\fR option.  
353 .TP
354 .B -mn
355 Disable magic number negotiation.  With this option,
356 .I pppd
357 cannot detect a looped-back line.
358 .TP
359 .B -mru
360 Disable MRU [Maximum Receive Unit] negotiation.  With this option,
361 \fIpppd\fR will use the default MRU value of 1500 bytes.
362 .TP
363 .B name \fI<n>
364 Set the name of the local system for authentication purposes to <n>.
365 .TP
366 .B noipdefault
367 Disables the default behaviour when no local IP address is specified,
368 which is to determine (if possible) the local IP address from the
369 hostname.  With this option, the peer will have to supply the local IP
370 address during IPCP negotiation (unless it specified explicitly on the
371 command line or in an options file).
372 .TP
373 .B -p
374 Same as the
375 .B passive
376 option.
377 .TP
378 .B +pap
379 Require the peer to authenticate itself using PAP.
380 .TP
381 .B -pap
382 Don't agree to authenticate using PAP.
383 .TP
384 .B papcrypt
385 Indicates that all secrets in the /etc/ppp/pap-secrets file which
386 are used for checking the identity of the peer are encrypted, and thus
387 pppd should not accept a password which (before encryption) is
388 identical to the secret from the /etc/ppp/pap-secrets file.
389 .TP
390 .B pap-max-authreq \fI<n>
391 Set the maximum number of PAP authenticate-request transmissions to
392 <n> (default 10).
393 .TP
394 .B pap-restart \fI<n>
395 Set the PAP restart interval (retransmission timeout) to <n> seconds
396 (default 3).
397 .TP
398 .B pap-timeout \fI<n>
399 Set the maximum time that
400 .I pppd
401 will wait for the peer to authenticate itself with PAP to
402 <n> seconds (0 means no limit).
403 .TP
404 .B -pc
405 Disable protocol field compression negotiation (use default, i.e.
406 protocol field compression disabled).
407 .TP
408 .B persist
409 Do not exit after a connection is terminated; instead try to reopen
410 the connection.
411 .TP
412 .B proxyarp
413 Add an entry to this system's ARP [Address Resolution Protocol] table
414 with the IP address of the peer and the Ethernet address of this
415 system.
416 .TP
417 .B \-proxyarp
418 Disable the \fBproxyarp\fR option.  The system administrator who
419 wishes to prevent users from creating proxy ARP entries with
420 \fIpppd\fR can do so by placing this option in the /etc/ppp/options
421 file.
422 .TP
423 .B remotename \fI<n>
424 Set the assumed name of the remote system for authentication purposes
425 to <n>.
426 .TP
427 .B +ua \fI<p>
428 Agree to authenticate using PAP [Password Authentication Protocol] if
429 requested by the peer, and
430 use the data in file <p> for the user and password to send to the
431 peer. The file contains the remote user name, followed by a newline,
432 followed by the remote password, followed by a newline.  This option
433 is obsolescent.
434 .TP
435 .B usehostname
436 Enforce the use of the hostname as the name of the local system for
437 authentication purposes (overrides the
438 .B name
439 option).
440 .TP
441 .B user \fI<u>
442 Set the user name to use for authenticating this machine with the peer
443 using PAP to <u>.
444 .TP
445 .B -vj
446 Disable negotiation of Van Jacobson style TCP/IP header compression (use
447 default, i.e. no compression).
448 .TP
449 .B -vjccomp
450 Disable the connection-ID compression option in Van Jacobson style
451 TCP/IP header compression.  With this option, \fIpppd\fR will not omit
452 the connection-ID byte from Van Jacobson compressed TCP/IP headers,
453 nor ask the peer to do so.
454 .TP
455 .B vj-max-slots \fIn
456 Sets the number of connection slots to be used by the Van Jacobson
457 TCP/IP header compression and decompression code to \fIn\fR, which
458 must be between 2 and 16 (inclusive).
459 .TP
460 .B xonxoff
461 Use software flow control (i.e. XON/XOFF) to control the flow of data on
462 the serial port.  This option is only implemented on Linux systems
463 at present.
464 .SH OPTIONS FILES
465 Options can be taken from files as well as the command line.  
466 .I pppd
467 reads options from the files /etc/ppp/options and ~/.ppprc before
468 looking at the command line.  An options file is parsed into a series
469 of words, delimited by whitespace.  Whitespace can be included in a
470 word by enclosing the word in quotes (").  A backslash (\\) quotes the
471 following character.  A hash (#) starts a comment, which continues
472 until the end of the line.
473 .SH AUTHENTICATION
474 .I pppd
475 provides system administrators with sufficient access control that PPP
476 access to a server machine can be provided to legitimate users without
477 fear of compromising the security of the server or the network it's
478 on.  In part this is provided by the /etc/ppp/options file, where the
479 administrator can place options to require authentication whenever
480 .I pppd
481 is run, and in part by the PAP and CHAP secrets files, where the
482 administrator can restrict the set of IP addresses which individual
483 users may use.
484 .LP
485 The default behaviour of
486 .I pppd
487 is to agree to authenticate if requested, and to not
488 require authentication from the peer.  However, 
489 .I pppd
490 will not agree to
491 authenticate itself with a particular protocol if it has no secrets
492 which could be used to do so.
493 .LP
494 Authentication is based on secrets, which are selected from secrets
495 files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP).
496 Both secrets files have the same format, and both can store secrets
497 for several combinations of server (authenticating peer) and client
498 (peer being authenticated).  Note that
499 .I pppd
500 can be both a server
501 and client, and that different protocols can be used in the two
502 directions if desired.
503 .LP
504 A secrets file is parsed into words as for a options file.  A secret
505 is specified by a line containing at least 3 words, in the order
506 client name, server name, secret.  Any following words on the same line are
507 taken to be a list of acceptable IP addresses for that client.  If
508 there are only 3 words on the line, it is assumed that any IP address
509 is OK; to disallow all IP addresses, use "-".  If the secret starts
510 with an `@', what follows is assumed to be the name of a file from
511 which to read the secret.  A "*" as the client or server name matches
512 any name.  When selecting a secret, \fIpppd\fR takes the best match, i.e.
513 the match with the fewest wildcards.
514 .LP
515 Thus a secrets file contains both secrets for use in authenticating
516 other hosts, plus secrets which we use for authenticating ourselves to
517 others.  Which secret to use is chosen based on the names of the host
518 (the `local name') and its peer (the `remote name').  The local name
519 is set as follows:
520 .TP 3
521 if the \fBusehostname\fR option is given,
522 then the local name is the hostname of this machine
523 (with the domain appended, if given)
524 .TP 3
525 else if the \fBname\fR option is given,
526 then use the argument of the first \fBname\fR option seen
527 .TP 3
528 else if the local IP address is specified with a hostname,
529 then use that name
530 .TP 3
531 else use the hostname of this machine (with the domain appended, if given)
532 .LP
533 When authenticating ourselves using PAP, there is also a `username'
534 which is the local name by default, but can be set with the \fBuser\fR
535 option or the \fB+ua\fR option.
536 .LP
537 The remote name is set as follows:
538 .TP 3
539 if the \fBremotename\fR option is given,
540 then use the argument of the last \fBremotename\fR option seen
541 .TP 3
542 else if the remote IP address is specified with a hostname,
543 then use that host name
544 .TP 3
545 else the remote name is the null string "".
546 .LP
547 Secrets are selected from the PAP secrets file as follows:
548 .TP 2
549 *
550 For authenticating the peer, look for a secret with client ==
551 username specified in the PAP authenticate-request, and server ==
552 local name.
553 .TP 2
554 *
555 For authenticating ourselves to the peer, look for a secret with
556 client == our username, server == remote name.
557 .LP
558 When authenticating the peer with PAP, a secret of "" matches any
559 password supplied by the peer.  If the password doesn't match the
560 secret, the password is encrypted using crypt() and checked against
561 the secret again; thus secrets for authenticating the peer can be
562 stored in encrypted form.  If the \fBpapcrypt\fR option is given, the
563 first (unencrypted) comparison is omitted, for better security.
564 .LP
565 If the \fBlogin\fR option was specified, the
566 username and password are also checked against the system password
567 database.  Thus, the system administrator can set up the pap-secrets
568 file to allow PPP access only to certain users, and to restrict the
569 set of IP addresses that each user can use.  Typically, when using the
570 \fBlogin\fR option, the secret in /etc/ppp/pap-secrets would be "", to
571 avoid the need to have the same secret in two places.
572 .LP
573 Secrets are selected from the CHAP secrets file as follows:
574 .TP 2
575 *
576 For authenticating the peer, look for a secret with client == name
577 specified in the CHAP-Response message, and server == local name.
578 .TP 2
579 *
580 For authenticating ourselves to the peer, look for a secret with
581 client == local name, and server == name specified in the
582 CHAP-Challenge message.
583 .LP
584 Authentication must be satisfactorily completed before IPCP (or any
585 other Network Control Protocol) can be started.  If authentication
586 fails, \fIpppd\fR will terminated the link (by closing LCP).  If IPCP
587 negotiates an unacceptable IP address for the remote host, IPCP will
588 be closed.  IP packets can only be sent or received when IPCP is open.
589 .LP
590 In some cases it is desirable to allow some hosts which can't
591 authenticate themselves to connect and use one of a restricted set of
592 IP addresses, even when the local host generally requires
593 authentication.  If the peer refuses to authenticate itself when
594 requested, \fIpppd\fR takes that as equivalent to authenticating with
595 PAP using the empty string for the username and password.  Thus, by
596 adding a line to the pap-secrets file which specifies the empty string
597 for the client and password, it is possible to allow restricted access
598 to hosts which refuse to authenticate themselves.
599 .SH ROUTING
600 .LP
601 When IPCP negotiation is completed successfully,
602 .I pppd
603 will inform the kernel of the local and remote IP addresses for the
604 ppp interface.  This is sufficient to create a
605 host route to the remote end of the link, which will enable the peers
606 to exchange IP packets.  Communication with other machines generally
607 requires further modification to routing tables and/or ARP (Address
608 Resolution Protocol) tables.  In some cases this will be done
609 automatically through the actions of the \fIrouted\fR or \fIgated\fR
610 daemons, but in most cases some further intervention is required.
611 .LP
612 Sometimes it is desirable
613 to add a default route through the remote host, as in the case of a
614 machine whose only connection to the Internet is through the ppp
615 interface.  The \fBdefaultroute\fR option causes \fIpppd\fR to create such a
616 default route when IPCP comes up, and delete it when the link is
617 terminated.
618 .LP
619 In some cases it is desirable to use proxy ARP, for example on a
620 server machine connected to a LAN, in order to allow other hosts to
621 communicate with the remote host.  The \fBproxyarp\fR option causes \fIpppd\fR
622 to look for a network interface on the same subnet as the remote host
623 (an interface supporting broadcast and ARP, which is up and not a
624 point-to-point or loopback interface).  If found, \fIpppd\fR creates a
625 permanent, published ARP entry with the IP address of the remote host
626 and the hardware address of the network interface found.
627 .SH EXAMPLES
628 .LP
629 In the simplest case, you can connect the serial ports of two machines
630 and issue a command like
631 .IP
632 pppd /dev/ttya 9600 passive
633 .LP
634 to each machine, assuming there is no \fIgetty\fR running on the
635 serial ports.  If one machine has a \fIgetty\fR running, you can use
636 \fIkermit\fR or \fItip\fR on the other machine to log in to the first
637 machine and issue a command like
638 .IP
639 pppd passive
640 .LP
641 Then exit from the communications program (making sure the connection
642 isn't dropped), and issue a command like
643 .IP
644 pppd /dev/ttya 9600
645 .LP
646 The process of logging in to the other machine and starting \fIpppd\fR
647 can be automated by using the \fBconnect\fR option to run \fIchat\fR,
648 for example:
649 .IP
650 pppd /dev/ttya 38400 connect 'chat "" "" "login:" "username"
651 "Password:" "password" "% " "exec pppd passive"'
652 .LP
653 (Note however that running chat like this will leave the password
654 visible in the parameter list of pppd and chat.)
655 .LP
656 If your serial connection is any more complicated than a piece of
657 wire, you may need to arrange for some control characters to be
658 escaped.  In particular, it is often useful to escape XON (^Q) and
659 XOFF (^S), using \fBasyncmap a0000\fR.  If the path includes a telnet,
660 you probably should escape ^] as well (\fBasyncmap 200a0000\fR).
661 If the path includes an rlogin, you will need to use the \fBescape
662 ff\fR option on the end which is running the rlogin client, since many
663 rlogin implementations are not
664 transparent; they will remove the sequence [0xff, 0xff, 0x73, 0x73,
665 followed by any 8 bytes] from the stream.
666 .SH DIAGNOSTICS
667 .LP
668 Messages are sent to the syslog daemon using facility LOG_DAEMON.
669 (This can be overriden by recompiling \fIpppd\fR with the macro
670 LOG_PPP defined as the desired facility.)  In order to see the error
671 and debug messages, you will need to edit your /etc/syslog.conf file
672 to direct the messages to the desired output device or file.
673 .LP
674 The \fBdebug\fR option causes the contents of all control packets sent
675 or received to be logged, that is, all LCP, PAP, CHAP or IPCP packets.
676 This can be useful if the PPP negotiation does not succeed.
677 If debugging is enabled at compile time, the \fBdebug\fR option also
678 causes other debugging messages to be logged.
679 .LP
680 Debugging can also be enabled or disabled by sending a
681 SIGUSR1 to the
682 .I pppd
683 process.  This signal acts as a toggle.
684 .SH FILES
685 .TP
686 .B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)
687 Process-ID for \fIpppd\fR process on ppp interface unit \fIn\fR.
688 .TP
689 .B /etc/ppp/ip-up
690 A program or script which is executed when the link is available for
691 sending and receiving IP packets (that is, IPCP has come up).  It is
692 executed with the parameters
693 .IP
694 \fIinterface-name tty-device speed local-IP-address
695 remote-IP-address\fR
696 .IP
697 and with its standard input,
698 output and error streams redirected to \fB/dev/null\fR.
699 .IP
700 This program or script is executed with the same real and effective
701 user-ID as \fIpppd\fR, that is, at least the effective user-ID and
702 possibly the real user-ID will be \fBroot\fR.  This is so that it can
703 be used to manipulate routes, run privileged daemons (e.g.
704 \fBsendmail\fR), etc.  Be careful that the contents of the
705 /etc/ppp/ip-up and /etc/ppp/ip-down scripts do not compromise your
706 system's security.
707 .TP
708 .B /etc/ppp/ip-down
709 A program or script which is executed when the link is no longer
710 available for sending and receiving IP packets.  This script can be
711 used for undoing the effects of the /etc/ppp/ip-up script.  It is
712 invoked with the same parameters as the ip-up script, and the same
713 security considerations apply, since it is executed with the same
714 effective and real user-IDs as \fIpppd\fR.
715 .TP
716 .B /etc/ppp/pap-secrets
717 Usernames, passwords and IP addresses for PAP authentication.
718 .TP
719 .B /etc/ppp/chap-secrets
720 Names, secrets and IP addresses for CHAP authentication.
721 .TP
722 .B /etc/ppp/options
723 System default options for
724 .I pppd,
725 read before user default options or command-line options.
726 .TP
727 .B ~/.ppprc
728 User default options, read before command-line options.
729 .TP
730 .B /etc/ppp/options.\fIttyname
731 System default options for the serial port being used, read after
732 command-line options.
733 .SH SEE ALSO
734 .TP
735 .B RFC1144
736 Jacobson, V.
737 .I Compressing TCP/IP headers for low-speed serial links.
738 1990 February.
739 .TP
740 .B RFC1321
741 Rivest, R.
742 .I The MD5 Message-Digest Algorithm.
743 1992 April.
744 .TP
745 .B RFC1332
746 McGregor, G.
747 .I PPP Internet Protocol Control Protocol (IPCP).
748 1992 May.
749 .TP
750 .B RFC1334
751 Lloyd, B.; Simpson, W.A.
752 .I PPP authentication protocols.
753 1992 October.
754 .TP
755 .B RFC1548
756 Simpson, W.A.
757 .I The Point\-to\-Point Protocol (PPP).
758 1993 December.
759 .TP
760 .B RFC1549
761 Simpson, W.A.
762 .I PPP in HDLC Framing.
763 1993 December
764 .SH NOTES
765 The following signals have the specified effect when sent to the
766 .I pppd
767 process.
768 .TP
769 .B SIGINT, SIGTERM
770 These signals cause \fBpppd\fR to terminate the link (by closing LCP),
771 restore the serial device settings, and exit.
772 .TP
773 .B SIGHUP
774 This signal causes \fBpppd\fR to terminate the link, restore the
775 serial device settings, and close the serial device.  If the
776 \fBpersist\fR option has been specified, \fBpppd\fR will try to reopen
777 the serial device and start another connection.  Otherwise \fBpppd\fR
778 will exit.
779 .TP
780 .B SIGUSR2
781 This signal causes
782 .B pppd
783 to renegotiate compression.  This can be useful to re-enable
784 compression after it has been disabled as a result of a fatal
785 decompression error.  With the BSD Compress scheme, fatal
786 decompression errors generally indicate a bug in one or other
787 implementation.
788
789 .SH AUTHORS
790 Drew Perkins,
791 Brad Clements,
792 Karl Fox,
793 Greg Christy,
794 Brad Parker,
795 Paul Mackerras (paulus@cs.anu.edu.au).