]> git.ozlabs.org Git - ppp.git/blobdiff - README.linux
MP-related code should be wrapped within HAVE_MULTILINK pre-processor
[ppp.git] / README.linux
index ce51d7b74616ce3db7019ba4a3f7bef029124b71..5a20711dcb268de8d81a12ff312ef40c7625521f 100644 (file)
@@ -1,17 +1,19 @@
-PPP for Linux                                             Version 2.2.0
+PPP for Linux                                             Version 2.4.0
 =============                                                  based on
-                                                              ppp-2.2.0
-                                                               Mar 1995
+                                                              ppp-2.4.0
+                                                             April 2000
 
-Michael Callahan    callahan@maths.ox.ac.uk
+Paul Mackerras      Paul.Mackerras@cs.anu.edu.au
 Al Longyear         longyear@netcom.com
+Michael Callahan    callahan@maths.ox.ac.uk
 
   Contents:
     INTRODUCTION
     CREDITS
-    CHANGES FROM THE PREVIOUS VERSION
-    FUTURE PLANS
     INSTALLATION
+    PROBLEMS WHICH MAY OCCUR WHILE BUILDING THE KERNEL
+       A REFERENCE TO UNDEFINED _mod_use_count_
+       BLOCK ON FREELIST AT nnnnnn ISN'T FREE
     GENERAL NETWORK CONFIGURATION
     CONNECTING TO A PPP SERVER
     IF IT WORKS
@@ -27,11 +29,12 @@ Al Longyear         longyear@netcom.com
 
 INTRODUCTION
 
-This file is substantially derived from the previous version for
-the pppd process 2.2.0. Michael Callahan wrote that version. This
-particular version was written, modified, hacked, changed, whatever,
-by Al Longyear. If you find errors in this document, they are probably
-mine and not Michael's.
+This file is substantially derived from the previous version for the
+pppd process 2.2.0, which itself was derived from earlier works by
+Michael Callahan. This particular version was written, modified,
+hacked, changed, whatever, by Al Longyear and Paul Mackerras. If you
+find errors in this document, they are probably ours and not
+Michael's.
 
 This is a PPP driver for Linux.  It has been used by many people and
 seems to be quite stable.  It is capable of being used either as a
@@ -44,7 +47,7 @@ about it.)
 
 The PPP protocol consists of two parts.  One is a scheme for framing
 and encoding packets, the other is a series of protocols called LCP,
-IPCP, UPAP and CHAP, for negotiating link options and for
+IPCP, PAP and CHAP, for negotiating link options and for
 authentication.  This package similarly consists of two parts: a
 kernel module which handles PPP's low-level framing protocol, and a
 user-level program called pppd which implements PPP's negotiation
@@ -60,96 +63,76 @@ the link down, when it negotiates a graceful disconnect.
 
 CREDITS
 
-I (MJC) wrote the original kernel driver from scratch.  Laurence
-Culhane and Fred van Kempen's slip.c was priceless as a model (a
-perusal of the files will reveal that I often mimicked what slip.c
-did).  Otherwise I just implemented what pppd needs, using RFC1331 as
+Michael Callahan wrote the original kernel driver from scratch.
+Laurence Culhane and Fred van Kempen's slip.c was priceless as a model
+(a perusal of the files will reveal that he often mimicked what slip.c
+did).  Otherwise he just implemented what pppd needs, using RFC1331 as
 a guide.  For the most part, the Linux driver provides the same
 interface as the free 386BSD and SunOS drivers.  The exception is that
-Linux has no support for asynchronous I/O, so I hacked an ioctl into
+Linux had no support for asynchronous I/O, so he hacked an ioctl into
 the PPP kernel module that provides a signal when packets appear and
 made pppd use this instead.
 
-Al Longyear ported version 2.2 of pppd (from the free package
-ppp-2.2.0) to Linux.  He also provided several enhancements to both
+Al Longyear ported version 2.0 of pppd (from the free package
+ppp-2.0.0) to Linux.  He also provided several enhancements to both
 the kernel driver and the OS-independent part of pppd.  His
 contributions to Linux PPP have been immense, and so this release
 is being distributed over both our names.
 
