X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=README.linux;h=4b5a05aeaa9ce9ca2659a9445e516e62ed676178;hp=f21a24484c72d0353b18b91071b1523b6d23f177;hb=94228211c6f56fd2696e05ee9334f0a1185a8bbd;hpb=f0e9e64c605631ea6ba3553efd969a23809e9a05 diff --git a/README.linux b/README.linux index f21a244..4b5a05a 100644 --- a/README.linux +++ b/README.linux @@ -28,7 +28,7 @@ Al Longyear longyear@netcom.com INTRODUCTION This file is substantially derived from the previous version for -the pppd process 2.1.2. Michael Callahan wrote that version. This +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. @@ -82,8 +82,10 @@ The pppd program comes from the free distribution of PPP for Suns 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. +extend the number of ppp devices. All ppp devices listed in the Space.c +will be unlinked when the kernel is loaded. This feature makes the use +of '16 channel' support obsolete. + CHANGES FROM THE PREVIOUS VERSION @@ -132,17 +134,29 @@ CHANGES FROM THE PREVIOUS VERSION - 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 + the un-used devices. So, if your system goes to a spurt and uses 256 ppp devices, it will remain at that level until you next reload the kernel. + If you are using modules then you may use the additional setting of + + max_dev=# + + where # is the maximum number. The default is set by the define PPP_MAX_DEV + and this define may be altered if you are not using modules. + + The BSD compressor may only be loaded as a module. Previous beta versions + permitted the compressor to be included into the kernel. This was removed + for several reasons, some technical, some less technical and more + political (legal). + 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. +enable/disable the IPX frames. + INSTALLATION @@ -158,14 +172,21 @@ joining the PPP channel of linux-activists: subscribe linux-ppp contained in the body to majordomo@vger.rutgers.edu + You may use + + subscribe linux-ppp myname@mail.address + + if you wish the linux-ppp information sent to a different mail + address. + To leave the mail list, send 'unsubscribe linux-ppp' to the same mail address. 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 @@ -196,137 +217,244 @@ Usenet News Groups 'ppp' on usenet may cause it to be ignored by the people who actually work on the networking code. -kernel driver installation: +Installation procedure: + +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. + +An important note about the use of modules for PPP: + +The module support for the Linux system supports a concept of configuring +the external names so that they pertain to only a specific version of the +kernel. This is enabled by answering "y)es" to the configuration question +of "Set version information on all symbols for modules?". + +There is a problem with enabling this and the PPP code under some +circumstances. It will not work if BOTH of the following is true: + +a) You elect to load the PPP driver into the kernel; and +b) You want version information for all other modules. + +The problem is one of the module code itself. It is not able to recognize +that the symbols loaded into the kernel symbol table may not have been +defined with the new names for the symbols. The symbols defined by the +PPP code will not have version information attached to them. + +The solution to the problem is simple. Don't do both things at the same +time. The means that it is valid if you either (a) don't use version +information; or (b) don't put the PPP code into the kernel (use it as a +module instead) if you want to use version information. + +I will see what I can do to get around this limitation. However, for the +time being, this is a limitation. - This depends on the kernel version you're using. - Version 1.0.* - These versions are not supported. - Version 1.1.0 through 1.1.14 - These versions are not supported. +1. Issue the command: - Version 1.1.15 to 1.2.99 - - Use the source to the ppp.c driver from the 'linux' directory and - replace the driver in the /usr/src/linux/drivers/net. - - Delete the file /usr/src/linux/drivers/net/ppp.h - - Add the following files to /usr/include/net: - if_ppp.h - if_pppvar.h - ppp_comp.h - ppp_defs.h +./configure - - IF AND ONLY IF you are missing the following files then use the - copy provided in the 'linux' directory to supplement the files. +from the top level directory of pppd. This is the directory which +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. - DO **NOT** REPLACE THE FILE IF IT CURRENTLY EXISTS. +2. Issue the command: - if_arp.h - if_route.h +make kernel - Version 1.3.0 and later - The files have been properly updated. +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. - Reboot with the new kernel. At startup, you should see - something line this: +The actual message will say: - PPP: version 2.2.0 (dynamic channel allocation) - TCP compression code copyright 1989 Regents of the University of California - Dynamic channel allocation code copyright 1995 Caldera, Inc. - PPP line discipline registered. +There appears to be no kernel source distribution in /usr/src/linux. +Give the top-level kernel source directory as the argument to +this script. +usage: kinstall.sh [linux-source-directory] -pppd installation: +If, and only if, you receive this message, do the following: - First update /usr/include/net as described in the previous section. + a. Change to the 'linux' directory with the command: - Then, in this directory, issue the command: +cd linux - ./configure + b. Issue the command: - Go to the 'pppd' directory and issue the commands: +./kinstall.sh /usr/src/linux - make depend - make +or use the proper location for the kernel rather than +/usr/src/linux. For example, if you have the kernel installed in +/usr1/kernel then the command would be: - This should build the program. If you have any errors then ensure - that you have the proper include files and haven't missed one. +./kinstall.sh /usr1/kernel - If you are using shadow passwords *AND* have it installed, then you - should use the command: +The script will validate that the kernel is properly installed into +that directory and check the level of the kernel. The installation +will not be accepted if your kernel is too early. - make shadow +The installation procedure will copy only the files which are +needed. It will not replace any file which should not be +replaced. Please don't second-guess the installation script and +attempt to do the procedure on your own. There are some very subtle +dependencies and if you are not careful, the installation will not +work. - rather than the non-shadow command listed earlier. +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. - (Shadow library support will require the addition of some modules - to the shadow library. These were overlooked by the package author - and I will, or have already, notified him.) - - This code has been built with the 4.5 and 4.6 subroutine libraries - and include files. If your include files are too old then you should - upgrade them. +3. Verify the Makefile in the kernel. - To install the package, issue the command: +The drivers/net/Makefile in the kernel must have the proper definition +for the BSD compression module. As of 2.2.0a, the code will only build +as a module. This means that if you have had an earlier version of the +PPP logic and this is an update to the kernel then it is possible that +the patch to the Makefile did not work and you will be left with a +kernel which will not build correctly. - make install +Please, read carefully the following. - This will install the binary in /usr/sbin and the man page into - /usr/man/man8. +Look that the kernel version which you are building. If the version is +1.2.x (1.2.0 though 1.2.99999, whatever) then use the set of entries +for the 1.2 kernel. If the kernel is for 1.3.x and resembles the lines +in the 1.3 kernel entry then use those. There is a point in the early +1.3 kernels where the Makefile actually was that of the 1.2 series. +Please don't just use the 1.3 kernel change unless your makefile +RESEMBLES the patch indicated. - pppd needs to be run as root. You can either make it setuid - root or just use it when you are root. 'make install' will try - to install it setuid root. Making pppd setuid root is - convenient for a single-user machine, but has security - implications which you should investigate carefully before - making it available on a multiuser machine. +I don't know how to stress this enough. If you choose the wrong one +then the makefile will not work. Your kernel build will fail. In that +case, use the other one. There are only two variations. Please choose +the proper one. Only one will work. - The pppd process must have the following directories to work: +Check the makefile. If your kernel is 1.2 then it should be similar to +the following: - /var/run - /etc/ppp +ifdef CONFIG_PPP +NETDRV_OBJS := $(NETDRV_OBJS) ppp.o +CONFIG_SLHC = CONFIG_SLHC +else +MODULES := $(MODULES) ppp.o +endif + +MODULES := $(MODULES) bsd_comp.o - In addition, for the program to run, there must be a 'options' file - in the /etc/ppp directory. So, the following commands will accomplish - the required operations. They may have errors if the entries currently - exist. +ifdef CONFIG_SLIP +NETDRV_OBJS := $(NETDRV_OBJS) slip.o +CONFIG_SLHC = CONFIG_SLHC +else +MODULES := $(MODULES) slip.o +endif - Perform these commands as the 'root' user. +The critical entry is the line which says "MODULES := $(MODULES) bsd_comp.o" +and that you don't have "NETDRV_OBJS := $(NETDRV_OBJS) ppp.o bsd_comp.o". - mkdir /var /etc - mkdir /var/run /etc/ppp - touch /etc/ppp/options +IF YOU HAVE THE 1.3 KERNEL, the following is the expected pattern in the +Makefile. -chat installation: +ifeq ($(CONFIG_PPP),y) +L_OBJS += ppp.o +CONFIG_SLHC_BUILTIN = y +else + CONFIG_SLHC_MODULE = y + M_OBJS += ppp.o + endif +endif + +ifneq ($(CONFIG_PPP),n) + M_OBJS += bsd_comp.o +endif - If you have not already done so, run `./configure' in this directory. +ifeq ($(CONFIG_SLIP),y) +L_OBJS += slip.o +CONFIG_SLHC_BUILTIN = y +else + ifeq ($(CONFIG_SLIP),m) - To compile the chat program, go to the 'chat' directory and issue - the command: +Again, ensure that the statement reads "L_OBJS += ppp.o" and not +"L_OBJS += ppp.o bsd_comp.o". - make - To install the package, issue the command: +4. Build the kernel. - make install +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. - This will install the binary in /usr/sbin and the man page into - /usr/man/man8. +If you wish module support then you need to have the 'modules-1.1.87' +package installed as the minimum version. Earlier versions of the module +support will not work properly. -pppstats installation: +As of this time, the current version for the modules package is +1.2.0. Even 1.1.87 is old. However, if you only have 1.1.87 then it +will do as it permits the symbol table references. Please consider +upgrading the module package however. - If you have not already done so, run `./configure' in this directory. +Instructions on building the kernel with modules are given in the +README.modules in the kernel source directory. - To compile the pppstats program, go to the 'pppstats' directory - and issue the command: +5. Build the programs. - make +The programs are built next. The command to build the programs is fairly +simple. Just issue the command: - To install the package, issue the command: +make - make install +from the top level directory where this README.linux file is located. + +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'. + +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. + +7. 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. + +You may elect not to load the BSD compression module if you desire. There +is a controversy regarding a Motorola software patent and while it is +believed that this code does not infringe upon the patent, it is however +an optional component. + +In addition, if memory is a premium, do not run the BSD compression. It +may take large amounts of memory (up to 2.6 meg) for high compression +lengths to hold the compression dictionaries. + +Without the BSD compression module, the PPP driver will not accept PPP's +compression control protocol for BSD compression. - This will install the binary in /usr/sbin and the man page into - /usr/man/man8. GENERAL NETWORK CONFIGURATION @@ -391,6 +519,7 @@ right domain name to use and the IP numbers of nameservers from whoever's providing your PPP link. + CONNECTING TO A PPP SERVER To use PPP, you invoke the pppd program with appropriate options. @@ -440,13 +569,12 @@ Going through pppd's options in order: this option would actually be redundant. pppd will write error messages and debugging logs to the syslogd -daemon using the facility name "local2". (Verbose output from chat is -the same.) These messages may already be logged to the console or to -a file like /usr/adm/messages; consult your /etc/syslog.conf file to -see. If you want to make all pppd and chat messages go to the -console, add the line +daemon using the facility name "daemon". These messages may already be +logged to the console or to a file like /usr/adm/messages; consult +your /etc/syslog.conf file to see. If you want to make all pppd +messages go to the console, add the line - local2.* /dev/console + daemon.* /dev/console ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is one or more tabs. Do not use spaces. @@ -583,8 +711,8 @@ If you don't seem to get a connection, the thing to do is to collect 'debug' option, and put the following two lines in your /etc/syslog.conf file: - local2.* /dev/console - local2.* /usr/adm/ppplog + daemon.* /dev/console + daemon.* /usr/adm/ppplog This will cause pppd's messages to be written to the current virtual console and to the file /usr/adm/ppplog. Note that the left-hand @@ -611,8 +739,8 @@ which contains all the bytes being passed between your computer and the remote PPP server. To do this, alter your syslog.conf lines to look like this - local2.*,kern.* /dev/console - local2.*,kern.* /usr/adm/ppplog + daemon.*,kern.* /dev/console + daemon.*,kern.* /usr/adm/ppplog and HUP the syslog daemon as before. Then, run pppd with the option "kdebug 25". Whatever characters arrive over the PPP terminal line @@ -648,7 +776,7 @@ possible; for example: - the version number of Linux PPP you are using - the exact command you use to start the PPP session - log output from a session run with the 'debug' option, captured - using local2.*,kern.* in your syslog.conf file + using daemon.*,kern.* in your syslog.conf file - the type of PPP peer that you are connecting to (eg, Xyzzy Corp terminal server, Morningstar PPP software, etc) - the kind of connection you use (modem, hardwired, etc...) @@ -677,6 +805,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 @@ -764,6 +893,7 @@ 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 @@ -838,6 +968,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