]> git.ozlabs.org Git - ppp.git/blob - pppd/pppd.8
remove LCP-specific codes
[ppp.git] / pppd / pppd.8
1 .\" manual page [] for pppd 2.0
2 .\" $Id: pppd.8,v 1.2 1994/02/08 23:50:51 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 options
15 ] [
16 .I tty_name
17 ] [
18 .I speed
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 .I pppd
40 will use the controlling terminal, and will not fork to put itself in
41 the background.
42 .TP
43 .I <speed>
44 Set the baud rate to <speed>.  On systems such as 4.4BSD and NetBSD,
45 any speed can be specified.  Other systems (e.g. SunOS) allow only a
46 limited set of speeds.
47 .TP
48 .B asyncmap \fI<map>
49 Set the async character map to <map>.
50 This map describes which control characters cannot be successfully
51 received over the serial line.
52 .I pppd
53 will ask the peer to send these characters as a 2-byte "escape" sequence.
54 The argument is a 32 bit hex number
55 with each bit representing a character to escape. 
56 Bit 0 (00000001) represents the character 0x00;
57 bit 31 (80000000) represents the character 0x1f or ^_.
58 The default asyncmap is 0.  If multiple \fBasyncmap\fR options are
59 given, the values are ORed together.
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 connect \fI<p>
66 Use the executable or shell command specified by <p> to set up the
67 serial line.  This script would typically use the "chat" program to
68 dial the modem and start the remote ppp session.
69 .TP
70 .B crtscts
71 Use hardware flow control (i.e. RTS/CTS) to control the flow of data on
72 the serial port.
73 .TP
74 .B defaultroute
75 Add a default route to the system routing tables, using the peer as
76 the gateway, when IPCP negotiation is successfully completed.
77 This entry is removed when the PPP connection is broken.
78 .TP
79 .B file \fI<f>
80 Read options from file <f> (the format is described below).
81 .TP
82 .B mru \fI<n>
83 Set the MRU [Maximum Receive Unit] value to <n> for negotiation.
84 .I pppd
85 will ask the peer to send packets of no more than <n> bytes.
86  The minimum MRU value is 128. 
87 The default MRU value is 1500.  A value of 296 is recommended for slow
88 links (40 bytes for TCP/IP header + 256 bytes of data).
89 .TP
90 .B netmask \fI<n>
91 Set the interface netmask to <n>, a 32 bit netmask in "decimal dot" notation
92 (e.g. 255.255.255.0).
93 .TP
94 .B passive
95 Enables the "passive" option in the LCP.  With this option,
96 .I pppd
97 will attempt to initiate a connection; if no reply is received from
98 the peer,
99 .I pppd
100 will then just wait passively for a valid LCP packet from the peer
101 (instead of exiting, as it does without this option).
102 .TP
103 .B silent
104 With this option,
105 .I pppd
106 will not transmit LCP packets to initiate a connection until a valid
107 LCP packet is received from the peer (as for the "passive" option with
108 old versions of \fIpppd\fR).
109 .SH OPTIONS
110 .TP
111 .I <local_IP_address>\fB:\fI<remote_IP_address>
112 Set the local and/or remote interface IP addresses.  Either one may be
113 omitted.  The IP addresses can be specified with a host name or in
114 decimal dot notation (e.g. 150.234.56.78).  The default local
115 address is the (first) IP address of the system (unless the
116 .B noipdefault
117 option is given).  The remote address will be obtained from the peer
118 if not specified in any option.  Thus, in simple cases, this option is
119 not required.
120 If a local and/or remote IP address is specified with this option,
121 .I pppd
122 will not accept a different value from the peer in the IPCP
123 negotiation, unless the
124 .B ipcp-accept-local
125 and/or
126 .B ipcp-accept-remote
127 options are given, respectively.
128 .TP
129 .B -all
130 Don't request or allow negotiation of any options for LCP and IPCP (use
131 default values).
132 .TP
133 .B -ac
134 Disable Address/Control compression negotiation (use default, i.e.
135 disabled).
136 .TP
137 .B -am
138 Disable asyncmap negotiation (use default, i.e. 0xffffffff).
139 .TP
140 .B -as \fI<n>
141 Same as
142 .B asyncmap \fI<n>
143 .TP
144 .B -d
145 Increase debugging level.
146 .TP
147 .B -detach
148 Don't fork to become a background process (otherwise
149 .I pppd
150 will do so if a serial device is specified).
151 .TP
152 .B -ip
153 Disable IP address negotiation (with this option, the remote IP
154 address must be specified with an option on the command line or in an
155 options file).
156 .TP
157 .B -mn
158 Disable magic number negotiation.  With this option,
159 .I pppd
160 cannot detect a looped-back line.
161 .TP
162 .B -mru
163 Disable MRU [Maximum Receive Unit] negotiation (use default, i.e. 1500).
164 .TP
165 .B -p
166 Same as the
167 .B passive
168 option.
169 .TP
170 .B -pc
171 Disable protocol field compression negotiation (use default, i.e. disabled).
172 .TP
173 .B +ua \fI<p>
174 Agree to authenticate using PAP [Password Authentication Protocol] if
175 requested by the peer, and
176 use the data in file <p> for the user and password to send to the
177 peer. The file contains the remote user name, followed by a newline,
178 followed by the remote password, followed by a newline.  This option
179 is obsolescent.
180 .TP
181 .B +pap
182 Require the peer to authenticate itself using PAP.
183 .TP
184 .B -pap
185 Don't agree to authenticate using PAP.
186 .TP
187 .B +chap
188 Require the peer to authenticate itself using CHAP [Cryptographic
189 Handshake Authentication Protocol] authentication.
190 .TP
191 .B -chap
192 Don't agree to authenticate using CHAP.
193 .TP
194 .B -vj
195 Disable negotiation of Van Jacobson style IP header compression (use
196 default, i.e. no compression).
197 .TP
198 .B debug
199 Increase debugging level (same as
200 .B -d
201 ).
202 .TP
203 .B domain \fI<d>
204 Append the domain name <d> to the local host name for authentication
205 purposes.  For example, if gethostname() returns the name porsche, but the
206 fully qualified domain name is porsche.Quotron.COM, you would use the
207 domain option to set the domain name to Quotron.COM.
208 .TP
209 .B modem
210 Use the modem control lines.  (This option is not fully implemented.)
211 .TP
212 .B local
213 Don't use the modem control lines.
214 .TP
215 .B name \fI<n>
216 Set the name of the local system for authentication purposes to <n>.
217 .TP
218 .B user \fI<u>
219 Set the user name to use for authenticating this machine with the peer
220 using PAP to <u>.
221 .TP
222 .B usehostname
223 Enforce the use of the hostname as the name of the local system for
224 authentication purposes (overrides the
225 .B name
226 option).
227 .TP
228 .B remotename \fI<n>
229 Set the assumed name of the remote system for authentication purposes
230 to <n>.
231 .TP
232 .B proxyarp
233 Add an entry to this system's ARP [Address Resolution Protocol] table
234 with the IP address of the peer and the Ethernet address of this
235 system.
236 .TP
237 .B login
238 Use the system password database for authenticating the peer using
239 PAP.
240 .TP
241 .B noipdefault
242 Disables the default behaviour when no local IP address is specified,
243 which is to determine (if possible) the local IP address from the
244 hostname.  With this option, the peer will have to supply the local IP
245 address during IPCP negotiation (unless it specified explicitly on the
246 command line or in an options file).
247 .TP
248 .B lcp-restart \fI<n>
249 Set the LCP restart interval (retransmission timeout) to <n> seconds
250 (default 3).
251 .TP
252 .B lcp-max-terminate \fI<n>
253 Set the maximum number of LCP terminate-request transmissions to <n>
254 (default 3).
255 .TP
256 .B lcp-max-configure \fI<n>
257 Set the maximum number of LCP configure-request transmissions to <n>
258 (default 10).
259 .TP
260 .B lcp-max-failure \fI<n>
261 Set the maximum number of LCP configure-NAKs returned before starting
262 to send configure-Rejects instead to <n> (default 10).
263 .TP
264 .B ipcp-restart \fI<n>
265 Set the IPCP restart interval (retransmission timeout) to <n> seconds
266 (default 3).
267 .TP
268 .B ipcp-max-terminate \fI<n>
269 Set the maximum number of IPCP terminate-request transmissions to <n>
270 (default 3).
271 .TP
272 .B ipcp-max-configure \fI<n>
273 Set the maximum number of IPCP configure-request transmissions to <n>
274 (default 10).
275 .TP
276 .B ipcp-max-failure \fI<n>
277 Set the maximum number of IPCP configure-NAKs returned before starting
278 to send configure-Rejects instead to <n> (default 10).
279 .TP
280 .B pap-restart \fI<n>
281 Set the PAP restart interval (retransmission timeout) to <n> seconds
282 (default 3).
283 .TP
284 .B pap-max-authreq \fI<n>
285 Set the maximum number of PAP authenticate-request transmissions to
286 <n> (default 10).
287 .TP
288 .B chap-restart \fI<n>
289 Set the CHAP restart interval (retransmission timeout for challenges)
290 to <n> seconds (default 3).
291 .TP
292 .B chap-max-challenge \fI<n>
293 Set the maximum number of CHAP challenge transmissions to <n> (default
294 10).
295 .TP
296 .B chap-interval \fI<n>
297 If this option is given,
298 .I pppd
299 will rechallenge the peer every <n> seconds.
300 .TP
301 .B ipcp-accept-local
302 With this option,
303 .I pppd
304 will accept the peer's idea of our local IP address, even if the
305 local IP address was specified in an option.
306 .TP
307 .B ipcp-accept-remote
308 With this option,
309 .I pppd
310 will accept the peer's idea of its (remote) IP address, even if the
311 remote IP address was specified in an option.
312 .SH OPTIONS FILES
313 Options can be taken from files as well as the command line.  
314 .I pppd
315 reads options from the files /etc/ppp/options and $HOME/.ppprc before
316 looking at the command line.  An options file is parsed into a series
317 of words, delimited by whitespace.  Whitespace can be included in a
318 word by enclosing the word in quotes (").  A backslash (\\) quotes the
319 following character.  A hash (#) starts a comment, which continues
320 until the end of the line.
321 .SH AUTHENTICATION
322 .I pppd
323 provides system administrators with sufficient access control that PPP
324 access to a server machine can be provided to legitimate users without
325 fear of compromising the security of the server or the network it's
326 on.  In part this is provided by the /etc/ppp/options file, where the
327 administrator can place options to require authentication whenever
328 .I pppd
329 is run, and in part by the PAP and CHAP secrets files, where the
330 administrator can restrict the set of IP addresses which individual
331 users may use.
332 .LP
333 The default behaviour of
334 .I pppd
335 is to agree to authenticate if requested, and to not
336 require authentication from the peer.  However, 
337 .I pppd
338 will not agree to
339 authenticate itself with a particular protocol if it has no secrets
340 which could be used to do so.
341 .LP
342 Authentication is based on secrets, which are selected from secrets
343 files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP).
344 Both secrets files have the same format, and both can store secrets
345 for several combinations of server (authenticating peer) and client
346 (peer being authenticated).  Note that
347 .I pppd
348 can be both a server
349 and client, and that different protocols can be used in the two
350 directions if desired.
351 .LP
352 A secrets file is parsed into words as for a options file.  A secret
353 is specified by a line containing at least 3 words, in the order
354 client, server, secret.  Any following words on the same line are
355 taken to be a list of acceptable IP addresses for that client.  If
356 there are only 3 words on the line, it is assumed that any IP address
357 is OK; to disallow all IP addresses, use "-".  If the secret starts
358 with an `@', what follows is assumed to be the name of a file from
359 which to read the secret.  A "*" as the client or server name matches
360 any name.  When selecting a secret, \fIpppd\fR takes the best match, i.e.
361 the match with the fewest wildcards.
362 .LP
363 Thus a secrets file contains both secrets for use in authenticating
364 other hosts, plus secrets which we use for authenticating ourselves to
365 others.  Which secret to use is chosen based on the names of the host
366 (the `local name') and its peer (the `remote name').  The local name
367 is set as follows:
368 .TP 3
369 if the \fBusehostname\fR option is given,
370 then the local name is the hostname of this machine
371 (with the domain appended, if given)
372 .TP 3
373 else if the \fBname\fR option is given,
374 then use the argument of the first \fBname\fR option seen
375 .TP 3
376 else if the local IP address is specified with a hostname,
377 then use that name
378 .TP 3
379 else use the hostname of this machine (with the domain appended, if given)
380 .LP
381 When authenticating ourselves using PAP, there is also a `username'
382 which is the local name by default, but can be set with the \fBuser\fR
383 option or the \fB+ua\fR option.
384 .LP
385 The remote name is set as follows:
386 .TP 3
387 if the \fBremotename\fR option is given,
388 then use the argument of the last \fBremotename\fR option seen
389 .TP 3
390 else if the remote IP address is specified with a hostname,
391 then use that host name
392 .TP 3
393 else the remote name is the null string "".
394 .LP
395 Secrets are selected from the PAP secrets file as follows:
396 .TP 2
397 *
398 For authenticating the peer, look for a secret with client ==
399 username specified in the PAP authenticate-request, and server ==
400 local name.
401 .TP 2
402 *
403 For authenticating ourselves to the peer, look for a secret with
404 client == our username, server == remote name.
405 .LP
406 When authenticating the peer with PAP, a secret of "" matches any
407 password supplied by the peer.  If the password doesn't match the
408 secret, the password is encrypted using crypt() and checked against
409 the secret again; thus secrets for authenticating the peer can be
410 stored in encrypted form.  If the \fBlogin\fR option was specified, the
411 username and password are also checked against the system password
412 database.  Thus, the system administrator can set up the pap-secrets
413 file to allow PPP access only to certain users, and to restrict the
414 set of IP addresses that each user can use.
415 .LP
416 Secrets are selected from the CHAP secrets file as follows:
417 .TP 2
418 *
419 For authenticating the peer, look for a secret with client == name
420 specified in the CHAP-Response message, and server == local name.
421 .TP 2
422 *
423 For authenticating ourselves to the peer, look for a secret with
424 client == local name, and server == name specified in the
425 CHAP-Challenge message.
426 .LP
427 Authentication must be satisfactorily completed before IPCP (or any
428 other Network Control Protocol) can be started.  If authentication
429 fails, \fIpppd\fR will terminated the link (by closing LCP).  If IPCP
430 negotiates an unacceptable IP address for the remote host, IPCP will
431 be closed.  IP packets can only be sent or received when IPCP is open.
432 .SH ROUTING
433 .LP
434 When IPCP negotiation is completed successfully,
435 .I pppd
436 will inform the kernel of the local and remote IP addresses for the
437 ppp interface.  This is sufficient to create a
438 host route to the remote end of the link, which will enable the peers
439 to exchange IP packets.  Communication with other machines generally
440 requires further modification to routing tables and/or ARP (Address
441 Resolution Protocol) tables.  In some cases this will be done
442 automatically through the actions of the \fIrouted\fR or \fIgated\fR
443 daemons, but in most cases some further intervention is required.
444 .LP
445 Sometimes it is desirable
446 to add a default route through the remote host, as in the case of a
447 machine whose only connection to the Internet is through the ppp
448 interface.  The \fBdefaultroute\fR option causes \fIpppd\fR to create such a
449 default route when IPCP comes up, and delete it when the link is
450 terminated.
451 .LP
452 In some cases it is desirable to use proxy ARP, for example on a
453 server machine connected to a LAN, in order to allow other hosts to
454 communicate with the remote host.  The \fBproxyarp\fR option causes \fIpppd\fR
455 to look for a network interface on the same subnet as the remote host
456 (an interface supporting broadcast and ARP, which is up and not a
457 point-to-point or loopback interface).  If found, \fIpppd\fR creates a
458 permanent, published ARP entry with the IP address of the remote host
459 and the hardware address of the network interface found.
460 .SH EXAMPLES
461 .LP
462 In the simplest case, you can connect the serial ports of two machines
463 and issue a command like
464 .IP
465 pppd /dev/ttya 9600 passive
466 .LP
467 to each machine, assuming there is no \fIgetty\fR running on the
468 serial ports.  If one machine has a \fIgetty\fR running, you can use
469 \fIkermit\fR or \fItip\fR on the other machine to log in to the first
470 machine and issue a command like
471 .IP
472 pppd passive
473 .LP
474 Then exit from the communications program (making sure the connection
475 isn't dropped), and issue a command like
476 .IP
477 pppd /dev/ttya 9600
478 .LP
479 The process of logging in to the other machine and starting \fIpppd\fR
480 can be automated by using the \fBconnect\fR option to run \fIchat\fR,
481 for example:
482 .IP
483 pppd /dev/ttya 38400 connect 'chat "" "" "login:" "username"
484 "Password:" "password" "% " "exec pppd passive"'
485 .LP
486 If your serial connection is any more complicated than a piece of
487 wire, you may need to arrange for some control characters to be
488 escaped.  In particular, it is often useful to escape XON (^Q) and
489 XOFF (^S), using \fBasyncmap a0000\fR.  If the path includes a telnet,
490 you probably should escape ^] as well (\fBasyncmap 200a0000\fR).
491 Don't use an rlogin in the path - many implementations are not
492 transparent; they will remove the sequence [0xff, 0xff, 0x73, 0x73,
493 followed by any 8 bytes] from the stream.
494 .SH DIAGNOSTICS
495 .LP
496 Messages are sent to the syslog daemon using facility
497 LOG_DAEMON unless
498 .I pppd
499 has been compiled with debugging code.  In this case the logging
500 facility used will be LOG_LOCAL2 in order to allow separation of the debug
501 output from the other daemons using the  LOG_DAEMON facility.  You can
502 override this by defining the macro LOG_PPP to the desired facility
503 and recompiling.  In order to see the error and debug messages, you
504 will need to edit your /etc/syslog.conf file to direct the messages to
505 the desired output device or file.
506 .LP
507 If enabled at compile time, debugging printout can be enabled by
508 setting the -d or debug flag on the command line, or by sending a
509 SIGUSR1 to the
510 .I pppd
511 process.
512 Debugging may be disabled by sending a SIGUSR2 to the
513 .I pppd
514 process.
515 .SH FILES
516 .TP
517 .B /var/run/ppp\fIn\fB.pid \fR(BSD), \fB/etc/ppp/ppp\fIn\fB.pid \fR(SunOS)
518 Process-ID for \fIpppd\fR process on ppp interface unit \fIn\fR.
519 .TP
520 .B /etc/ppp/pap-secrets
521 Usernames, passwords and IP addresses for PAP authentication.
522 .TP
523 .B /etc/ppp/chap-secrets
524 Names, secrets and IP addresses for CHAP authentication.
525 .TP
526 .B /etc/ppp/options
527 System default options for
528 .I pppd,
529 read before user default options or command-line options.
530 .TP
531 .B $HOME/.ppprc
532 User default options, read before command-line options.
533 .SH SEE ALSO
534 .TP
535 .B RFC1144
536 Jacobson, V.
537 .I Compressing TCP/IP headers for low-speed serial links.
538 1990 February.
539 .TP
540 .B RFC1321
541 Rivest, R.
542 .I The MD5 Message-Digest Algorithm.
543 1992 April.
544 .TP
545 .B RFC1331
546 Simpson, W.A.
547 .I Point\-to\-Point Protocol (PPP) for the transmission of multi\-protocol
548 .I datagrams over point\-to\-point links.
549 1992 May.
550 .TP
551 .B RFC1332
552 McGregor, G.
553 .I PPP Internet Protocol Control Protocol (IPCP).
554 1992 May.
555 .TP
556 .B RFC1334
557 Lloyd, B.; Simpson, W.A.
558 .I PPP authentication protocols.
559 1992 October.
560 .SH NOTES
561 The following signals have the specified effect when sent to the
562 .I pppd
563 process.
564 .TP
565 .B SIGINT, SIGTERM
566 These signals cause \fIpppd\fR to terminate the link (by closing LCP),
567 restore the serial device settings, and exit.
568 .TP
569 .B SIGHUP
570 Indicates that the physical layer has been disconnected.  \fIpppd\fR
571 will attempt to restore the serial device settings (this may produce
572 error messages on Suns), and then exit.
573 .SH BUGS
574 The use of the modem control lines and the effects of the \fBmodem\fR
575 and \fBlocal\fR options are not well defined.
576 .SH AUTHORS
577 Drew Perkins,
578 Brad Clements,
579 Karl Fox,
580 Greg Christy,
581 Brad Parker (brad@fcr.com),
582 Paul Mackerras (paulus@cs.anu.edu.au)