-The pppd program comes from the free distribution of PPP for Suns and
-386BSD machines, maintained by Paul Mackerras.  This package lists
-"thanks to" Brad Parker, Greg Christy, Drew D. Perkins, Rick Adams and
-Chris Torek.
-
-Jim Freeman added the code to support a ppp module and to dynamically
-extend the number of ppp devices. The Space.c module should not have
-any devices defined for this logic to work.
-
-
-CHANGES FROM THE PREVIOUS VERSION
-
-- The number of devices for the PPP device has been made dynamic. It was
-  previously configured with the default value of four devices.
+Paul Mackerras rewrote and restructured the code for improved
+performance and to make a cleaner separation between the
+network-interface and async TTY parts of the ppp driver.
 
-- The problems dealing with other systems such as Windows NT and their
-  authenticiation has been corrected. It will now generate the proper
-  responses to allow the system to choose a valid authentication protocol.
+Nick Walker added the code to pppd to query the peer for DNS server
+addresses.
 
-- The kernel debug value has changed. Previously it was a level. It is now
-  a bit map with various bits meaning certain types of debug information.
 
-     0 - No debug information is generated
-     1 - Debug messages
-     2 - Log incoming packets
-     4 - Log outgoing packets
-     8 - Log tty output buffers
-    16 - Log tty input buffers
+USING THE NEW PPP KERNEL DRIVER
 
-  If you wish to use any combination, add the values together. For example,
-  '7' will log debug messages and incoming packages and outgoing packets.
+As of kernel version 2.3.13, the development series of kernels contain
+a new kernel PPP driver, rewritten from scratch by Paul Mackerras.
+This package supports the new driver, although it doesn't include the
+source for the new driver.
 
-  The default setting is 0.
+The new driver is divided into two files: ppp_generic.c and
+ppp_async.c.  If you compile PPP as a module, you will get two
+separate modules, called ppp_generic and ppp_async.
+Another module ppp_synctty is used for synchronous tty devices
+such as high-speed WAN adapters for leased T1/E1 lines.
 
-  The simple IP trace which ppp.c performed when 'kdebug' was greater than
-  127 has been removed. You should use tcpdump for this type of trace
-  actions.
+To talk to the new driver, pppd needs to be able to open /dev/ppp,
+character device (108,0).  If you are using devfs, the device
+filesystem, the /dev/ppp node will automagically appear when the
+ppp_generic module is loaded, or at startup if ppp_generic is compiled
+in.
 
-- Support is added for compression control protocol. At the present time
-  only the BSD-Compress compression protocol is supported.
+If you have ppp_generic as a module, and you are using devfsd (the
+devfs daemon), you will need to add a line like this to your
+/etc/devfsd.conf:
 
-- There are two queues for output frames. This avoids some problems which
-  occured with the previous version and some PPP packages which exchanged
-  echo frames with Linux.
+LOOKUP         ppp             MODLOAD
 
-- The echo frames are now proper. Previously, it would generate extra
-  characters and this caused some providers to not respond to the 'junk'.
+Otherwise you will need to create a /dev/ppp device node with the
+commands:
 
-- The max-echo-failure option will now properly disconnect the line.
+# mknod /dev/ppp c 108 0
+# chmod 600 /dev/ppp
 
-- There are other changes which are listed in the general README file. Please
-  read that file as well for changes.
+If you use module autoloading and have PPP as a module, you will need
+to add the following to your /etc/modules.conf or /etc/conf.modules:
 
-- There is no limit to the number of ppp devices which you may use. Jim Freeman
-  has added code to create them upon demand and to re-use the ones which have
-  been closed. There is no code, nor plans to write code, to remove (delete)
-  the un-used devices. So, if your system goes to a spurt and uses 3000 ppp
-  devices, it will remain at that level until you next reload the kernel.
-
-
-FUTURE PLANS
-
-The IPX support is still minimal. There is code which will only work with
-the 1.3 version of the networking software. The pppd process will still
-require changes to support the IPXCP and a change to the driver to properly
-enable/disable the IPX frames. Jim Freeman is reportily working on the IPX
-support.
+/dev/ppp            ppp_generic
+alias char-major-108 ppp_generic
+alias tty-ldisc-3    ppp_async
+alias tty-ldisc-14   ppp_synctty
 
 
 INSTALLATION
 
