1 .\" manual page [] for pppd 2.0
2 .\" $Id: pppd.8,v 1.10 1995/05/01 01:43:54 paulus Exp $
4 .\" SS subsection heading
6 .\" IP indented paragraph
10 pppd \- Point to Point Protocol daemon
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.
29 The encapsulation scheme is provided by driver code in the kernel.
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
37 Communicate over the named device. The string "/dev/"
38 is prepended if necessary. If no device name is given,
40 will use the controlling terminal, and will not fork to put itself in
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.
49 Set the async character map to <map>.
50 This map describes which control characters cannot be successfully
51 received over the serial line.
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 If multiple \fBasyncmap\fR options are
59 given, the values are ORed together.
60 If no \fBasyncmap\fR option is given, no async character map will be
61 negotiated for the receive direction; the peer should then escape
62 \fIall\fR control characters.
65 Require the peer to authenticate itself before allowing network
66 packets to be sent or received.
69 Use the executable or shell command specified by \fI<p>\fR to set up the
70 serial line. This script would typically use the "chat" program to
71 dial the modem and start the remote ppp session.
74 Use hardware flow control (i.e. RTS/CTS) to control the flow of data on
78 Disable hardware flow control (i.e. RTS/CTS) on the serial port. If
79 neither the \fBcrtscts\fR nor the \fB\-crtscts\fR option is given,
80 the hardware flow control setting for the serial port is left
84 Use software flow control (i.e. XON/XOFF) to control the flow of data on
85 the serial port. This option is only implemented on Linux systems
89 Add a default route to the system routing tables, using the peer as
90 the gateway, when IPCP negotiation is successfully completed.
91 This entry is removed when the PPP connection is broken.
94 Run the executable or shell command specified by \fI<p>\fR after
95 \fIpppd\fR has terminated the link. This script could, for example,
96 issue commands to the modem to cause it to hang up if hardware modem
97 control signals were not available.
99 .B escape \fIxx,yy,...
100 Specifies that certain characters should be escaped on transmission
101 (regardless of whether the peer requests them to be escaped with its
102 async control character map). The characters to be escaped are
103 specified as a list of hex numbers separated by commas. Note that
104 almost any character can be specified for the \fBescape\fR option,
105 unlike the \fBasyncmap\fR option which only allows control characters
106 to be specified. The characters which may not be escaped are those
107 with hex values 0x20 - 0x3f or 0x5e.
110 Read options from file <f> (the format is described below).
113 Specifies that \fIpppd\fR should use a UUCP-style lock on the serial
114 device to ensure exclusive access to the device.
117 Set the MRU [Maximum Receive Unit] value to <n> for negotiation.
119 will ask the peer to send packets of no more than <n> bytes.
120 The minimum MRU value is 128.
121 The default MRU value is 1500. A value of 296 is recommended for slow
122 links (40 bytes for TCP/IP header + 256 bytes of data).
125 Set the interface netmask to <n>, a 32 bit netmask in "decimal dot" notation
126 (e.g. 255.255.255.0).
129 Enables the "passive" option in the LCP. With this option,
131 will attempt to initiate a connection; if no reply is received from
134 will then just wait passively for a valid LCP packet from the peer
135 (instead of exiting, as it does without this option).
140 will not transmit LCP packets to initiate a connection until a valid
141 LCP packet is received from the peer (as for the `passive' option with
142 old versions of \fIpppd\fR).
145 .I <local_IP_address>\fB:\fI<remote_IP_address>
146 Set the local and/or remote interface IP addresses. Either one may be
147 omitted. The IP addresses can be specified with a host name or in
148 decimal dot notation (e.g. 150.234.56.78). The default local
149 address is the (first) IP address of the system (unless the
151 option is given). The remote address will be obtained from the peer
152 if not specified in any option. Thus, in simple cases, this option is
154 If a local and/or remote IP address is specified with this option,
156 will not accept a different value from the peer in the IPCP
157 negotiation, unless the
160 .B ipcp-accept-remote
161 options are given, respectively.
164 Don't request or allow negotiation of any options for LCP and IPCP (use
168 Disable Address/Control compression negotiation (use default, i.e.
169 address/control field disabled).
172 Disable asyncmap negotiation (use the default asyncmap, i.e. escape
173 all control characters).
180 Increase debugging level (same as the \fBdebug\fR option).
183 Don't fork to become a background process (otherwise
185 will do so if a serial device is specified).
188 Disable IP address negotiation (with this option, the remote IP
189 address must be specified with an option on the command line or in an
193 Disable magic number negotiation. With this option,
195 cannot detect a looped-back line.
198 Disable MRU [Maximum Receive Unit] negotiation (use default, i.e. 1500).
206 Disable protocol field compression negotiation (use default, i.e.
207 protocol field compression disabled).
210 Agree to authenticate using PAP [Password Authentication Protocol] if
211 requested by the peer, and
212 use the data in file <p> for the user and password to send to the
213 peer. The file contains the remote user name, followed by a newline,
214 followed by the remote password, followed by a newline. This option
218 Require the peer to authenticate itself using PAP.
221 Don't agree to authenticate using PAP.
224 Require the peer to authenticate itself using CHAP [Cryptographic
225 Handshake Authentication Protocol] authentication.
228 Don't agree to authenticate using CHAP.
231 Disable negotiation of Van Jacobson style IP header compression (use
232 default, i.e. no compression).
235 Request that the peer compress packets that it sends, using the
236 BSD-Compress scheme, with a maximum code size of \fInr\fR bits, and
237 agree to compress packets sent to the peer with a maximum code size of
238 \fInt\fR bits. If \fInt\fR is not specified, it defaults to the value
239 given for \fInr\fR. Values in the range 9 to 15 may be used for
240 \fInr\fR and \fInt\fR; larger values give better compression but
241 consume more kernel memory for compression dictionaries.
242 Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables
243 compression in the corresponding direction.
246 Disables compression; \fBpppd\fR will not request or agree to compress
247 packets using the BSD-Compress scheme.
250 Increase debugging level (same as \fB\-d\fR).
252 option is given, \fIpppd\fR will log the contents of all control
253 packets sent or received in a readable form. The packets are logged
254 through syslog with facility \fIdaemon\fR and level \fIdebug\fR. This
255 information can be directed to a file by setting up /etc/syslog.conf
256 appropriately (see syslog.conf(5)).
259 Append the domain name <d> to the local host name for authentication
260 purposes. For example, if gethostname() returns the name porsche, but the
261 fully qualified domain name is porsche.Quotron.COM, you would use the
262 domain option to set the domain name to Quotron.COM.
265 Use the modem control lines. This option is the default. With this
268 will wait for the CD (Carrier Detect) signal from the modem to be asserted
269 when opening the serial device
270 (unless a connect script is specified), and it will drop the DTR (Data
271 Terminal Ready) signal briefly when the connection is terminated and before
272 executing the connect script.
273 On Ultrix, this option implies hardware
274 flow control, as for the \fBcrtscts\fR option.
277 Enable debugging code in the kernel-level PPP driver. The argument
278 \fIn\fR is a number which is the sum of the following values: 1 to
279 enable general debug messages, 2 to request that the contents of
280 received packets be printed, and 4 to request that the contents of
281 transmitted packets be printed.
284 Don't use the modem control lines. With this option,
286 will ignore the state of the CD (Carrier Detect) signal from the modem and
287 will not change the state of the DTR (Data Terminal Ready) signal.
290 Set the MTU [Maximum Transmit Unit] value to \fI<n>\fR. Unless the
291 peer requests a smaller value via MRU negotiation, \fIpppd\fR will
292 request that the kernel networking code send data packets of no more
293 than \fIn\fR bytes through the PPP network interface.
296 Set the name of the local system for authentication purposes to <n>.
299 Set the user name to use for authenticating this machine with the peer
303 Enforce the use of the hostname as the name of the local system for
304 authentication purposes (overrides the
309 Set the assumed name of the remote system for authentication purposes
313 Indicates that all secrets in the /etc/ppp/pap-secrets file which
314 are used for checking the identity of the peer are encrypted, and thus
315 pppd should not accept a password which (before encryption) is
316 identical to the secret from the /etc/ppp/pap-secrets file.
319 Add an entry to this system's ARP [Address Resolution Protocol] table
320 with the IP address of the peer and the Ethernet address of this
324 Do not exit after a connection is terminated; instead try to reopen
328 Use the system password database for authenticating the peer using
332 Disables the default behaviour when no local IP address is specified,
333 which is to determine (if possible) the local IP address from the
334 hostname. With this option, the peer will have to supply the local IP
335 address during IPCP negotiation (unless it specified explicitly on the
336 command line or in an options file).
338 .B lcp-echo-interval \fI<n>
339 If this option is given, \fIpppd\fR will send an LCP echo-request
340 frame to the peer every \fIn\fR seconds. Under Linux, the
341 echo-request is sent when no packets have been received from the peer
342 for \fIn\fR seconds. Normally the peer should respond to the
343 echo-request by sending an echo-reply. This option can be used with
344 the \fIlcp-echo-failure\fR option to detect that the peer is no longer
347 .B lcp-echo-failure \fI<n>
348 If this option is given, \fIpppd\fR will presume the peer to be dead
349 if \fIn\fR LCP echo-requests are sent without receiving a valid LCP
350 echo-reply. If this happens, \fIpppd\fR will terminate the
351 connection. Use of this option requires a non-zero value for the
352 \fIlcp-echo-interval\fR parameter. This option can be used to enable
353 \fIpppd\fR to terminate after the physical connection has been broken
354 (e.g., the modem has hung up) in situations where no hardware modem
355 control lines are available.
357 .B lcp-restart \fI<n>
358 Set the LCP restart interval (retransmission timeout) to <n> seconds
361 .B lcp-max-terminate \fI<n>
362 Set the maximum number of LCP terminate-request transmissions to <n>
365 .B lcp-max-configure \fI<n>
366 Set the maximum number of LCP configure-request transmissions to <n>
369 .B lcp-max-failure \fI<n>
370 Set the maximum number of LCP configure-NAKs returned before starting
371 to send configure-Rejects instead to <n> (default 10).
373 .B ipcp-restart \fI<n>
374 Set the IPCP restart interval (retransmission timeout) to <n> seconds
377 .B ipcp-max-terminate \fI<n>
378 Set the maximum number of IPCP terminate-request transmissions to <n>
381 .B ipcp-max-configure \fI<n>
382 Set the maximum number of IPCP configure-request transmissions to <n>
385 .B ipcp-max-failure \fI<n>
386 Set the maximum number of IPCP configure-NAKs returned before starting
387 to send configure-Rejects instead to <n> (default 10).
389 .B pap-restart \fI<n>
390 Set the PAP restart interval (retransmission timeout) to <n> seconds
393 .B pap-max-authreq \fI<n>
394 Set the maximum number of PAP authenticate-request transmissions to
397 .B chap-restart \fI<n>
398 Set the CHAP restart interval (retransmission timeout for challenges)
399 to <n> seconds (default 3).
401 .B chap-max-challenge \fI<n>
402 Set the maximum number of CHAP challenge transmissions to <n> (default
405 .B chap-interval \fI<n>
406 If this option is given,
408 will rechallenge the peer every <n> seconds.
413 will accept the peer's idea of our local IP address, even if the
414 local IP address was specified in an option.
416 .B ipcp-accept-remote
419 will accept the peer's idea of its (remote) IP address, even if the
420 remote IP address was specified in an option.
422 Options can be taken from files as well as the command line.
424 reads options from the files /etc/ppp/options and ~/.ppprc before
425 looking at the command line. An options file is parsed into a series
426 of words, delimited by whitespace. Whitespace can be included in a
427 word by enclosing the word in quotes ("). A backslash (\\) quotes the
428 following character. A hash (#) starts a comment, which continues
429 until the end of the line.
432 provides system administrators with sufficient access control that PPP
433 access to a server machine can be provided to legitimate users without
434 fear of compromising the security of the server or the network it's
435 on. In part this is provided by the /etc/ppp/options file, where the
436 administrator can place options to require authentication whenever
438 is run, and in part by the PAP and CHAP secrets files, where the
439 administrator can restrict the set of IP addresses which individual
442 The default behaviour of
444 is to agree to authenticate if requested, and to not
445 require authentication from the peer. However,
448 authenticate itself with a particular protocol if it has no secrets
449 which could be used to do so.
451 Authentication is based on secrets, which are selected from secrets
452 files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP).
453 Both secrets files have the same format, and both can store secrets
454 for several combinations of server (authenticating peer) and client
455 (peer being authenticated). Note that
458 and client, and that different protocols can be used in the two
459 directions if desired.
461 A secrets file is parsed into words as for a options file. A secret
462 is specified by a line containing at least 3 words, in the order
463 client name, server name, secret. Any following words on the same line are
464 taken to be a list of acceptable IP addresses for that client. If
465 there are only 3 words on the line, it is assumed that any IP address
466 is OK; to disallow all IP addresses, use "-". If the secret starts
467 with an `@', what follows is assumed to be the name of a file from
468 which to read the secret. A "*" as the client or server name matches
469 any name. When selecting a secret, \fIpppd\fR takes the best match, i.e.
470 the match with the fewest wildcards.
472 Thus a secrets file contains both secrets for use in authenticating
473 other hosts, plus secrets which we use for authenticating ourselves to
474 others. Which secret to use is chosen based on the names of the host
475 (the `local name') and its peer (the `remote name'). The local name
478 if the \fBusehostname\fR option is given,
479 then the local name is the hostname of this machine
480 (with the domain appended, if given)
482 else if the \fBname\fR option is given,
483 then use the argument of the first \fBname\fR option seen
485 else if the local IP address is specified with a hostname,
488 else use the hostname of this machine (with the domain appended, if given)
490 When authenticating ourselves using PAP, there is also a `username'
491 which is the local name by default, but can be set with the \fBuser\fR
492 option or the \fB+ua\fR option.
494 The remote name is set as follows:
496 if the \fBremotename\fR option is given,
497 then use the argument of the last \fBremotename\fR option seen
499 else if the remote IP address is specified with a hostname,
500 then use that host name
502 else the remote name is the null string "".
504 Secrets are selected from the PAP secrets file as follows:
507 For authenticating the peer, look for a secret with client ==
508 username specified in the PAP authenticate-request, and server ==
512 For authenticating ourselves to the peer, look for a secret with
513 client == our username, server == remote name.
515 When authenticating the peer with PAP, a secret of "" matches any
516 password supplied by the peer. If the password doesn't match the
517 secret, the password is encrypted using crypt() and checked against
518 the secret again; thus secrets for authenticating the peer can be
519 stored in encrypted form. If the \fBpapcrypt\fR option is given, the
520 first (unencrypted) comparison is omitted, for better security.
522 If the \fBlogin\fR option was specified, the
523 username and password are also checked against the system password
524 database. Thus, the system administrator can set up the pap-secrets
525 file to allow PPP access only to certain users, and to restrict the
526 set of IP addresses that each user can use. Typically, when using the
527 \fBlogin\fR option, the secret in /etc/ppp/pap-secrets would be "", to
528 avoid the need to have the same secret in two places.
530 Secrets are selected from the CHAP secrets file as follows:
533 For authenticating the peer, look for a secret with client == name
534 specified in the CHAP-Response message, and server == local name.
537 For authenticating ourselves to the peer, look for a secret with
538 client == local name, and server == name specified in the
539 CHAP-Challenge message.
541 Authentication must be satisfactorily completed before IPCP (or any
542 other Network Control Protocol) can be started. If authentication
543 fails, \fIpppd\fR will terminated the link (by closing LCP). If IPCP
544 negotiates an unacceptable IP address for the remote host, IPCP will
545 be closed. IP packets can only be sent or received when IPCP is open.
547 In some cases it is desirable to allow some hosts which can't
548 authenticate themselves to connect and use one of a restricted set of
549 IP addresses, even when the local host generally requires
550 authentication. If the peer refuses to authenticate itself when
551 requested, \fIpppd\fR takes that as equivalent to authenticating with
552 PAP using the empty string for the username and password. Thus, by
553 adding a line to the pap-secrets file which specifies the empty string
554 for the client and password, it is possible to allow restricted access
555 to hosts which refuse to authenticate themselves.
558 When IPCP negotiation is completed successfully,
560 will inform the kernel of the local and remote IP addresses for the
561 ppp interface. This is sufficient to create a
562 host route to the remote end of the link, which will enable the peers
563 to exchange IP packets. Communication with other machines generally
564 requires further modification to routing tables and/or ARP (Address
565 Resolution Protocol) tables. In some cases this will be done
566 automatically through the actions of the \fIrouted\fR or \fIgated\fR
567 daemons, but in most cases some further intervention is required.
569 Sometimes it is desirable
570 to add a default route through the remote host, as in the case of a
571 machine whose only connection to the Internet is through the ppp
572 interface. The \fBdefaultroute\fR option causes \fIpppd\fR to create such a
573 default route when IPCP comes up, and delete it when the link is
576 In some cases it is desirable to use proxy ARP, for example on a
577 server machine connected to a LAN, in order to allow other hosts to
578 communicate with the remote host. The \fBproxyarp\fR option causes \fIpppd\fR
579 to look for a network interface on the same subnet as the remote host
580 (an interface supporting broadcast and ARP, which is up and not a
581 point-to-point or loopback interface). If found, \fIpppd\fR creates a
582 permanent, published ARP entry with the IP address of the remote host
583 and the hardware address of the network interface found.
586 In the simplest case, you can connect the serial ports of two machines
587 and issue a command like
589 pppd /dev/ttya 9600 passive
591 to each machine, assuming there is no \fIgetty\fR running on the
592 serial ports. If one machine has a \fIgetty\fR running, you can use
593 \fIkermit\fR or \fItip\fR on the other machine to log in to the first
594 machine and issue a command like
598 Then exit from the communications program (making sure the connection
599 isn't dropped), and issue a command like
603 The process of logging in to the other machine and starting \fIpppd\fR
604 can be automated by using the \fBconnect\fR option to run \fIchat\fR,
607 pppd /dev/ttya 38400 connect 'chat "" "" "login:" "username"
608 "Password:" "password" "% " "exec pppd passive"'
610 (Note however that running chat like this will leave the password
611 visible in the parameter list of pppd and chat.)
613 If your serial connection is any more complicated than a piece of
614 wire, you may need to arrange for some control characters to be
615 escaped. In particular, it is often useful to escape XON (^Q) and
616 XOFF (^S), using \fBasyncmap a0000\fR. If the path includes a telnet,
617 you probably should escape ^] as well (\fBasyncmap 200a0000\fR).
618 If the path includes an rlogin, you will need to use the \fBescape
619 ff\fR option on the end which is running the rlogin client, since many
620 rlogin implementations are not
621 transparent; they will remove the sequence [0xff, 0xff, 0x73, 0x73,
622 followed by any 8 bytes] from the stream.
625 Messages are sent to the syslog daemon using facility LOG_DAEMON.
626 (This can be overriden by recompiling \fIpppd\fR with the macro
627 LOG_PPP defined as the desired facility.) In order to see the error
628 and debug messages, you will need to edit your /etc/syslog.conf file
629 to direct the messages to the desired output device or file.
631 The \fBdebug\fR option causes the contents of all control packets sent
632 or received to be logged, that is, all LCP, PAP, CHAP or IPCP packets.
633 This can be useful if the PPP negotiation does not succeed.
634 If debugging is enabled at compile time, the \fBdebug\fR option also
635 causes other debugging messages to be logged.
637 Debugging can also be enabled or disabled by sending a
640 process. This signal acts as a toggle.
643 .B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)
644 Process-ID for \fIpppd\fR process on ppp interface unit \fIn\fR.
647 A program or script which is executed when the link is available for
648 sending and receiving IP packets (that is, IPCP has come up). It is
649 executed with the parameters
651 \fIinterface-name tty-device speed local-IP-address
654 and with its standard input,
655 output and error streams redirected to \fB/dev/null\fR.
657 This program or script is executed with the same real and effective
658 user-ID as \fIpppd\fR, that is, at least the effective user-ID and
659 possibly the real user-ID will be \fBroot\fR. This is so that it can
660 be used to manipulate routes, run privileged daemons (e.g.
661 \fBsendmail\fR), etc. Be careful that the contents of the
662 /etc/ppp/ip-up and /etc/ppp/ip-down scripts do not compromise your
666 A program or script which is executed when the link is no longer
667 available for sending and receiving IP packets. This script can be
668 used for undoing the effects of the /etc/ppp/ip-up script. It is
669 invoked with the same parameters as the ip-up script, and the same
670 security considerations apply, since it is executed with the same
671 effective and real user-IDs as \fIpppd\fR.
673 .B /etc/ppp/pap-secrets
674 Usernames, passwords and IP addresses for PAP authentication.
676 .B /etc/ppp/chap-secrets
677 Names, secrets and IP addresses for CHAP authentication.
680 System default options for
682 read before user default options or command-line options.
685 User default options, read before command-line options.
687 .B /etc/ppp/options.\fIttyname
688 System default options for the serial port being used, read after
689 command-line options.
694 .I Compressing TCP/IP headers for low-speed serial links.
699 .I The MD5 Message-Digest Algorithm.
704 .I PPP Internet Protocol Control Protocol (IPCP).
708 Lloyd, B.; Simpson, W.A.
709 .I PPP authentication protocols.
714 .I The Point\-to\-Point Protocol (PPP).
719 .I PPP in HDLC Framing.
722 The following signals have the specified effect when sent to the
727 These signals cause \fBpppd\fR to terminate the link (by closing LCP),
728 restore the serial device settings, and exit.
731 This signal causes \fBpppd\fR to terminate the link, restore the
732 serial device settings, and close the serial device. If the
733 \fBpersist\fR option has been specified, \fBpppd\fR will try to reopen
734 the serial device and start another connection. Otherwise \fBpppd\fR
740 to renegotiate compression. This can be useful to re-enable
741 compression after it has been disabled as a result of a fatal
742 decompression error. With the BSD Compress scheme, fatal
743 decompression errors generally indicate a bug in one or other
752 Paul Mackerras (paulus@cs.anu.edu.au).