home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / HOWTO / PPP-HOWT < prev    next >
Encoding:
Text File  |  1995-04-20  |  40.0 KB  |  1,120 lines

  1.   Linux PPP HOWTO
  2.   Al Longyear, longyear@netcom.com
  3.   January 8, 1995.
  4.  
  5.   This document contains a list the most Frequently Asked Questions
  6.   (FAQ) about PPP for Linux (and their answers).  It is really not a
  7.   HOWTO, but is in `classical' Question / Answer form.  This is but one
  8.   of the Linux HOWTO/FAQ documents.  You can get the HOWTO's from sun-
  9.   site.unc.edu:/pub/Linux/doc/HOWTO (this is the `official' place) or
  10.   via WWW from the Linux Documentation home page
  11.   (http://sunsite.unc.edu/mdw/linux.hmtl).  You cannot rely on the
  12.   HOWTO's being posted to comp.os.linux.answers, as some news feeds have
  13.   complained about their size.
  14.  
  15.   1.  Please send any corrections to longyear@netcom.com.  Preface
  16.  
  17.   Throughout this document, I have used the word `remote' to mean `the
  18.   system at the other end of the modem link'. It is also called `peer'
  19.   in the PPP documentation.  Another name for this is called the
  20.   `gateway' when the term is use for routing.  Its IP address will show
  21.   as the `P-t-P' address if you use ifconfig.
  22.  
  23.   Microsoft is a registered trademark of Microsoft Corporation. Morning
  24.   Star is a registered trademark of Morning Star Technologies
  25.   Incorporated. All other products mentioned are trademarks of their
  26.   respective companies.
  27.  
  28.  
  29.  
  30.   2.  General information
  31.  
  32.   2.1.  A: PPP, or Point-to-Point Protocol, is a recognized `official'
  33.   internet protocol.  It is a protocol used to exchange IP frames (and
  34.   others) over a serial link.  The current RFC for PPP is 1661.  There
  35.   are many related ones.  What is PPP?
  36.  
  37.   Contrary to what some people think, it does not mean "Peer to Peer
  38.   Processing"; although you may do peer-peer communications using TCP/IP
  39.   over a PPP link.
  40.  
  41.  
  42.  
  43.   2.2.  A: In general, no.  A `classical' PPP implementation requires
  44.   that you make changes to the routes and network devices supported by
  45.   the operating system.  This may mean that you will have to rebuild the
  46.   kernel for the remote computer.  My university (company) does not sup-
  47.   port PPP. Can I use PPP?
  48.  
  49.   This is not a job for a general user.  If you can convince your
  50.   administration people that PPP is a `good thing' then you stand a
  51.   chance of getting it implemented.  If you can't, then you probably
  52.   can't use PPP.
  53.  
  54.   However, if you are using a system which is supported by the people
  55.   who are marketing the "TIA" (The Internet Adapter) package, then there
  56.   is hope.  I do not have much information on this package, however,
  57.   from what I have found, they plan to support PPP in "the next
  58.   version".  (My information may be old.  Contact them directly.
  59.   Information on TIA is available at ftp.marketplace.com in the /pub/tia
  60.   directory.)
  61.  
  62.   A Linux port is on their list.
  63.  
  64.   If your system is not supported by TIA and you can't convince the
  65.   admin group to support PPP then you should use the `term' package.
  66.   Some service providers will object to you running `term'. They have
  67.   many different reasons, however the most common is `security
  68.   concerns'.
  69.  
  70.  
  71.  
  72.   2.3.  A: It is in two parts.  The first part is in the kernel.  In the
  73.   kernels from 1.1.13, the driver is part of the network system drivers.
  74.   Where is PPP?
  75.  
  76.   Do not replace the driver in the kernel with a version from the pppd
  77.   package!!!
  78.  
  79.   The second part is the `daemon' process, pppd. This is a required
  80.   process.  The source to it is in the file ppp-2.1.2b.tar.gz located on
  81.   sunsite.unc.edu in the /pub/Linux/system/Networking/serial directory.
  82.  
  83.   It should also be somewhere on ftp.funet.fi.
  84.  
  85.   For kernels before 1.1.13, the necessary driver is included in the
  86.   daemon code.
  87.  
  88.  
  89.  
  90.   2.4.  A: Read The Fine Material available.  I just obtained PPP. What
  91.   do I do with it?
  92.  
  93.   Start by reading the README file and then the README.linux file.  The
  94.   documentation sources are listed below.
  95.  
  96.  
  97.  
  98.   2.5.  (Where's the documentation? Is there a HOWTO?, etc.)  Where are
  99.   additional sources of information for PPP?
  100.  
  101.   A: There are several sources of information for the PPP protocol as
  102.   implemented under Linux.
  103.  
  104.  
  105.   o  The README file in the source package.
  106.  
  107.   o  The README.linux file in the source package.
  108.  
  109.   o  The Net-2-HOWTO document.
  110.  
  111.   o  The Network Administration Guide.
  112.  
  113.   o  The pppd man page.
  114.  
  115.   o  The ppp FAQ document. (This is not it, by the way.)
  116.  
  117.   The HOWTO file is stored in the usual place for the Linux HOWTOs.
  118.   That is currently on sunsite.unc.edu in the directory
  119.   /pub/Linux/docs/HOWTO.
  120.  
  121.   The Network Administration Guide is available in the docs/linux-doc-
  122.   project/nag directory on sunsite.  It is published by O'Riellly and
  123.   Associates.  So, if you want a really professional document, then buy
  124.   a copy from your local bookstore.
  125.  
  126.   The `man' pages are included in the source package.  You will probably
  127.   have to move them to the normal man directory, /usr/man/man8 before
  128.   the man command may find them.  Alternately, you may use nroff and
  129.   more to view them directly.
  130.  
  131.   The PPP faq document describes the PPP protocol itself and the various
  132.   implementations.  You will find the FAQ for the usenet news group,
  133.   comp.protocols.ppp, archived on rtfm.mit.edu in the /usenet directory.
  134.   It is in eight parts at the present time.
  135.  
  136.  
  137.  
  138.   2.6.  A: I would prefer that you post them to the comp.protocols.ppp
  139.   group. That is its purpose. I recognize that most people tend to post
  140.   things to the comp.os.linux.*  groups first.  You will usually get a
  141.   response even if you use these wrong groups.  However, it is better
  142.   that you do ask in the proper group.  Where should I post questions
  143.   about PPP?
  144.  
  145.   Very few questions are related directly to the Linux port.  Most of
  146.   the questions are general use of the ppp package and are exactly
  147.   applicable to the remainder of the pppd users.
  148.  
  149.   Please, if you must use usenet for PPP questions, use
  150.   comp.protocols.ppp.
  151.  
  152.  
  153.  
  154.   2.7.  A: This is one of the most sickening questions. I realize that
  155.   this is a plea for help.  However, it is practically useless to post
  156.   this message with no other information.  I, and most others, will only
  157.   ignore it.  The PPP software doesn't work.  HELP!!!
  158.  
  159.   Please see the question regarding errors which normally occur at the
  160.   modem's disconnection.  They are not the cause of a problem, only a
  161.   symptom. Posting a message with only those errors is also meaningless.
  162.  
  163.   What is needed is the output of the system log (syslog) when you run
  164.   the pppd program with the option `debug'.  In addition, if you are
  165.   using chat then please use the `-v' option to run the sequence with
  166.   verbose output.
  167.  
  168.   Please include the output from the kernel's startup.  This shows the
  169.   various kernel hardware information such as your UART type, PPP
  170.   version, etc.
  171.  
  172.   Please include all information that you can relating to the problem.
  173.   However your system configuration, disk drive configuration, terminal
  174.   type, mouse location and button status, etc. are irrelevant.  What is
  175.   important is the system to which your are trying to contact, the ppp
  176.   (or terminal server) that they are using, the modem types and speed
  177.   that you are using, etc.
  178.  
  179.   Take care and go through the output.  Remove the references to the
  180.   telephone number, your account name, and the password.  They are not
  181.   important to analyzing the problem and would pose a security risk to
  182.   you if you published them to usenet.  Also discard the lines which
  183.   neither come from the kernel nor pppd.
  184.  
  185.   Do NOT run the pppd program with the option `kdebug 7' and post that!
  186.  
  187.   If the problem warrants examining the data stream, then you will be
  188.   contacted by email and asked to mail the trace.  Usenet already costs
  189.   too much for too many people.
  190.  
  191.   Information is written to various levels.  The debug information is
  192.   written to the debug level.  The informational messages are written to
  193.   the info level.  The errors are written to the error level.  Please
  194.   include all levels the the `local2' group which come from the pppd
  195.   process.
  196.  
  197.   In addition, please do not delete the time stamp information.  It is
  198.   important.
  199.   2.8.  server?  A: Yes. The local address is not significant to the
  200.   local system.  You must have a unique remote IP address.  The routing
  201.   is performed based upon the remote IP address and not the local IP
  202.   address.  Can I use the same local IP address for all of the lines of
  203.   my PPP
  204.  
  205.  
  206.  
  207.   3.  Other implementations
  208.  
  209.   3.1.  A: Check the PPP FAQ document mentioned above.  Do you know of a
  210.   implementation for PPP other than Linux?
  211.  
  212.   AIX is due to be supported in the 2.2 version of the pppd process.
  213.   HP-UX is, to my knowledge, only supported by the Morning Star
  214.   commercial package.
  215.  
  216.   If you don't find one listed then post to the comp.protocols.ppp group
  217.   and not the Linux group.
  218.  
  219.   (Please don't mail me asking for "Do you know of a PPP package for
  220.   ..."?  These requests will now be `appropriately' filed. ;-))
  221.  
  222.  
  223.  
  224.   3.2.  A: Yes, we know.  The dp package was considered very early in
  225.   the development stage quite a few months back.  It is nice.  It sup-
  226.   ports 'demand dial'.  It also only works with systems which support
  227.   streams.  This is primarily the SunOS (Solaris) operating systems.
  228.   Did you know that there is a program called `dp'?
  229.  
  230.   Linux, at the present time, does not supports streams.
  231.  
  232.   There are several other packages for PPP available on the `net'. The
  233.   `portable ppp' package is very much like the TIA code. There is
  234.   another package called simply `ppp'. There is code for PPP in the KA9Q
  235.   package.
  236.  
  237.   Of all of the packages available, the pppd package was the closest to
  238.   the requirements and functions of Linux to warrant the port.
  239.  
  240.   (If you want more information about these other packages, ask in the
  241.   comp.protocols.ppp group!)
  242.  
  243.  
  244.  
  245.   3.3.  What RFCs describe the PPP protocol?
  246.  
  247.   A: The current implementation of PPP is a mixture of several.  The
  248.   major portion of the PPP code is written against the RFCs 1331 and
  249.   1332.  These RFCs were later obsoleted.  1331 was replaced by 1548 and
  250.   that, in turn, was obsoleted by 1661 six months later.
  251.  
  252.   Most implementations of PPP will be happy to talk to the Linux PPP
  253.   code.
  254.  
  255.   A complete list is in the PPP faq.
  256.  
  257.   [to quote the FAQ document]:
  258.  
  259.  
  260.        All of 1134, 1171, and 1172 (and 1055, for that matter :-)
  261.        have been obsoleted.  They're interesting only if you want
  262.        to debug a connection with an ancient PPP implementation,
  263.        and you're wondering why (e.g.)  it asked you for IPCP
  264.        option 2 with a length of only 4, and Compression-Type
  265.   0x0037.
  266.  
  267.   (There's a lot of that still running around - be careful out
  268.   there.)
  269.  
  270.  
  271.   Linux PPP will not support this.
  272.  
  273.  
  274.  
  275.   4.  Compatibility
  276.  
  277.   4.1.  A: No. SLIP works with SLIP. PPP works with PPP.  Can PPP talk
  278.   to a SLIP interface?
  279.  
  280.   Some vendors may offer products which work both as SLIP and PPP.
  281.   However, they must be configured to run in one mode or the other.
  282.   There is no present method to determine, based upon the protocol
  283.   passed at the time of a connection, which combination of SLIP
  284.   protocols or PPP is being requested.
  285.  
  286.  
  287.  
  288.   5.  Which is better?
  289.  
  290.   5.1.  A: IT DEPENDS UPON MANY FACTORS.  The people who post this type
  291.   of question have usually not read the Net-2-HOWTO document.  Which is
  292.   better? PPP or SLIP?
  293.  
  294.   A good technical discussion is available at Morning Star's www server,
  295.   www.morningstar.com.
  296.  
  297.  
  298.  
  299.   5.2.  A: If you have the choice, use CHAP.  Failing that, PAP is bet-
  300.   ter than nothing.  Is CHAP or PAP better for authentication?
  301.  
  302.  
  303.  
  304.   6.  Authentication files
  305.  
  306.   6.1.  /etc/ppp/pap-secrets file
  307.  
  308.   A: The PAP protocol is most often implemented as your user name and
  309.   password.  You need to include the name of the remote system, your
  310.   account name, and the password.  If the user on abbot wishes to call
  311.   costello, the entry would be similar to the following.
  312.  
  313.  
  314.  
  315.           #remote    account    password     IP address list
  316.           *          abbot      firstbase
  317.  
  318.  
  319.  
  320.  
  321.  
  322.   6.2.  A: The most common problem is that people don't recognize that
  323.   CHAP deals with a pair of secrets.  Both computers involved in the
  324.   link must have both secrets to work.  /etc/ppp/chap-secrets file
  325.  
  326.   For example, if abbot wants to talk to costello, then abbot's file
  327.   would have:
  328.  
  329.  
  330.  
  331.      #local      remote         secret        IP address list
  332.      abbot       costello       firstbase
  333.      costello    abbot          who
  334.  
  335.  
  336.  
  337.  
  338.   And costello's file would have:
  339.  
  340.  
  341.  
  342.           #local      remote         secret        IP address list
  343.           abbot       costello       firstbase
  344.           costello    abbot          who
  345.  
  346.  
  347.  
  348.  
  349.  
  350.   7.  Construction problems
  351.  
  352.   7.1.  A: Did you edit the ppp.c file to reflect the settings for the
  353.   kernel that you are using?  There are two defines which must be set
  354.   correctly if you are going to compile the code for PPP.  I get compile
  355.   errors when I try to compile the kernel
  356.  
  357.  
  358.  
  359.  
  360.         ._____________________.__________________._________________________.
  361.         |                     |                  |                         |
  362.         |  kernel version     |     NET02D       |     NEW_TTY_DRIVERS     |
  363.         |_____________________|__________________|_________________________|
  364.         |                     |                                            |
  365.         |  < 1.0.0            |              UPGRADE!!!                    |
  366.         |_____________________|__________________._________________________|
  367.         |  1.0.0  - 1.0.*     |     defined      |     undefined           |
  368.         |  1.1.0  - 1.1.3     |     defined      |     undefined           |
  369.         |  1.1.4  - 1.1.12    |     undefined    |     undefined           |
  370.         |_____________________|__________________|_________________________|
  371.         |                     |                                            |
  372.         |  1.1.13             |              UPGRADE!!!                    |
  373.         |_____________________|__________________._________________________|
  374.         |                     |                  |                         |
  375.         |  1.1.14 - ... NOTE  |     undefined    |     defined             |
  376.         |_____________________|__________________|_________________________|
  377.  
  378.  
  379.  
  380.  
  381.   The third define near the top of the file is called
  382.   OPTIMIZE_FLAG_TIME.  This may or may not be set with any version of
  383.   the kernel which supports PPP.
  384.  
  385.   Additional information is in the ppp.c file.
  386.  
  387.   NOTE: For kernels from 1.1.14, do not replace the ppp.c file in the
  388.   drivers/net directory nor the ppp.h file in the /usr/include/linux
  389.   directory.  The drivers and the include file are the proper values for
  390.   your kernel.
  391.  
  392.   So, from the above list, you will find that 1.1.8 kernel will need
  393.   NET02D and NEW_TTY_DRIVERS both undefined.  Likewise, the 1.1.18
  394.   kernel will already have things configured for it.  Do nothing
  395.   special.
  396.  
  397.   8.  Problems running pppd
  398.  
  399.   8.1.  PPPD won't run unless you are root
  400.  
  401.   A: The pppd process needs to make changes to the networking system and
  402.   this can only be done if you are the root user.  If you wish to run
  403.   pppd from other than the root user then the pppd program needs to be
  404.   secured 'suid to root'.
  405.  
  406.  
  407.  
  408.           chown root pppd
  409.           chmod 4755 pppd
  410.  
  411.  
  412.  
  413.  
  414.   If you wish to control the pppd access to a select group of people,
  415.   then make the pppd process owned by the group and do not permit all
  416.   others to run the program.
  417.  
  418.  
  419.   8.2.  A: Sorry, I goofed. You will have to forego the binaries and re-
  420.   compile the code yourself.  It is easy.  Go to the pppd directory,
  421.   delete the bad binary, and issue the command `make'.  Go to the chat
  422.   directory and do the same if you want a corrected chat program.  The
  423.   ppp-2.1.2b package says it needs the 4.6 libraries
  424.  
  425.   You must have the C language compiler and GNU make installed to
  426.   rebuild the PPP software.
  427.  
  428.   It turns out that when I compiled the ppp-2.1.2b package, while I used
  429.   the proper definitions, I used the 4.6 libraries.  One of these days,
  430.   Al may finally get his act together . . . .
  431.  
  432.   Or, you can get binaries from the Slackware 2.0.2 (or later) package.
  433.   They are in the ppp.tgz file in the `n' series of disks.
  434.  
  435.   Please use the source in the ppp-2.1.2b to compile the code.  The
  436.   source has been corrected over the `a' package.
  437.  
  438.  
  439.  
  440.   8.3.  A: You need to create the directory /var/run.  On earlier Slack-
  441.   ware distributions, this was a symbolic link to the /etc directory.
  442.   unable to create pid file: no such file or directory
  443.  
  444.   This is a warning.  The ppp software will work normally in spite of
  445.   this message.  However, the ppp-off script depends upon this file.  It
  446.   is a good idea to create the directory or make the link to the
  447.   appropriate location.
  448.  
  449.   The posix header, paths.h, defines the location for the pid file under
  450.   the name "_VAR_RUN".  If you wish to use a different directory for PPP
  451.   and others, change the value for this define and rebuild the software.
  452.  
  453.  
  454.  
  455.   8.4.  A: You need to create the directory /etc/ppp and have a file
  456.   called 'options' in that directory. It needs to be readable by the
  457.   pppd process (root).  /etc/ppp/options: no such file or directory
  458.  
  459.   The file may be empty.  To make an empty file use the `touch' command.
  460.  
  461.   See the pppd man page, pppd.8, for a description of this file.
  462.  
  463.   8.5.  A: This happens with many configurations of the Telebit Net-
  464.   blazer.  The problem is not the terminal server, but the site which
  465.   has not configured the terminal server with a set of IP addresses.
  466.   Could not determine local IP address
  467.  
  468.   The Netblazer does not have your IP address.  You do not have your IP
  469.   address.  The link will not work unless both IP addresses are known.
  470.  
  471.   You must have been given a piece of paper with both IP addresses
  472.   written upon it.  You must tell the Netblazer the IP addresses to be
  473.   used.  Use the local IP address and the remote IP address as a
  474.   parameter to the pppd process.
  475.  
  476.   Use the pppd option format of:
  477.  
  478.  
  479.  
  480.           local_ip:remote_ip
  481.  
  482.  
  483.  
  484.  
  485.   (That is the local IP address, a colon, and the remote IP address.)
  486.  
  487.  
  488.  
  489.   8.6.  A: See the previous question.  Could not determine remote IP
  490.   address.
  491.  
  492.  
  493.  
  494.   8.7.  A: There is a one in over four billion chance that the two sys-
  495.   tems have chosen the same magic number.  If you get a continual fail-
  496.   ure about the magic number, the chances that this is a fluke will geo-
  497.   metrically reduce.  The magic number is always NAKed. It won't connect
  498.  
  499.   The two most common reasons for this failure are:
  500.  
  501.  
  502.   o  The modem has disconnected immediately upon making the connection
  503.      and logging you on to the remote.  Most modems are configured to
  504.      echo the data sent to them and you are seeing the local echo from
  505.      the modem.
  506.  
  507.  
  508.   o  The remote ppp software is not running when you think it is.  Is
  509.      the remote system configured to run PPP? Is the ppp process in the
  510.      expected location?  Is the privileges suitable so that you may run
  511.      it?
  512.  
  513.      This would indicate that the shell is doing the local echo of the
  514.      data.
  515.  
  516.  
  517.   In either case, the Linux system is sending data to the remote which
  518.   is being fed immediately back into the serial receiver.  This is not
  519.   an acceptable condition.  You have what is called a "loop".
  520.  
  521.  
  522.  
  523.   8.8.  A: This usually occurs when you are trying to connect to a
  524.   Xyplex terminal server. Version 5.1 of the Xyplex terminal server
  525.   software, according to Xyplex, has numerous problems with PPP. It is
  526.   strongly recommended that you update the Xyplex software to at least
  527.   version 5.3.  protocol reject for protocol fffb
  528.  
  529.   If you must use version 5.1, then use the pppd option "vj-max-slots 3"
  530.   to limit the number of slots to three. The problem on the Xyplex
  531.   server is that it will accept the request for the default 16 slots,
  532.   but fail to operate beyond the third slot. It should have return a NAK
  533.   frame with the limit, but it does not.
  534.  
  535.   Alternately, you can disable the Van Jacobson header compression with
  536.   the option "-vj".
  537.  
  538.  
  539.  
  540.   8.9.  and then finally disconnects.  A: Examine the system log when
  541.   you use the "debug" option.  (You will need the system log data anyway
  542.   if you are going to ask for help.)  If the trace shows that it is
  543.   sending the LCP-request frame over and over again and the id number is
  544.   not incrementing then you are not exchanging frames with the remote
  545.   PPP software.  The PPP software connects but just sends message after
  546.   message
  547.  
  548.   Three common reasons for this are:
  549.  
  550.  
  551.   o  You don't have the ppp software running on the other end.  You are
  552.      sending the PPP frames to some other program which is probably
  553.      saying "What is this #$%^ ?"
  554.  
  555.      Please make sure that you have the ppp software started on the
  556.      other end before you enter the ppp protocol sequence.  Try to use a
  557.      normal modem program and go through the logon sequence that you
  558.      would normally do.  Do you see the ppp frames being sent to you?
  559.  
  560.      The ppp frames are fairly distinctive.  They will be about 16
  561.      characters in length and contain several { characters.  They should
  562.      not have a carriage return character after them and are sent out in
  563.      a burst with a pause between the bursts.
  564.  
  565.  
  566.   o  The line is not "eight bit clean".  This means that you need to
  567.      have eight data bits, no parity, and one stop bit.  The PPP link
  568.      absolutely requires eight data bits.
  569.  
  570.      The pppd software will automatically put the line into eight data
  571.      bits, no parity, and one stop bit.  The remote must match this
  572.      configuration or framing and parity errors may occur.
  573.  
  574.      PPP will escape characters.  It is not possible for it to escape
  575.      bits as kermit does.  PPP will not work with a seven bit
  576.      communications link.
  577.  
  578.      There is a compile option in the ppp.c driver (part of the kernel)
  579.      called CHECK_CHARACTERS which will include additional code in the
  580.      driver to provide additional checking on the input characters. It
  581.      will be able to tell you if the parity was enabled or if the remote
  582.      system always sent the characters as seven bits.
  583.  
  584.  
  585.   o  The remote is configured to require authentication such as PAP or
  586.      CHAP.  You have not configured the local system to use this
  587.      feature.  Therefore, the remote is discarding all of your frames
  588.      until it sees a valid authentication frame from you.  Since you are
  589.      not configured to generate the frames, the IPCP frames which you
  590.      send are being ignored.
  591.  
  592.      In this case, either configure the remote to not expect
  593.      authentication or configure the local system to do authentication
  594.      and supply the proper secrets.
  595.   8.10.  A: Some users of the merit network have indicated that it needs
  596.   PAP.  Did you try PAP authentication?  I can't connect to the merit
  597.   network.
  598.  
  599.  
  600.  
  601.   9.  DIP
  602.  
  603.   9.1.  A: The current version of dip-uri supports PPP in that it will
  604.   execute the pppd process when you execute `mode ppp'. However, there
  605.   are many options which are needed for the proper operation of pppd.
  606.   Since dip does not pass these to the program, they must be stored in
  607.   the /etc/ppp/options file.  DIP does not have support for PPP's mode
  608.  
  609.   The dip program controls the establishment of the SLIP link. It
  610.   controls the SLIP link with the aid of slattach, ifconfig, and route.
  611.   These programs may be used to establish a SLIP link. They are not
  612.   useful for the establishment of a PPP link.
  613.  
  614.   The dip program may be used to dial the telephone and start the ppp
  615.   software on the remote system.  It is best used in this mode as the
  616.   parameter to the `connect' option. However, you have the option to use
  617.   dip to control the link. It is not important how pppd be executed to
  618.   run the ppp link. It is only important that it be executed as it is a
  619.   mandatory program for the PPP protocol.
  620.  
  621.  
  622.  
  623.   10.  Process termination
  624.  
  625.   10.1.  A: No. There is no `dip -k'.  Is there a `dip -k' for PPP?
  626.  
  627.   In the chat directory, there is a `ppp-off' script.  This will stop
  628.   the ppp link in the same manner as the 'dip -k'.
  629.  
  630.   I have included it below.  (Cut it out.  Store it in its own file.
  631.   Make the file executable with chmod.)
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.   ______________________________________________________________________
  662.   #!/bin/sh
  663.   DEVICE=ppp0
  664.   #
  665.   # If the ppp0 pid file is present then the program is running. Stop it.
  666.   if [ -r /var/run/$DEVICE.pid ]; then
  667.           kill -INT `cat /var/run/$DEVICE.pid`
  668.   #
  669.   # If the kill did not work then there is no process running for this
  670.   # pid. It may also mean that the lock file will be left. You may wish
  671.   # to delete the lock file at the same time.
  672.           if [ ! "$?" = "0" ]; then
  673.                   rm -f /var/run/$DEVICE.pid
  674.                   echo "ERROR: Removed stale pid file"
  675.                   exit 1
  676.           fi
  677.   #
  678.   # Success. Let pppd clean up its own junk.
  679.           echo "PPP link to $DEVICE terminated."
  680.           exit 0
  681.   fi
  682.   #
  683.   # The ppp process is not running for ppp0
  684.   echo "ERROR: PPP link is not active on $DEVICE"
  685.   exit 1
  686.   ______________________________________________________________________
  687.  
  688.  
  689.  
  690.  
  691.   10.2.  A: There are several reasons for this.  PPP does not hangup the
  692.   modem when it terminates
  693.  
  694.  
  695.   o  Did you use the pppd `modem' parameter?  This parameter controls
  696.      whether or not the pppd process is to control and honor the signals
  697.      reflecting the modem status.  This parameter is explained in the
  698.      man page for pppd.
  699.  
  700.   o  Do you have the modem presenting the DCD signal and honoring DTR?
  701.      The Hayes sequence for this is usually "&C1".  If you reset the
  702.      modem during the connection sequence with "ATZ" then ensure that
  703.      your modem is configured correctly.
  704.  
  705.      The DTR signal is generated by the computer and instructs the modem
  706.      to disconnect.  Hayes sequence for this is usually "&D1" or "&D2"
  707.      with "&D2" being the preferred setting for PPP.  Many manufacturers
  708.      will ignore the DTR condition in their `factory defaults' setting.
  709.  
  710.  
  711.   o  Did you use a cheap cable which does not pass the DCD signal?
  712.      Macintosh `classic' cables are notorious for this problem.  That
  713.      Macintosh does not use this signal.
  714.  
  715.   o  For dial-in connections, did you exec the pppd process properly?
  716.  
  717.      The pppd process should be `exec'ed from the script rather than
  718.      simply executed.  If you attempt to simply run the pppd process
  719.      then it will be the shell which will receive the SIGHUP hangup
  720.      signal and not the pppd process.
  721.  
  722.      The `shell' script should have a format similar to the following:
  723.  
  724.  
  725.  
  726.  
  727.      ___________________________________________________________________
  728.      #!/bin/sh
  729.      exec pppd -detach modem ...
  730.      ___________________________________________________________________
  731.  
  732.  
  733.  
  734.  
  735.   11.  Data Transfer related issues
  736.  
  737.   11.1.  correctly if I `get' a file.  A: Do you have the flow control
  738.   enabled? Flow control is set by the pppd option crtscts for RTS/CTS
  739.   and xonxoff for XON/XOFF.  If you don't enable the flow control then
  740.   you will probably overrun the modem's buffers and this will prove to
  741.   be disastrous with vj header compression.  ftp transfers die when I do
  742.   a `put' but they work
  743.  
  744.  
  745.  
  746.   11.2.  How do I use XON/XOFF for flow control?
  747.  
  748.   A: The better flow control is CTS/RTS. However, if you can not do the
  749.   hardware flow control with the signals CTS and RTS, then use XON/XOFF.
  750.   The following three steps need to be performed.
  751.  
  752.  
  753.  
  754.   o  You need to specify the pppd option xonxoff. This tells the pppd
  755.      process to configure the serial device for XON/XOFF flow control
  756.      and to load the two characters into the tty driver.
  757.  
  758.   o  You need to specify the XON and XOFF characters in the pppd
  759.      parameter asyncmap. This tells the remote system that is should
  760.      quote the XON and XOFF characters when it wishes to send them to
  761.      you.  It is normally specified as the pppd parameter `asyncmap
  762.      a0000'.
  763.  
  764.   o  Of course, don't forget to tell the modem to use XON/XOFF flow
  765.      control.  My ZyXEL modem uses a sequence `&R1&H4' to do this.
  766.  
  767.  
  768.   11.3.  A: Put the desired rate as an option to the pppd process.  If
  769.   you don't put the rate, then pppd process will use whatever rate is
  770.   set currently at the time.  Not all programs will restore all of the
  771.   parameters to the previous settings properly upon exit.  This may lead
  772.   to strange rates configured for the serial device.  Modem never seems
  773.   to connect at a the high rate
  774.  
  775.  
  776.  
  777.   11.4.  A: Use the ppp-2.1.2b.tar.gz package.  The pppd process was
  778.   erroneously compiled with the 1.1.8 kernel and it used Net-3 rather
  779.   than Net-2 definitions.  The proxyarp function fails to find the hard-
  780.   ware address.
  781.  
  782.   Additionally, you should refer to the proxy-ARP mini-HOWTO about the
  783.   requirements for using proxy-ARP.
  784.  
  785.  
  786.  
  787.   11.5.  A: Look at the boot messages when you boot the kernel.  If it
  788.   says "PPP version 0.1.2" then you have an old version of the ppp.c
  789.   driver.  ioctl(TIOCGETD): I/O error" or "ioctl(PPPIOCSINPSIG): I/O
  790.   error".
  791.  
  792.  
  793.   If it says "PPP version 0.2.7" then you have the current driver,
  794.   however, it was not built with the same set of defines for the ioctl
  795.   numbers.  Ensure that you have only one file called "ppp.h".  It
  796.   should be located in the kernel's include/linux directory.  Once you
  797.   have done this, rebuild the kernel and the pppd process.
  798.  
  799.  
  800.  
  801.   12.  Routing and other problems
  802.  
  803.   12.1.  A: This is not a question for PPP.  My route to the remote
  804.   keeps disappearing!
  805.  
  806.   Hint: DON'T RUN routed!
  807.  
  808.  
  809.  
  810.   12.2.  A: Did you forget the `defaultroute' parameter to pppd? This
  811.   parameter adds a default route into your routing system so that frames
  812.   to all other IP addresses will be sent to the PPP device.  I can only
  813.   reach the remote server.
  814.  
  815.   The PPP software will not replace the default route if you have one
  816.   already set when you run pppd.  This is done to prevent people from
  817.   destroying their default route to the ethernet routers by accident.  A
  818.   warning message is written to the system log if the defaultroute
  819.   parameter is not performed for this reason.
  820.  
  821.  
  822.  
  823.   12.3.  A: The problem then is not with the local Linux system.  It
  824.   most likely is routing problem on the remote end.  I have defaultroute
  825.   can only reach the remote server.
  826.  
  827.   The remote system is not configured for `IP forwarding'.  It is an RFC
  828.   requirement that this option NOT be enabled by default.  You must
  829.   enable the option.  For Linux systems, you will need to build the
  830.   kernel and specify that you want IP forwarding/gatewaying.
  831.  
  832.   The remote computers need a route back to you just as you need a route
  833.   to them.  This may be accomplished by one of four methods.  Each has
  834.   advantages and limitations.  You need to do one and only one of these.
  835.  
  836.  
  837.   o  Use a host route.  At each host on the remote system, add a host
  838.      route to your Linux IP address with the gateway being the terminal
  839.      server that you use for your local access.  This will work if you
  840.      have a small number of host systems and a simple network without
  841.      bridges, routers, gateways, etc.
  842.  
  843.   o  Use a network route.  Subdivide the remote IP addresses so that
  844.      your local Linux IP address and the remote terminal server address
  845.      and the remote terminal server's ethernet address is on the same IP
  846.      domain.  This will work if you have the IP addresses to spare. It
  847.      will work very well if you have a Class-B IP domain and can afford
  848.      to put the all of the remote addresses on the same IP domain.  Then
  849.      add a network route on each of the gateways and routers so that any
  850.      address of the remote network is sent to the terminal server.  Most
  851.      configurations have many hosts but few routers. (At sii.com, we
  852.      have over 300 active host systems with only 3 routers.)
  853.  
  854.   o  Use gated on all of the gateways and on the terminal server.  This
  855.      will cause the terminal server to broadcast to the gateways that it
  856.      can accept the frames for your IP address.  Since the hosts will
  857.      have a default route to one of the gateways, the gateways will
  858.      generate the ICMP re-direct frame and the specific host will
  859.      automatically add its host route.
  860.  
  861.   o  Use proxy ARP on the terminal server.  This will only work if your
  862.      remote IP address is in the same IP domain as one of the domains
  863.      for the network cards.
  864.  
  865.   There is no clear solution.  You must choose one of these.
  866.  
  867.  
  868.  
  869.   12.4.  A: You are not able to do this because you don't have a route
  870.   to the address.  This is the normal operating environment.  Don't try
  871.   to ping the local IP address.  I can not ping my local IP address
  872.  
  873.   If you wish to ping your own system then use the loopback address of
  874.   127.0.0.1.
  875.  
  876.   You may be able to ping the remote address.  However, some terminal
  877.   servers may not allow this as the address may be 'phony' to them.  It
  878.   depends upon their environment.
  879.  
  880.   In general, don't try to ping either address. Choose a third address
  881.   which is well known to be available on the remote network such as the
  882.   name server IP address.
  883.  
  884.  
  885.  
  886.   13.  Interactions with other PPP implementations
  887.  
  888.   13.1.  terminates.  A: Trumpet does not like any VJ header compres-
  889.   sion. Use the pppd option "-vj" to turn it off.  Trumpet (for MSDOS)
  890.   and the connection simply
  891.  
  892.  
  893.  
  894.   13.2.  nslookup.  A: There is a bug in the 3.1.2 version of dp. Please
  895.   get the 3.1.2a or later file from the dp ftp home site har-
  896.   bor.ecn.purdue.ecu.  Until you can put the patch into dp, disable the
  897.   vj header compression.  I am using dp-3.1.2 and can't do anything but
  898.   ping and
  899.  
  900.  
  901.  
  902.   13.3.  A: Microsoft has chosen to support a non-standard authentica-
  903.   tion protocol with Windows NT.  That is their right to do so provided
  904.   that they have registered the protocol number with the IANA.  (They
  905.   have.)  If the `accept only Microsoft encrypted authentication' check
  906.   box is set in the phone book entry, the connection will not complete.
  907.   This setting mandates that the Daytona system only exchange PPP
  908.   authentication with another Microsoft PPP implementation.  I can not
  909.   connect to/with my Windows NT code (a.k.a. 'Daytona')
  910.  
  911.   Linux does not support this authentication protocol.
  912.  
  913.   If you have the option of changing the settings on the Daytona system
  914.   then go to the Daytona Phone Book settings, advanced, security
  915.   settings and choose either `Accept any authentication including clear
  916.   text' to allow execution without authentication, or `Use clear text
  917.   terminal login only' for PAP authentication, or `Accept only encrypted
  918.   authentication' to allow CHAP authentication.
  919.  
  920.   The Microsoft authentication sequence is a PAP style authentication
  921.   with their encryption algorithm for the passwords.  Normal PAP sends
  922.   the passwords in clear text.  This would violate their C2 security
  923.   goals.
  924.  
  925.   14.  Other messages written to the system log
  926.  
  927.   14.1.  A: This is not a problem. It means that a timer has expired and
  928.   timers are a necessary part of the protocol establishment phase.
  929.   Alarm
  930.  
  931.  
  932.  
  933.   14.2.  A: The remote wishes to exchange Link Quality Reporting proto-
  934.   col with the Linux system. This protocol is presently not supported.
  935.   This is not an error. It is merely saying that it has received the
  936.   request and will tell the remote that "I can't do this now. Don't
  937.   bother me with this!"  Unknown protocol (c025) received!.
  938.  
  939.   The Morning Star PPP package will always try to do LQR protocol.  This
  940.   is normal.
  941.  
  942.  
  943.  
  944.   14.3.  A: Use the ppp-2.1.2b.tar.gz package.  This was a bug which was
  945.   not caught before the `a' package was released.  The connection fails
  946.   with an ioctl(TIOCSCTTY) error.
  947.  
  948.  
  949.  
  950.   14.4.  "ioctl(TIOCSETD): I/O error" and "ioctl(TIOCNXCL): I/O error"
  951.   A: The remote system has disconnected the telephone.  The tty drivers
  952.   will re-establish the proper tty discipline and these errors are the
  953.   result of the pppd process trying to do the same thing.  These are to
  954.   be expected.  ioctl(PPPIOCGDEBUG): I/O error",
  955.  
  956.  
  957.  
  958.   14.5.  Usually the ifconfig program reports information similar to the
  959.   following: My ifconfig has strange output for PPP.
  960.  
  961.  
  962.  
  963.        ppp0      Link encap UNSPEC  HWaddr 00-00-00-00-00-00-00 ...
  964.                  inet addr 192.76.32.2  P-t-P 129.67.1.65  Mask 255.255.255.0
  965.                  UP POINTOPOINT RUNNING  MTU 1500  Metric 1
  966.  
  967.  
  968.  
  969.  
  970.   A: The information is for display purposes only.  If you are using a
  971.   recent 1.1 kernel then update the nettools package with the current
  972.   one on sunacm.swan.ac.uk in the directory
  973.   /pub/Linux/networking/nettools.
  974.  
  975.  
  976.  
  977.   14.6.  The file /proc/net/dev seems to be empty
  978.  
  979.  
  980.   A: Did you just issue the command "ls -l /proc/net" and are wondering
  981.   why the size is zero?  If so, this is normal.  Instead, issue the
  982.   command:
  983.  
  984.  
  985.  
  986.           cat /proc/net/dev
  987.  
  988.  
  989.  
  990.  
  991.   You should not find the file empty.  The size is always shown as zero,
  992.   but that is the 'proc' file system.  Don't believe the size.  Do the
  993.   command.
  994.  
  995.  
  996.  
  997.   15.  Network routing issues (using PPP as a `cheap' bridge)
  998.  
  999.   15.1.  with SLIP A: Do not use slattach and ifconfig with PPP.  These
  1000.   are used for SLIP. The pppd process does these functions at the appro-
  1001.   priate time.  These must occur after the LCP and IPCP protocols have
  1002.   been exchanged.  Slattach and ifconfig don't work as they do
  1003.  
  1004.   You can not replace pppd with slattach and ifconfig.  Most of the
  1005.   protocol support for PPP is in the pppd process.  Only the IP (and IPX
  1006.   when it is completed) processing is in the kernel.
  1007.  
  1008.   The host route to the remote system will be automatically added by
  1009.   pppd.  There is no option to NOT add the route.  The pppd process will
  1010.   terminate if the route could not be added.
  1011.  
  1012.   The default route may or may not be added.  This is controlled by the
  1013.   option `defaultroute'.  If you have a default route, it will not be
  1014.   changed.
  1015.  
  1016.   If you must do routing for an entire network, then put the route
  1017.   command into the /etc/ppp/ip-up script. The parameters to the script
  1018.   are:
  1019.  
  1020.  
  1021.  
  1022.           $0 - name of the script (/etc/ppp/ip-up or /etc/ppp/ip-down)
  1023.           $1 - name of the network device (such as ppp0)
  1024.           $2 - name of the tty device (such as /dev/cua0)
  1025.           $3 - speed of the tty device in Bits Per Second (such as 38400)
  1026.           $4 - the local IP address in dotted decimal notation
  1027.           $5 - the remote IP address in dotted decimal notation
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.   15.2.  A: On sunsite there is a package called devinfo.tar.gz.  It
  1034.   contains some useful little programs which will extract the data from
  1035.   the device and to do various things with the dotted IP addresses.  I
  1036.   want the route to the network and not the route to the host.
  1037.  
  1038.   The documentation is in the man pages in the file.
  1039.  
  1040.   For example, if you want to route the entire IP domain to the remote,
  1041.   the following may be used in /etc/ppp/ip-up.
  1042.  
  1043.   Of course, if the values are not variable, then simply use the
  1044.   appropriate entry in the route command.
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.   ______________________________________________________________________
  1058.   # Obtain the netmask for the ppp0 (or whatever) device
  1059.   NETMASK = `devinfo -d $1 -t mask`
  1060.  
  1061.   # Obtain the IP domain (without the host address by removing the extra bits)
  1062.   DOMAIN = `netmath -a $5 $NETMASK`
  1063.  
  1064.   # Do the network route now that the IP domain is known
  1065.   route -net add $DOMAIN gw $5
  1066.   ______________________________________________________________________
  1067.  
  1068.  
  1069.  
  1070.  
  1071.   16.  Other features and protocols
  1072.  
  1073.   16.1.  A: Use the diald package. This is on sunsite in the same direc-
  1074.   tory as the ppp source, /pub/Linux/system/Network/serial.  What about
  1075.   support for `demand dial'
  1076.  
  1077.  
  1078.  
  1079.   16.2.  A: There are no plans to put filtering into the PPP code.  Run
  1080.   the ipfirewall code.  It is on sunsite.  Help the author debug that
  1081.   code.  It will do the filtering that you want in a general solution.
  1082.   What about `filtering'
  1083.  
  1084.   The latest development kernels will include the patches to support
  1085.   filtering.  (You will still need the ipfirewall code as the kernel
  1086.   only contains the patches which were in the ipfirewall code for the
  1087.   kernel.)  Again, filtering is a network issue and not one specifically
  1088.   for PPP.
  1089.  
  1090.  
  1091.  
  1092.   16.3.  A: The addition of support for IPX is fairly straight forward.
  1093.   Work is underway to include the IPX protocol.  How about IPX?
  1094.  
  1095.  
  1096.  
  1097.   16.4.  A: There is a netbios PPP protocol.  However, your better solu-
  1098.   tion would be to use TCP/IP and the `samba' code.  How about NETBIOS?
  1099.  
  1100.   Microsoft and others have used Netbios PPP protocol.  This is usually
  1101.   a proprietary mixture and one vendor is not guaranteed to work with
  1102.   another.
  1103.  
  1104.   I'll leave the Netbios protocols for someone else.  If a Microsoft
  1105.   employee wishes to donate to the public domain the specifications and
  1106.   the time to implement their Netbios over PPP, send the diffs to me.
  1107.   I'll make sure that they are put into the released product.
  1108.  
  1109.  
  1110.  
  1111.   17.  Extraneous
  1112.  
  1113.   17.1.  A: Huh?  You have the wrong group if you want MSDOS.  PPP has
  1114.   nothing to do with the mail user agent.  All of the mail agents are
  1115.   compatible with PPP.  Do you have a PPP compatible mail reader?
  1116.  
  1117.  
  1118.  
  1119.   17.2.  A: See above.  How about a news reader?
  1120.