-This version of PPP has been tested on 1.1.x (x>=14) It will probably
-not work on kernels much earlier than this due to a change in the
-routing code.  If you have an earlier kernel, please upgrade.
+This version of PPP has been tested on various Linux kernel versions
+(most recently 2.2.14). It will not work on kernels before 2.2.0. If
+you have an earlier kernel, please upgrade to the latest 2.2-series
+kernel.
 
 joining the PPP channel of linux-activists:
 
@@ -171,8 +154,8 @@ joining the PPP channel of linux-activists:
       You can send to the list by mailing to
       linux-ppp@vger.rutgers.edu. This is a majordomo mailing list and
       is unlike the earlier version on hut.fi. There is no magic header
-      required for this list. In addition, it is mirrored to the usenet
-      group linux.act.ppp. You may choose to read the few messages posted
+      required for this list. In addition, it is gated to the usenet
+      group linux.dev.ppp. You may choose to read the few messages posted
       there.
 
 Usenet News Groups
@@ -209,8 +192,6 @@ The installation procedure has been totally revised for this
 version. Due to feedback from other users, it was felt that a more
 automated installation procedure be performed.
 
-Use the following procedure for all kernel versions. There are six steps
-numbered one through six. Please do them in order and not skip one.
 
 1. Issue the command:
 
@@ -221,16 +202,36 @@ contains this README.linux file. The result of this will be to build a
 set of symbolic links to the makefiles. They should link 'Makefile' to
 'Makefile.linux' in each of the directories.
 
-2. Issue the command:
+
+2. Update the kernel sources.
+
+The 2.2.8 and later kernels contains the same PPP kernel driver as is
+in this release.  In fact the driver in the kernel sources is slightly
+different from the one in this package as it doesn't include the stuff
+which enables the driver in this package to compile in either the 2.0
+or 2.2 kernel environment, but the two are functionally equivalent.
+If you are using a 2.2.8 or later kernel and your kernel is already
+configured for PPP, then you only need to do steps 5 and 6.
+Otherwise, continue at step 3.
+
+If you are using a 2.3 series kernel, use the kernel driver that is in
+the kernel sources.  For 2.3.13 and later, this is the new driver (see
+above).
+
+If you are using a kernel earlier than 2.2.8, you can either use the
+driver in this package or upgrade your kernel to the current 2.2.x
+series kernel (2.2.13, as of the release of ppp-2.3.11).  If you choose
+to use the driver in this package, you will need a copy of the kernel
+source tree to compile the driver.  Issue the command:
 
 make kernel
 
 from the top level directory. This will install the various include
-files and source files into the proper directory for the linux
-kernel. If you don't have the kernel installed in the /usr/src/kernel
-directory then it will not work. Instead it will print a message to
-the effect that you need to specify the kernel location on the
-kinstall command.
+files and source files into the proper directories in the linux kernel
+source tree. If you don't have the kernel installed in the default
+/usr/src/kernel directory then it will not work. Instead it will print
+a message to the effect that you need to specify the kernel location
+on the kinstall command.
 
 The actual message will say:
 
@@ -270,15 +271,36 @@ You are free to run the installation script as many times as you
 wish. The additional executions will only change the files which have
 not been changed.
 
+
 3. Build the kernel.
 
-You must rebuild the kernel with this package. The driver is totally
-new and will not work with the older daemon and the newer daemon will
-not work with the older kernel driver. If you don't know how to build
-a kernel, then you should read the README file in the kernel source
-directory.
+You should rebuild the kernel with this package.  If you use the
+driver that comes with the current 2.0 kernels, it will not support
+Deflate compression or demand-dialling, but apart from that the pppd
+daemon should work.
+
+If you don't know how to build a kernel, then you should read the
+README file in the kernel source directory.
+
+If you want module support then you need to have the 'modules-2.0.0'
+package installed as the minimum version. Earlier versions of the
+module support will not work properly. All of the later ones will.
+
+Instructions on building the kernel with modules are given in the
+README.modules in the kernel source directory.
+
+
+4. Install the kernel
+
+If you are using the Yggdrasil distribution then you need to 'install'
+the kernel at this point. Refer to their documentation on the procedures
+to install the kernel.
+
+Distributions other than the Yggdrasil will normally install the
+kernel when you build it.
 
-4. Build the programs.
+
+5. Build the programs.
 
 The programs are built next. The command to build the programs is fairly
 simple. Just issue the command:
