1 .\" manual page [] for pppd 2.0
2 .\" $Id: pppd.8,v 1.14 1995/08/16 01:39:53 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,
39 or if the name of the controlling terminal is given,
41 will use the controlling terminal, and will not fork to put itself in
45 Set the baud rate to <speed>. On systems such as 4.4BSD and NetBSD,
46 any speed can be specified. Other systems (e.g. SunOS) allow only a
47 limited set of speeds.
50 Set the async character map to <map>.
51 This map describes which control characters cannot be successfully
52 received over the serial line.
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.
66 Require the peer to authenticate itself before allowing network
67 packets to be sent or received.
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" program to
72 dial the modem and start the remote ppp session.
75 Use hardware flow control (i.e. RTS/CTS) to control the flow of data on
79 Disable hardware flow control (i.e. RTS/CTS) on the serial port. If
80 neither the \fBcrtscts\fR nor the \fB\-crtscts\fR option is given,
81 the hardware flow control setting for the serial port is left
85 Use software flow control (i.e. XON/XOFF) to control the flow of data on
86 the serial port. This option is only implemented on Linux systems
90 Add a default route to the system routing tables, using the peer as
91 the gateway, when IPCP negotiation is successfully completed.
92 This entry is removed when the PPP connection is broken.
95 Run the executable or shell command specified by \fI<p>\fR after
96 \fIpppd\fR has terminated the link. This script could, for example,
97 issue commands to the modem to cause it to hang up if hardware modem
98 control signals were not available.
100 .B escape \fIxx,yy,...
101 Specifies that certain characters should be escaped on transmission
102 (regardless of whether the peer requests them to be escaped with its
103 async control character map). The characters to be escaped are
104 specified as a list of hex numbers separated by commas. Note that
105 almost any character can be specified for the \fBescape\fR option,
106 unlike the \fBasyncmap\fR option which only allows control characters
107 to be specified. The characters which may not be escaped are those
108 with hex values 0x20 - 0x3f or 0x5e.
111 Read options from file <f> (the format is described below).
114 Specifies that \fIpppd\fR should use a UUCP-style lock on the serial
115 device to ensure exclusive access to the device.
118 Set the MRU [Maximum Receive Unit] value to <n> for negotiation.
120 will ask the peer to send packets of no more than <n> bytes.
121 The minimum MRU value is 128.
122 The default MRU value is 1500. A value of 296 is recommended for slow
123 links (40 bytes for TCP/IP header + 256 bytes of data).
126 Set the interface netmask to <n>, a 32 bit netmask in "decimal dot" notation
127 (e.g. 255.255.255.0).
130 Enables the "passive" option in the LCP. With this option,
132 will attempt to initiate a connection; if no reply is received from
135 will then just wait passively for a valid LCP packet from the peer
136 (instead of exiting, as it does without this option).
141 will not transmit LCP packets to initiate a connection until a valid
142 LCP packet is received from the peer (as for the `passive' option with
143 old versions of \fIpppd\fR).
146 .I <local_IP_address>\fB:\fI<remote_IP_address>
147 Set the local and/or remote interface IP addresses. Either one may be
148 omitted. The IP addresses can be specified with a host name or in
149 decimal dot notation (e.g. 150.234.56.78). The default local
150 address is the (first) IP address of the system (unless the
152 option is given). The remote address will be obtained from the peer
153 if not specified in any option. Thus, in simple cases, this option is
155 If a local and/or remote IP address is specified with this option,
157 will not accept a different value from the peer in the IPCP
158 negotiation, unless the
161 .B ipcp-accept-remote
162 options are given, respectively.
165 Don't request or allow negotiation of any options for LCP and IPCP (use
169 Disable Address/Control compression negotiation (use default, i.e.
170 address/control field disabled).
173 Disable asyncmap negotiation (use the default asyncmap, i.e. escape
174 all control characters).
181 Increase debugging level (same as the \fBdebug\fR option).
184 Don't fork to become a background process (otherwise
186 will do so if a serial device is specified).
189 Disable IP address negotiation (with this option, the remote IP
190 address must be specified with an option on the command line or in an
194 Disable magic number negotiation. With this option,
196 cannot detect a looped-back line.
199 Disable MRU [Maximum Receive Unit] negotiation (use default, i.e. 1500).
207 Disable protocol field compression negotiation (use default, i.e.
208 protocol field compression disabled).
211 Agree to authenticate using PAP [Password Authentication Protocol] if
212 requested by the peer, and
213 use the data in file <p> for the user and password to send to the
214 peer. The file contains the remote user name, followed by a newline,
215 followed by the remote password, followed by a newline. This option
219 Require the peer to authenticate itself using PAP.
222 Don't agree to authenticate using PAP.
225 Require the peer to authenticate itself using CHAP [Cryptographic
226 Handshake Authentication Protocol] authentication.
229 Don't agree to authenticate using CHAP.
232 Disable negotiation of Van Jacobson style IP header compression (use
233 default, i.e. no compression).
236 Request that the peer compress packets that it sends, using the
237 BSD-Compress scheme, with a maximum code size of \fInr\fR bits, and
238 agree to compress packets sent to the peer with a maximum code size of
239 \fInt\fR bits. If \fInt\fR is not specified, it defaults to the value
240 given for \fInr\fR. Values in the range 9 to 15 may be used for
241 \fInr\fR and \fInt\fR; larger values give better compression but
242 consume more kernel memory for compression dictionaries.
243 Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables
244 compression in the corresponding direction.
247 Disables compression; \fBpppd\fR will not request or agree to compress
248 packets using the BSD-Compress scheme.
251 Increase debugging level (same as \fB\-d\fR).
253 option is given, \fIpppd\fR will log the contents of all control
254 packets sent or received in a readable form. The packets are logged
255 through syslog with facility \fIdaemon\fR and level \fIdebug\fR. This
256 information can be directed to a file by setting up /etc/syslog.conf
257 appropriately (see syslog.conf(5)).
260 Disable the \fBdefaultroute\fR option. The system administrator who
261 wishes to prevent users from creating default routes with \fIpppd\fR
262 can do so by placing this option in the /etc/ppp/options file.
265 Append the domain name <d> to the local host name for authentication
266 purposes. For example, if gethostname() returns the name porsche, but the
267 fully qualified domain name is porsche.Quotron.COM, you would use the
268 domain option to set the domain name to Quotron.COM.
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.
276 Use the modem control lines. This option is the default. With this
279 will wait for the CD (Carrier Detect) signal from the modem to be asserted
280 when opening the serial device
281 (unless a connect script is specified), and it will drop the DTR (Data
282 Terminal Ready) signal briefly when the connection is terminated and before
283 executing the connect script.
284 On Ultrix, this option implies hardware
285 flow control, as for the \fBcrtscts\fR option.
288 Enable debugging code in the kernel-level PPP driver. The argument
289 \fIn\fR is a number which is the sum of the following values: 1 to
290 enable general debug messages, 2 to request that the contents of
291 received packets be printed, and 4 to request that the contents of
292 transmitted packets be printed.
295 Don't use the modem control lines. With this option,
297 will ignore the state of the CD (Carrier Detect) signal from the modem and
298 will not change the state of the DTR (Data Terminal Ready) signal.
301 Set the MTU [Maximum Transmit Unit] value to \fI<n>\fR. Unless the
302 peer requests a smaller value via MRU negotiation, \fIpppd\fR will
303 request that the kernel networking code send data packets of no more
304 than \fIn\fR bytes through the PPP network interface.
307 Set the name of the local system for authentication purposes to <n>.
310 Set the user name to use for authenticating this machine with the peer
314 Enforce the use of the hostname as the name of the local system for
315 authentication purposes (overrides the
320 Set the assumed name of the remote system for authentication purposes
324 Indicates that all secrets in the /etc/ppp/pap-secrets file which
325 are used for checking the identity of the peer are encrypted, and thus
326 pppd should not accept a password which (before encryption) is
327 identical to the secret from the /etc/ppp/pap-secrets file.
330 Add an entry to this system's ARP [Address Resolution Protocol] table
331 with the IP address of the peer and the Ethernet address of this
335 Disable the \fBproxyarp\fR option. The system administrator who
336 wishes to prevent users from creating proxy ARP entries with
337 \fIpppd\fR can do so by placing this option in the /etc/ppp/options
341 Do not exit after a connection is terminated; instead try to reopen
345 Use the system password database for authenticating the peer using
349 Disables the default behaviour when no local IP address is specified,
350 which is to determine (if possible) the local IP address from the
351 hostname. With this option, the peer will have to supply the local IP
352 address during IPCP negotiation (unless it specified explicitly on the
353 command line or in an options file).
355 .B lcp-echo-interval \fI<n>
356 If this option is given, \fIpppd\fR will send an LCP echo-request
357 frame to the peer every \fIn\fR seconds. Under Linux, the
358 echo-request is sent when no packets have been received from the peer
359 for \fIn\fR seconds. Normally the peer should respond to the
360 echo-request by sending an echo-reply. This option can be used with
361 the \fIlcp-echo-failure\fR option to detect that the peer is no longer
364 .B lcp-echo-failure \fI<n>
365 If this option is given, \fIpppd\fR will presume the peer to be dead
366 if \fIn\fR LCP echo-requests are sent without receiving a valid LCP
367 echo-reply. If this happens, \fIpppd\fR will terminate the
368 connection. Use of this option requires a non-zero value for the
369 \fIlcp-echo-interval\fR parameter. This option can be used to enable
370 \fIpppd\fR to terminate after the physical connection has been broken
371 (e.g., the modem has hung up) in situations where no hardware modem
372 control lines are available.
374 .B lcp-restart \fI<n>
375 Set the LCP restart interval (retransmission timeout) to <n> seconds
378 .B lcp-max-terminate \fI<n>
379 Set the maximum number of LCP terminate-request transmissions to <n>
382 .B lcp-max-configure \fI<n>
383 Set the maximum number of LCP configure-request transmissions to <n>
386 .B lcp-max-failure \fI<n>
387 Set the maximum number of LCP configure-NAKs returned before starting
388 to send configure-Rejects instead to <n> (default 10).
390 .B ipcp-restart \fI<n>
391 Set the IPCP restart interval (retransmission timeout) to <n> seconds
394 .B ipcp-max-terminate \fI<n>
395 Set the maximum number of IPCP terminate-request transmissions to <n>
398 .B ipcp-max-configure \fI<n>
399 Set the maximum number of IPCP configure-request transmissions to <n>
402 .B ipcp-max-failure \fI<n>
403 Set the maximum number of IPCP configure-NAKs returned before starting
404 to send configure-Rejects instead to <n> (default 10).
406 .B pap-restart \fI<n>
407 Set the PAP restart interval (retransmission timeout) to <n> seconds
410 .B pap-max-authreq \fI<n>
411 Set the maximum number of PAP authenticate-request transmissions to
414 .B pap-timeout \fI<n>
415 Set the maximum time that
417 will wait for the peer to authenticate itself with PAP to
418 <n> seconds (0 means no limit).
420 .B chap-restart \fI<n>
421 Set the CHAP restart interval (retransmission timeout for challenges)
422 to <n> seconds (default 3).
424 .B chap-max-challenge \fI<n>
425 Set the maximum number of CHAP challenge transmissions to <n> (default
428 .B chap-interval \fI<n>
429 If this option is given,
431 will rechallenge the peer every <n> seconds.
436 will accept the peer's idea of our local IP address, even if the
437 local IP address was specified in an option.
439 .B ipcp-accept-remote
442 will accept the peer's idea of its (remote) IP address, even if the
443 remote IP address was specified in an option.
445 Options can be taken from files as well as the command line.
447 reads options from the files /etc/ppp/options and ~/.ppprc before
448 looking at the command line. An options file is parsed into a series
449 of words, delimited by whitespace. Whitespace can be included in a
450 word by enclosing the word in quotes ("). A backslash (\\) quotes the
451 following character. A hash (#) starts a comment, which continues
452 until the end of the line.
455 provides system administrators with sufficient access control that PPP
456 access to a server machine can be provided to legitimate users without
457 fear of compromising the security of the server or the network it's
458 on. In part this is provided by the /etc/ppp/options file, where the
459 administrator can place options to require authentication whenever
461 is run, and in part by the PAP and CHAP secrets files, where the
462 administrator can restrict the set of IP addresses which individual
465 The default behaviour of
467 is to agree to authenticate if requested, and to not
468 require authentication from the peer. However,
471 authenticate itself with a particular protocol if it has no secrets
472 which could be used to do so.
474 Authentication is based on secrets, which are selected from secrets
475 files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP).
476 Both secrets files have the same format, and both can store secrets
477 for several combinations of server (authenticating peer) and client
478 (peer being authenticated). Note that
481 and client, and that different protocols can be used in the two
482 directions if desired.
484 A secrets file is parsed into words as for a options file. A secret
485 is specified by a line containing at least 3 words, in the order
486 client name, server name, secret. Any following words on the same line are
487 taken to be a list of acceptable IP addresses for that client. If
488 there are only 3 words on the line, it is assumed that any IP address
489 is OK; to disallow all IP addresses, use "-". If the secret starts
490 with an `@', what follows is assumed to be the name of a file from
491 which to read the secret. A "*" as the client or server name matches
492 any name. When selecting a secret, \fIpppd\fR takes the best match, i.e.
493 the match with the fewest wildcards.
495 Thus a secrets file contains both secrets for use in authenticating
496 other hosts, plus secrets which we use for authenticating ourselves to
497 others. Which secret to use is chosen based on the names of the host
498 (the `local name') and its peer (the `remote name'). The local name
501 if the \fBusehostname\fR option is given,
502 then the local name is the hostname of this machine
503 (with the domain appended, if given)
505 else if the \fBname\fR option is given,
506 then use the argument of the first \fBname\fR option seen
508 else if the local IP address is specified with a hostname,
511 else use the hostname of this machine (with the domain appended, if given)
513 When authenticating ourselves using PAP, there is also a `username'
514 which is the local name by default, but can be set with the \fBuser\fR
515 option or the \fB+ua\fR option.
517 The remote name is set as follows:
519 if the \fBremotename\fR option is given,
520 then use the argument of the last \fBremotename\fR option seen
522 else if the remote IP address is specified with a hostname,
523 then use that host name
525 else the remote name is the null string "".
527 Secrets are selected from the PAP secrets file as follows:
530 For authenticating the peer, look for a secret with client ==
531 username specified in the PAP authenticate-request, and server ==
535 For authenticating ourselves to the peer, look for a secret with
536 client == our username, server == remote name.
538 When authenticating the peer with PAP, a secret of "" matches any
539 password supplied by the peer. If the password doesn't match the
540 secret, the password is encrypted using crypt() and checked against
541 the secret again; thus secrets for authenticating the peer can be
542 stored in encrypted form. If the \fBpapcrypt\fR option is given, the
543 first (unencrypted) comparison is omitted, for better security.
545 If the \fBlogin\fR option was specified, the
546 username and password are also checked against the system password
547 database. Thus, the system administrator can set up the pap-secrets
548 file to allow PPP access only to certain users, and to restrict the
549 set of IP addresses that each user can use. Typically, when using the
550 \fBlogin\fR option, the secret in /etc/ppp/pap-secrets would be "", to
551 avoid the need to have the same secret in two places.
553 Secrets are selected from the CHAP secrets file as follows:
556 For authenticating the peer, look for a secret with client == name
557 specified in the CHAP-Response message, and server == local name.
560 For authenticating ourselves to the peer, look for a secret with
561 client == local name, and server == name specified in the
562 CHAP-Challenge message.
564 Authentication must be satisfactorily completed before IPCP (or any
565 other Network Control Protocol) can be started. If authentication
566 fails, \fIpppd\fR will terminated the link (by closing LCP). If IPCP
567 negotiates an unacceptable IP address for the remote host, IPCP will
568 be closed. IP packets can only be sent or received when IPCP is open.
570 In some cases it is desirable to allow some hosts which can't
571 authenticate themselves to connect and use one of a restricted set of
572 IP addresses, even when the local host generally requires
573 authentication. If the peer refuses to authenticate itself when
574 requested, \fIpppd\fR takes that as equivalent to authenticating with
575 PAP using the empty string for the username and password. Thus, by
576 adding a line to the pap-secrets file which specifies the empty string
577 for the client and password, it is possible to allow restricted access
578 to hosts which refuse to authenticate themselves.
581 When IPCP negotiation is completed successfully,
583 will inform the kernel of the local and remote IP addresses for the
584 ppp interface. This is sufficient to create a
585 host route to the remote end of the link, which will enable the peers
586 to exchange IP packets. Communication with other machines generally
587 requires further modification to routing tables and/or ARP (Address
588 Resolution Protocol) tables. In some cases this will be done
589 automatically through the actions of the \fIrouted\fR or \fIgated\fR
590 daemons, but in most cases some further intervention is required.
592 Sometimes it is desirable
593 to add a default route through the remote host, as in the case of a
594 machine whose only connection to the Internet is through the ppp
595 interface. The \fBdefaultroute\fR option causes \fIpppd\fR to create such a
596 default route when IPCP comes up, and delete it when the link is
599 In some cases it is desirable to use proxy ARP, for example on a
600 server machine connected to a LAN, in order to allow other hosts to
601 communicate with the remote host. The \fBproxyarp\fR option causes \fIpppd\fR
602 to look for a network interface on the same subnet as the remote host
603 (an interface supporting broadcast and ARP, which is up and not a
604 point-to-point or loopback interface). If found, \fIpppd\fR creates a
605 permanent, published ARP entry with the IP address of the remote host
606 and the hardware address of the network interface found.
609 In the simplest case, you can connect the serial ports of two machines
610 and issue a command like
612 pppd /dev/ttya 9600 passive
614 to each machine, assuming there is no \fIgetty\fR running on the
615 serial ports. If one machine has a \fIgetty\fR running, you can use
616 \fIkermit\fR or \fItip\fR on the other machine to log in to the first
617 machine and issue a command like
621 Then exit from the communications program (making sure the connection
622 isn't dropped), and issue a command like
626 The process of logging in to the other machine and starting \fIpppd\fR
627 can be automated by using the \fBconnect\fR option to run \fIchat\fR,
630 pppd /dev/ttya 38400 connect 'chat "" "" "login:" "username"
631 "Password:" "password" "% " "exec pppd passive"'
633 (Note however that running chat like this will leave the password
634 visible in the parameter list of pppd and chat.)
636 If your serial connection is any more complicated than a piece of
637 wire, you may need to arrange for some control characters to be
638 escaped. In particular, it is often useful to escape XON (^Q) and
639 XOFF (^S), using \fBasyncmap a0000\fR. If the path includes a telnet,
640 you probably should escape ^] as well (\fBasyncmap 200a0000\fR).
641 If the path includes an rlogin, you will need to use the \fBescape
642 ff\fR option on the end which is running the rlogin client, since many
643 rlogin implementations are not
644 transparent; they will remove the sequence [0xff, 0xff, 0x73, 0x73,
645 followed by any 8 bytes] from the stream.
648 Messages are sent to the syslog daemon using facility LOG_DAEMON.
649 (This can be overriden by recompiling \fIpppd\fR with the macro
650 LOG_PPP defined as the desired facility.) In order to see the error
651 and debug messages, you will need to edit your /etc/syslog.conf file
652 to direct the messages to the desired output device or file.
654 The \fBdebug\fR option causes the contents of all control packets sent
655 or received to be logged, that is, all LCP, PAP, CHAP or IPCP packets.
656 This can be useful if the PPP negotiation does not succeed.
657 If debugging is enabled at compile time, the \fBdebug\fR option also
658 causes other debugging messages to be logged.
660 Debugging can also be enabled or disabled by sending a
663 process. This signal acts as a toggle.
666 .B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)
667 Process-ID for \fIpppd\fR process on ppp interface unit \fIn\fR.
670 A program or script which is executed when the link is available for
671 sending and receiving IP packets (that is, IPCP has come up). It is
672 executed with the parameters
674 \fIinterface-name tty-device speed local-IP-address
677 and with its standard input,
678 output and error streams redirected to \fB/dev/null\fR.
680 This program or script is executed with the same real and effective
681 user-ID as \fIpppd\fR, that is, at least the effective user-ID and
682 possibly the real user-ID will be \fBroot\fR. This is so that it can
683 be used to manipulate routes, run privileged daemons (e.g.
684 \fBsendmail\fR), etc. Be careful that the contents of the
685 /etc/ppp/ip-up and /etc/ppp/ip-down scripts do not compromise your
689 A program or script which is executed when the link is no longer
690 available for sending and receiving IP packets. This script can be
691 used for undoing the effects of the /etc/ppp/ip-up script. It is
692 invoked with the same parameters as the ip-up script, and the same
693 security considerations apply, since it is executed with the same
694 effective and real user-IDs as \fIpppd\fR.
696 .B /etc/ppp/pap-secrets
697 Usernames, passwords and IP addresses for PAP authentication.
699 .B /etc/ppp/chap-secrets
700 Names, secrets and IP addresses for CHAP authentication.
703 System default options for
705 read before user default options or command-line options.
708 User default options, read before command-line options.
710 .B /etc/ppp/options.\fIttyname
711 System default options for the serial port being used, read after
712 command-line options.
717 .I Compressing TCP/IP headers for low-speed serial links.
722 .I The MD5 Message-Digest Algorithm.
727 .I PPP Internet Protocol Control Protocol (IPCP).
731 Lloyd, B.; Simpson, W.A.
732 .I PPP authentication protocols.
737 .I The Point\-to\-Point Protocol (PPP).
742 .I PPP in HDLC Framing.
745 The following signals have the specified effect when sent to the
750 These signals cause \fBpppd\fR to terminate the link (by closing LCP),
751 restore the serial device settings, and exit.
754 This signal causes \fBpppd\fR to terminate the link, restore the
755 serial device settings, and close the serial device. If the
756 \fBpersist\fR option has been specified, \fBpppd\fR will try to reopen
757 the serial device and start another connection. Otherwise \fBpppd\fR
763 to renegotiate compression. This can be useful to re-enable
764 compression after it has been disabled as a result of a fatal
765 decompression error. With the BSD Compress scheme, fatal
766 decompression errors generally indicate a bug in one or other
775 Paul Mackerras (paulus@cs.anu.edu.au).