@@ -287,23 +309,74 @@ make
 
 from the top level directory where this README.linux file is located.
 
-5. Install the programs.
+
+6. Install the programs.
 
 You may use the command
 
 make install
 
-to install the various programs. They will be installed into the
-/usr/lib/ppp directory. You may not like this directory for the
-executables. The directory name is called BINDIR and is set in the
-file 'linux/Makefile.linux'.
+(as root) to install the various programs.  They will be installed
+into the /usr/sbin directory.  If you prefer to install the programs
+elsewhere, you can change the definition of BINDIR in the file
+linux/Makefile.top.
+
+Earlier versions of the pppd package used /usr/lib/ppp as the
+directory. This has been changed. If you still have code in
+/usr/lib/ppp then you should remove it as it is probably the 2.1
+version of the code. That version will not work with the current ppp.c
+drivers in the kernel.
 
-6. Reboot to the new kernel.
+
+7. Reboot to the new kernel.
 
 After building the new kernel, you will need to actually use it. Reboot
 the Linux system and you may then use the new pppd program.
 
 
+8. Load optional modules.
+
+If you are using loadable modules for the ppp then you must load them
+after the kernel has been started. The following relative order must
+be maintained.
+
+Sequence    Module      Description
+   1        slhc.o      VJ header compression
+   2        ppp.o       PPP driver
+   3        bsd_comp.o  BSD compression for PPP's compression protocol.
+
+If you only have the bsd comprssor as a module then you may load it without
+regard to any order. Likewise you may load the deflate compressor without
+regard to any order with the BSD one. The idea is that the ppp.o code must
+be loaded to use the compressor and the VJ header compression code must be
+loaded to use ppp.o.
+
+You may elect not to load the BSD compression module if you desire.
+The LZW compression algorithm (as used by BSD-Compress and the
+`compress' command) is claimed to be covered by a patent held by
+Unisys in the USA and other countries.
+
+In addition, if memory is a premium, do not run the compressors. It
+may take large amounts of memory (up to 2.6 meg) for high compression
+lengths to hold the compression dictionaries.
+
+Without the compression modules, the PPP driver will not accept PPP's
+compression control protocol for that type. If you have no compressors
+loaded then no compression will be performed. If you don't have the BSD
+compressor loaded then the BSD compression will not be performed, even
+if the peer system supports it. Likewise with the deflate compressor.
+
+Compressors are unique to their type. If you have the deflate compressor
+loaded and the peer system has the BSD version, still no compression must
+be loaded. BOTH systems must support the same compression protocols.
+
+
+PROBLEMS WHICH MAY OCCUR WHILE BUILDING THE KERNEL
+
+At this time there should not be a problem with the compilation of the
+drivers.
+
+
 GENERAL NETWORK CONFIGURATION
 
 Since many people don't use the Linux networking code at all until
@@ -344,10 +417,10 @@ will use.  For example:
      192.1.1.23  chelseapc.president.whitehouse.gov chelseapc
 
 where my IP address is 192.1.1.17 and my hostname is
-billpc.president.whitehouse.gov.  (Not really, you understand.)  If
-your PPP server does dynamic IP address assignment, give a guess as to
-an address you might get (see also "Dynamic Address Assignment"
-below).
+billpc.president.whitehouse.gov.  (Not really, but you should
+understand my meaning.)  If your PPP server does dynamic IP address
+assignment, give a guess as to an address you might get (see also
+"Dynamic Address Assignment" below).
 
 Finally, you need to configure the domain name system by putting
 appropriate lines in /etc/resolv.conf .  It should look something like
@@ -365,6 +438,11 @@ the names 'hillarypc' and 'chelseapc'.  You can probably find out the
 right domain name to use and the IP numbers of nameservers from
 whoever's providing your PPP link.
 
+Alternatively you may wish to use the option `usepeerdns' and then
+modify your `ip-up' and `ip-down' scripts to automate the process. Or 
+check your messages file to see if pppd recorded the DNS addresses
+supplied by the peer ppp server.
+
 
 CONNECTING TO A PPP SERVER
 
@@ -393,6 +471,9 @@ Going through pppd's options in order:
          ""            send a return (null text followed by usual return)
          ogin: ppp word: whitewater    log in.
 
+         Please refer to the chat man page, chat.8, for more information
+         on the chat utility.
+
    /dev/cua1     specify the callout serial port cua1
    38400         specify baud rate
    debug         log status in syslog
@@ -448,6 +529,8 @@ want the service "blackice".  It logs in, waits for a shell prompt
 ("black%"), then starts PPP.  The -t60 argument sets the timeout to a
 minute, since things here are sometimes very slow.
 
+(The sendbreak program is not included in this package.)
+
 The "&& sleep 5" causes the script to pause for 5 seconds, unless chat
 fails in which case it exits immediately.  This is just to give the
 PPP server time to start (it's very slow).  Also, the "stty -echo"
@@ -506,7 +589,7 @@ lo        Link encap Local Loopback
           TX packets 0 errors 0 dropped 0 overrun 0
 
 ppp0      Link encap Point-to-Point Protocol
-          inet addr 192.76.32.2  P-t-P 129.67.1.165  Mask 255.255.255.0
+          inet addr 192.76.32.3  P-t-P 129.67.1.165  Mask 255.255.255.0
           UP POINTOPOINT RUNNING  MTU 1500  Metric 1
           RX packets 33 errors 0 dropped 0 overrun 0
           TX packets 42 errors 0 dropped 0 overrun 0
@@ -651,6 +734,7 @@ is to use ifconfig ppp0 to get the interface address and then edit
 /etc/hosts appropriately.
 
 
+
 SETTING UP A MACHINE FOR INCOMING PPP CONNECTIONS
 
 Suppose you want to permit another machine to call yours up and start
@@ -669,9 +753,9 @@ pieces of information:
 modem
 crtscts
 lock
-:192.1.2.23
+:192.1.2.33
 
-Here we will insist that the remote machine use IP address 192.1.2.23,
+Here we will insist that the remote machine use IP address 192.1.2.33,
 while the local PPP interface will use the IP address associated with
 this machine's hostname in /etc/hosts.  The '-detach' option is required
 for a server. It tells the pppd process not to terminate until the modem
@@ -705,7 +789,7 @@ to be on the local Ethernet segment and you should give the 'proxyarp'
 option to pppd on the server.  Suppose, for example, we have this
 setup:
 
- 192.1.2.23                        192.1.2.17
+ 192.1.2.33                        192.1.2.17
 +-----------+      PPP link       +----------+
 | chelseapc | ------------------- |  billpc  |
 +-----------+                    +----------+
@@ -726,18 +810,19 @@ piece of information:
 modem
 crtscts
 lock
-192.1.2.17:192.1.2.23
+192.1.2.17:192.1.2.33
 proxyarp
 
 When the link comes up, pppd will enter a "proxy arp" entry for
 chelseapc into the arp table on billpc.  What this means effectively
 is that billpc will pretend to the other machines on the 192.1.2.x
 Ethernet that its Ethernet interface is ALSO the interface for
-chelseapc (192.1.2.23) as well as billpc (192.1.2.17).  In practice
+chelseapc (192.1.2.33) as well as billpc (192.1.2.17).  In practice
 this means that chelseapc can communicate just as if it was directly
 connected to the Ethernet.
 
 
+
 SETTING UP A MACHINE FOR INCOMING PPP CONNECTIONS WITH DYNAMIC IP
 
 The use of dynamic IP assignments is not much different from that
@@ -771,10 +856,10 @@ the system via ftp. You would not want Joe Hacker using the ppp account
 via ftp.
 
 2. Ensure that the directory /etc/ppp is owned by 'root' and permits
-only write access to the root user.
+write access only to the root user.
 
-3. The files /etc/ppp/options must be owned by root and accessible only
-from that user. Never permit any other user access to this file.
+3. The files /etc/ppp/options must be owned by root and writable only
+by root.
 
 4. The files /etc/ppp/ip-up and /etc/ppp/ip-down will be executed by the
 pppd process while it is root. Ensure that these files are writable only
@@ -812,6 +897,11 @@ Then you may secure the binaries so that they are executable from the owner
 (which should be root) and the group only. All other users would be denied
 all access to the files and executables.
 
+d) Prevent the motd file from being sent to the ppp user.
+touch ~ppp/.hushlogin
+chown root ~ppp/.hushlogin
+chmod 444  ~ppp/.hushlogin
+
 
 ADDITIONAL INFORMATION