From: Paul Mackerras Date: Thu, 1 Jun 1995 04:39:06 +0000 (+0000) Subject: Putting remaining PPP files under version control X-Git-Tag: RELEASE_2_3_6~675 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=bbe9c77aafc5d183eb3c29879563e4c9b95bc1b6 Putting remaining PPP files under version control --- diff --git a/README b/README new file mode 100644 index 0000000..8b928a6 --- /dev/null +++ b/README @@ -0,0 +1,175 @@ +This is the README file for ppp-2.2, a package which implements the +Point-to-Point Protocol (PPP) to provide Internet connections over +serial lines. + + +Introduction. +************* + +The Point-to-Point Protocol (PPP) provides a standard way to transmit +datagrams over a serial link, as well as a standard way for the +machines at either end of the link (the `peers') to negotiate various +optional characteristics of the link. Using PPP, a serial link can be +used to transmit Internet Protocol (IP) datagrams, allowing TCP/IP +connections between the peers. PPP is defined in several RFC (Request +For Comments) documents, in particular RFCs 1661, 1662, 1332 and 1334. +Other RFCs describe standard ways to transmit datagrams from other +network protocols (e.g., DECnet, OSI, Appletalk), but this package +only supports IP. + +This software consists of two parts: + +- Kernel code, which establishes a network interface and passes +packets between the serial port, the kernel networking code and the +PPP daemon (pppd). This code is implemented using STREAMS modules on +SunOS 4.x, AIX 4.1 and OSF/1, and as a line discipline under Ultrix, +NextStep, NetBSD, FreeBSD, and Linux. + +- The PPP daemon (pppd), which negotiates with the peer to establish +the link and sets up the ppp network interface. Pppd includes support +for authentication, so you can control which other systems may make a +PPP connection and what IP addresses they may use. + + +Installation. +************* + +The file SETUP contains general information about setting up your +system for using PPP. There is also a README file for each supported +system, which contains more specific details for installing PPP on +that system. The supported systems, and the corresponding README +files, are: + + SunOS 4.x README.sun + NetBSD, FreeBSD README.bsd + Ultrix 4.x README.ultrix + Linux README.linux + OSF/1 README.osf + AIX 4.x README.aix4 + NeXTStep README.next + +In each case you start by running the ./configure script. This works +out which operating system you are using and creates symbolic links to +the appropriate makefiles. You then run `make' to compile the +user-level code, and (as root) `make install' to install the +user-level programs pppd, chat and pppstats. + +The procedures for installing the kernel code vary from system to +system. On some systems, the kernel code can be loaded into a running +kernel using a `modload' facility. On others, the kernel image has to +be recompiled and the system rebooted. See the README.* files for +details. + + +What is new in ppp-2.2. +*********************** + +* More systems are now supported: + + AIX 4, thanks to Charlie Wick (cwick@quaver.urbana.mcd.mot.com) + OSF/1 on DEC Alpha, thanks to Steve Tate (srt@zaphod.csci.unt.edu) + NextStep 3.2 and 3.3, thanks to Philip-Andrew Prindeville + (philipp@res.enst.fr) and Steve Perkins (perkins@cps.msu.edu) + +in addition to NetBSD 1.0, SunOS 4.x, Ultrix 4.x, FreeBSD 2.0, and +Linux. + +* Packet compression has been implemented. This version implements +CCP (Compression Control Protocol) and the BSD-Compress compression +scheme according to the current draft RFCs. This means that incoming +and outgoing packets can be compressed with the LZW scheme (same as +the `compress' command) using a code size of up to 15 bits. + +* Some bug fixes to the LCP protocol code. In particular, pppd now +correctly replies with a Configure-NAK (instead of a Configure-Reject) +if the peer asks for CHAP and pppd is willing to do PAP but not CHAP. + +* The ip-up and ip-down scripts are now run with the real user ID set +to root, and with an empty environment. Clearing the environment +fixes a security hole. + +* The kernel code on NetBSD, FreeBSD, NextStep and Ultrix has been +restructured to make it easier to implement PPP over devices other +than asynchronous tty ports (for example, synchronous serial ports). + +* pppd now looks at the list of interfaces in the system to determine +what the netmask should be. In most cases, this should eliminate the +need to use the `netmask' option. + +* There is a new `papcrypt' option to pppd, which specifies that +secrets in /etc/ppp/pap-secrets used for authenticating the peer are +encrypted, so pppd always encrypts the peer's password before +comparing it with the secret from /etc/ppp/pap-secrets. This gives +better security. + + +Patents. +******** + +The BSD-Compress algorithm used for packet compression is the same as +that used in the Unix "compress" command. It is apparently covered by +U.S. patents 4,814,746 (owned by IBM) and 4,558,302 (owned by Unisys), +and corresponding patents in various other countries (but not +Australia). If this is of concern, you can build the package without +including BSD-Compress. To do this, edit net/ppp-comp.h to change the +definition of DO_BSD_COMPRESS to 0. The bsd-comp.c files are then no +longer needed, so the references to bsd-comp.o may optionally be +removed from the Makefiles. + + +Contacts. +********* + +Bugs in the the SunOS, NetBSD and Ultrix ports and bugs in pppd, chat +or pppstats should be reported to: + + paulus@cs.anu.edu.au + Paul Mackerras + Dept. of Computer Science + Australian National University + Canberra ACT 0200 + AUSTRALIA + +Bugs in other ports should be reported to the maintainer for that port +(see the appropriate README.* file) or to the above. + +Thanks to: + + Brad Parker (brad@fcr.com) + Greg Christy (gmc@quotron.com) + Drew D. Perkins (ddp@andrew.cmu.edu) + Rick Adams (rick@seismo.ARPA) + Chris Torek (chris@mimsy.umd.edu, umcp-cs!chris). + + +Copyrights: + +Most of the code can be freely used and redistributed. The STREAMS +code for SunOS 4.x, OSF/1 and AIX 4 is under a more restrictive +copyright: + + This code is Copyright (C) 1989, 1990 By Brad K. Clements, + All Rights Reserved. + + You may use this code for your personal use, to provide a non-profit + service to others, or to use as a test platform for a commercial + implementation. + + You may NOT use this code in a commercial product, nor to provide a + commercial service, nor may you sell this code without express + written permission of the author. + + Otherwise, Enjoy! + +This copyright applies to (parts of) the following files: + + sunos/ppp_async.c + sunos/ppp_if.c + osf1/ppp_async.c + osf1/ppp_if.c + aix4/ppp_async.c + aix4/ppp_if.c + net/ppp_str.h + pppd/sys-str.c + pppd/sys-osf.c + pppd/sys-aix4.c diff --git a/README.aix4 b/README.aix4 new file mode 100644 index 0000000..956c8c6 --- /dev/null +++ b/README.aix4 @@ -0,0 +1,100 @@ + +AIX 4.1 support is ported from the SunOS code for ppp 2.2. It requires +a streams-based tty and will not work on AIX 3.2. This is the first +release of this package for AIX. It is provided free and without warranty +of any kind. I can't make any promise to support this, but if you e-mail +me with problems I'll try to help you. Please let me know about any bugs +you might find. + +Introduction + + PPP implements TCP/IP through serial connections. In ppp 2.2, an + interface is established by running the program 'pppd'. pppd opens + a serial connection, negotiates link attributes with the peer and + configures a TCP/IP interface. The interface remains up as long as + the peer stays up and 'pppd' remains running. There are no SMIT menus + and ppp interfaces can not be defined through ifconfig. An interface + can be brought down by killing pppd. + + The program 'chat' processes send-expect sequences similar to UUCP + Dialers commands or a Systems chat string. It can be used to dial + a modem. + + 'pppstats' prints interface statistics similar to netstat. Some of the + statistics are the same as netstat but pppstat also provides additional + info specific to ppp interfaces. + +Installation + + First execute the following commands in the ppp-2.2 directory: + + ./configure + make install (you need to be root for this) + + By default, pppd, chat and pppstats are placed in /usr/sbin and the + streams modules in /usr/lib/drivers. The modules are loaded by the following + 'strload' commands. + + strload -m /usr/lib/drivers/ppp_if + strload -m /usr/lib/drivers/ppp_comp + strload -m /usr/lib/drivers/ppp_async + + 'make install' appends the strloads to /etc/rc.tcpip so the modules + will be loaded at boot. A 'pppd' command can be added to start + up an interface. + + 'make install' will also create /etc/ppp/options containing the option + 'lock' only (lock tty device when in use). Any other options which will + always be used should be added by hand. + + Man pages for pppd and pppstats are installed. + +Examples + + To answer a modem and accept connections, use something like + + pppd tty1 myhostname:remotehostname persist + + This will wait for calls on tty1 and establish a connection with any + ppp caller. The server will use myhostname and tell the caller + to use remotehostname. The persist option tells pppd to remain + active and accept another connection after the call terminates. + You can use the 'auth' option to force callers to authenticate + themselves. See pppd man page for details of authentication protocols. + + To dial in to a user account and start PPP, use something like + + pppd tty1 myhostname: connect 'chat -f /etc/ppp/chat-script' + + where the file /etc/ppp/chat-script should contain something like + + "" ATDT5551212 CONNECT "" ogin: myname sword: mypassword $ pppd + + This command uses the chat program to dial the modem, log in and + start pppd on the server. No ttyname is needed when starting pppd on the + server side because pppd will attach to the current terminal (the tty line), + if no device is specified. Any pppd options needed can be set in ~/.ppprc + on the called system. + + The chat -v option may be helpful in debugging connection failures. The + chat output and other debug messages are sent to syslog. You may need + to edit /etc/syslog.conf and "refresh -s syslogd" to see the debug messages. + + The simplest way to allow a remote dial-in host to use your network is + to use the 'proxyarp' option on the server. This will cause the + server to publish an arp entry with the remote's IP address and the + server's hardware address. The remote will then appear to be part of + local network to other hosts. The address/netmask used by the remote + must be suitable for the subnet you wish to connect to. If the remote + is a standalone system, or has no other default route, use the + 'defaultroute' option when dialing in. This will create a default route + on the remote system through the server. If the remote is on another + local network, you might not want this because it could conflict with + an existing default route. + + These are just a few examples to help the new user get started. The + man page for pppd describes all the options in detail. + + Charlie Wick + cwick@prairienet.org + diff --git a/README.bsd b/README.bsd new file mode 100644 index 0000000..1d8988f --- /dev/null +++ b/README.bsd @@ -0,0 +1,138 @@ +Installation instructions for installing ppp-2.2 on FreeBSD and +NetBSD systems. + +This package supports NetBSD-1.0 and FreeBSD-2.0. It should work +on later systems (it works on NetBSD-current as of this writing). +Modloading is not yet supported. + +I have code which should work on earlier systems (386BSD, NetBSD-0.9, +FreeBSD-1.1.5.1, etc.), but it is not included in this package because +I have no way to test or support it. If you are committed to one of +these earlier versions and you are willing to try out some code +without needing major hand-holding, contact me (paulus@cs.anu.edu.au). + +To install PPP, you need to rebuild your kernel to include the latest +version of the PPP driver, as well as compiling and installing the +user-level applications: pppd, pppstats and chat. The user-level +applications can be compiled and installed either before or after you +reboot with the new kernel (you'll have to reboot with the new kernel +before you can run them, of course). + +The following commands should compile and install the user-level +applications (in the ppp-2.2 directory): + + ./configure + make + make install (you need to be root for this) + +The process of updating the kernel source files is now largely +automated. In the ppp-2.2 directory, issue the command: + + make kernel + +(you probably need to be root for this). This will copy new versions +of several files into /sys, patch other files, and finally give you +instructions about modifying your kernel configuration file (if +necessary), rebuilding the kernel and rebooting. + +If you want to do the process by hand, read on... + + +Updating the kernel ppp code. +----------------------------- + +You need to update several files in the /sys/net directory, and patch +some other files under /sys. + +For NetBSD-1.0, copy the following files to /sys/net: + + net/if_ppp.h + net/ppp-comp.h + net/ppp_defs.h + netbsd/bsd-comp.c + netbsd/if_ppp.c + netbsd/if_pppvar.h + netbsd/netisr.h + netbsd/ppp_tty.c + netbsd/slcompress.c + netbsd/slcompress.h + +You then need to patch /sys/conf/files and /sys/conf/files.newconf +using the commands: + + patch -p -N -d /sys/conf ' where is the process ID of the +currently running syslogd process to cause it to re-read the +configuration file. + +Some messages to look for: + - "pppd[NNN]: Connected..." means that the "connect" script has + completed successfully. + - "pppd[NNN]: sent [LCP ConfReq"... means that pppd has attempted to + begin negotiation with the remote end. + - "pppd[NNN]: recv [LCP ConfReq"... means that pppd has received a + negotiation frame from the remote end. + - "pppd[NNN]: ipcp up" means that pppd has reached the point where + it believes the link is ready for IP traffic to travel across it. + +If you never see a "recv" message then there may be serious problems +with your link. (For example, the link may not be passing all 8 +bits.) If that's the case, it would be useful to collect a debug log +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 +and HUP the syslog daemon as before. Then, run pppd with the option +"kdebug 5". Whatever characters arrive over the PPP terminal line +will appear in the debugging output. + +Occasionally you may see a message like + ppp_toss: tossing frame, reason = 4 +The PPP code is throwing away a packet ("frame") from the remote +server because of a serial overrun. This means your CPU isn't able to +read characters from the serial port as quickly as they arrive; the +best solution is to get a 16550A serial chip, which gives the CPU some +grace period. Reasons other than 4 indicate other kinds of serial +errors, which should not occur. + +During the initial connection sequence, you may see one or more +messages which indicate "bad fcs". This refers to a checksum error in +a received PPP frame, and usually occurs at the start of a session +when the peer system is sending some "text" messages, such as "hello +this is the XYZ company". Messages of "bad fcs" once the link is +established and the routes have been added are not normal and indicate +transmssion errors or noise on the telephone line. + +IF IT STILL DOESN'T WORK (OR, BUG REPORTS) + +If you're still having difficulty, send the linux-activists PPP +channel a bug report. It is extremely important to include as much +information as possible; for example: + - the version number of the kernel you are using + - 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 + - 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...) + +DYNAMIC ADDRESS ASSIGNMENT + +You can use Linux PPP with a PPP server which assigns a different IP +address every time you connect. You need to use the 'noipdefault' +option to tell pppd to request the IP address from the remote host. + +Sometimes you may get an error message like "Cannot assign requested +address" when you use a Linux client (for example, "talk"). This +happens when the IP address given in /etc/hosts for our hostname +differs from the IP address used by the PPP interface. The solution +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 +a PPP session. This is possible using Linux PPP. + +One way is to create an account named, say, 'ppp', with the login +shell being a short script that starts pppd. For example, the passwd +entry might look like this: + ppp:(encrypted password):102:50:PPP client login:/tmp:/etc/ppp/ppplogin +Here the file /etc/ppp/ppplogin would be an executable script +containing something like: + #!/bin/sh + exec /usr/etc/pppd passive :192.1.2.23 +Here we will insist that the remote machine use IP address 192.1.2.23, +while the local PPP interface will use the IP address associated with +this machine's hostname in /etc/hosts. The 'passive' option (which is +not required) just means that pppd will try to open negotiations when +it starts, but if it receives no reply it will just wait silently. +This is appropriate if the remote end might take some time before it's +ready to negotiate. (Note that the meaning of the 'passive' option +changed between ppp-1.3 and ppp-2.0.) + +This setup is sufficient if you just want to connect two machines so +that they can talk to one another. If you want to use Linux PPP to +connect a single machine to an entire network, or to connect two +networks together, then you need to arrange for packets to be routed +from the networks to the PPP link. Setting up a link between networks +is beyond the scope of this document; you should examine the routing +options in the manual page for pppd carefully and find out about +routed, etc. + +Let's consider just the first case. Suppose you have a Linux machine +attached to an Ethernet, and you want to allow its PPP peer to be able +to communicate with hosts on that Ethernet. To do this, you should +have the remote machine use an IP address that would normally appear +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 ++-----------+ PPP link +----------+ +| chelseapc | ------------------- | billpc | ++-----------+ +----------+ + | Ethernet + ----------------------------------- 192.1.2.x + +Here the PPP and Ethernet interfaces of billpc will have IP address +192.1.2.17. (It's OK for one or more PPP interfaces on a machine to +share an IP address with an Ethernet interface.) There is an +appropriate entry in /etc/passwd on billpc to allow chelseapc to call +in, with the /etc/ppp/ppplogin script containing + #!/bin/sh + exec /usr/etc/pppd passive proxyarp :192.1.2.23 +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 +this means that chelseapc can communicate just as if it was directly +connected to the Ethernet. + +ADDING MORE PPP CHANNELS + +By default, Linux PPP comes with 4 kernel channels, which means that +at most 4 simultaneous PPP sessions are possible. If you desire more +such sessions (for example if you are serving many dialup lines), you +can easily reconfigure the kernel to add new channels. There are two +steps. + +First you need to edit the kernel file drivers/net/Space.c . As +distributed, it contains a section that looks like this: + +#if defined(CONFIG_PPP) +extern int ppp_init(struct device *); +static struct device ppp3_dev = { + "ppp3", 0x0, 0x0, 0x0, 0x0, 3, 0, 0, 0, 0, NEXT_DEV, ppp_init, }; +static struct device ppp2_dev = { + "ppp2", 0x0, 0x0, 0x0, 0x0, 2, 0, 0, 0, 0, &ppp3_dev, ppp_init, }; +static struct device ppp1_dev = { + "ppp1", 0x0, 0x0, 0x0, 0x0, 1, 0, 0, 0, 0, &ppp2_dev, ppp_init, }; +static struct device ppp0_dev = { + "ppp0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, &ppp1_dev, ppp_init, }; +#undef NEXT_DEV +#define NEXT_DEV (&ppp0_dev) +#endif /* PPP */ + +The pattern should be obvious. For more channels, you need to add +more "static struct device pppN_dev" lines, changing the first, sixth +and eleventh structure entries as appropriate. The highest numbered +PPP device should have NEXT_DEV in its eleventh structure field, and +you should change the ppp3_dev structure to have &ppp4_dev there +instead. + +For example, to add 2 extra channels, you would have + +#if defined(CONFIG_PPP) +extern int ppp_init(struct device *); +static struct device ppp5_dev = { + "ppp5", 0x0, 0x0, 0x0, 0x0, 5, 0, 0, 0, 0, NEXT_DEV, ppp_init, }; +static struct device ppp4_dev = { + "ppp4", 0x0, 0x0, 0x0, 0x0, 4, 0, 0, 0, 0, &ppp5_dev, ppp_init, }; +static struct device ppp3_dev = { + "ppp3", 0x0, 0x0, 0x0, 0x0, 3, 0, 0, 0, 0, &ppp4_dev, ppp_init, }; +... etc. + +Second, you need to change the line in ppp.h (in include/linux) to +change the line that reads + +#define PPP_NRUNIT 4 + +to show the new number of channels; in our case it would become + +#define PPP_NRUNIT 6 + +Finally, recompile and reboot. The bootup message and the contents of +/proc/net/dev should show the correct number of channels. + +CHANGES FROM LINUX PPP 0.1.x + +Linux PPP 0.1.x was based on the free PPP package PPP-1.3. Linux PPP +0.2.1 is based on PPP-2.0.4. There have been some changes to the pppd +options along with significant enhancements. You should read +"RELNOTES" in the pppd directory for a description of the changes. + +Also, some options which were added to PPP-1.3 for the Linux version +have now changed names: + 'defroute' is now 'defaultroute' + 'kerndebug' is now 'kdebug' + 'dropdtr' is now 'modem' +In addition, it is now necessary to use the 'noipdefault' option if +you want to get the local IP address from the remote PPP server. + +CONCLUSION + +Good luck! + +Michael diff --git a/README.osf b/README.osf new file mode 100644 index 0000000..5fd84ae --- /dev/null +++ b/README.osf @@ -0,0 +1,102 @@ + +This file (README.osf) contains instructions for installing ppp-2.2 on a +DEC Alpha running OSF/1 version 2.0 or 3.0. The original STREAMS +module code is by (and copyrighted by) Brad Clements. See the source +files and the general README file for full credits and copyright notices. + +If you would like to be on a mailing list concerning the ppp package, +send mail to srt@cs.unt.edu and let me know. This mailing list should +not have any regular traffic --- I will use it only if bugs are reported +to notify everyone of bug-fixes. + +Note for users of the ppp-2.1.2 package: I have included a fix +for the non-STREAMS tty drivers in this release. If you were using +version 2.1.2 with a hardware serial port, then you probably used the +"rlogin-kludge" that I described in the README that came with 2.1.2. +You don't need this any more, and will have a more efficient connection +if you get rid of this old work-around. + +Below are the steps for installing PPP on a DEC AXP system running OSF/1. +You must do all of the following as "root". + +1. Make the kernel sources, daemon, chat, and pppstat program by typing + + ./configure + make install + + in the directory that this file unpacked into. This installs the + binaries for the PPP daemon and the statistics program in + /usr/local/etc/ppp. If you want them somewhere else, just change + the definition of BINDIR in the top level Makefile.osf. + +2. This step differs depending on whether you are running OSF/1 V3.0 + or later. + + FOR OSF/1 VERSIONS PRIOR TO V3.0: + + | Add the following lines to the file /sys/conf/files: + | + | streamsm/ppp_if.c optional ppp Notbinary + | streamsm/ppp_async.c optional ppp Notbinary + | streamsm/ppp_init.c optional ppp Notbinary + | streamsm/vjcompress.c optional ppp Notbinary + | streamsm/bsd-comp.c optional ppp Notbinary + | streamsm/ppp_comp.c optional ppp Notbinary + | + | + | Edit the file /sys/streams/str_config.c --- at the end there will be a + | comment to the effect of "add new configurations above this comment". + | Add the following lines above this comment: + | + | bzero((caddr_t)&sb, sizeof(sb)); + | sb.sc_version = OSF_STREAMS_CONFIG_10; + | + | retval = ppp_configure(SYSCONFIG_CONFIGURE, + | &sb, sc_size, &sc, sc_size); + + FOR OSF/1 VERSIONS V3.0 AND LATER: + + | Add the following lines to the file /sys/conf/files: + | + | streamsm/ppp_if.c optional ppp if_dynamic ppp Notbinary + | streamsm/ppp_async.c optional ppp if_dynamic ppp Notbinary + | streamsm/ppp_init.c optional ppp if_dynamic ppp Notbinary + | streamsm/vjcompress.c optional ppp if_dynamic ppp Notbinary + | streamsm/bsd-comp.c optional ppp if_dynamic ppp Notbinary + | streamsm/ppp_comp.c optional ppp if_dynamic ppp Notbinary + +4. Find your system's configuration file. This should be called + /sys/conf/SYSNAME, where SYSNAME is replaced by the name of your + host. For example, on my machine (zaphod.csci.unt.edu) it it called + /sys/conf/ZAPHOD. I will refer to this file from now on as + /sys/conf/SYSNAME. + +5. Add the following line at the end of /sys/conf/SYSNAME: + + pseudo-device ppp 2 + +6. Build a new kernel by using the command + + doconfig -c SYSNAME + + (say "n" to "Do you want to edit..."). + +7. Copy the new kernel to /vmunix --- I'm usually pretty nervous about + writing over a perfectly good kernel with one that I'm not sure + about, so I will usually "mv /vmunix /vmunix.old" first. To put + the new kernel in place, do a "cp /sys/SYSNAME/vmunix /vmunix". + +8. Make sure your system is set up so that it can act like a gateway + for messages to your new connection. In particular, check the file + /etc/rc.config for the line define ROUTER, and make sure it is + defined as "yes". + +9. Reboot and you're ready to go! + +Hopefully, that should work with no hitches. If there are problems, or +if I have made a mistake in these instructions, please let me know. + +Steve Tate +University of North Texas +srt@cs.unt.edu + diff --git a/README.sun b/README.sun new file mode 100644 index 0000000..3bc2e2e --- /dev/null +++ b/README.sun @@ -0,0 +1,46 @@ +This file describes the installation process for ppp-2.2 on systems +running SunOS 4.x (or the equivalent). This package does not +currently work under Solaris 2. + +The STREAMS modules in the sunos directory provide kernel support for +PPP on SunOS 4.x systems. They have been tested under SunOS 4.1.3 on +a SparcStation 10. They should work under earlier SunOS 4.x systems, +but no guarantees are given. + +The easiest way to install these modules is to load them into the +running kernel using the `modload' command. They can alternatively be +linked into the kernel image, but this requires rebuilding the kernel. + + +Installation. +************* + +1. Run the configure script and make the user-level programs and the +kernel modules. + + ./configure + make + +2. Install the pppd and chat programs (you need to be root to do this): + + make install + +3. Load the ppp module (you need to be root for this too). In the +sunos directory, do: + + /usr/etc/modload ppp_driver.o + +You will want to do this "modloading" in your /etc/rc.local file +once you have everything installed. The ppp module is copied to +/usr/local/etc by default, so you can put something like the following +in /etc/rc.local: + + if [ -f /usr/local/etc/ppp_driver.o ]; then + /usr/etc/modload /usr/local/etc/ppp_driver.o + fi + +On some systems, /usr/local/etc is mounted read-only. On such +systems, add `-o /etc/ppp/ppp_driver' to the modload command line. + +NOTE: pppstats now works differently, so there is no need to use the +-sym flag to modload, as required with earlier versions. diff --git a/README.ultrix b/README.ultrix new file mode 100644 index 0000000..08d1968 --- /dev/null +++ b/README.ultrix @@ -0,0 +1,123 @@ + +Installing PPP on an Ultrix system requires rebuilding the kernel and +rebooting, in addition to making and installing the pppd and chat +programs. These instructions apply to RISC (MIPS) systems. This +software has been tested under Ultrix 4.4; it should also work under +Ultrix 4.2 or 4.3. + + +Kernel installation procedure. +****************************** + +If you have not previously had an earlier version of this package +installed in the kernel, follow these steps: + +1. Become root. + +2. Apply the patches in the file ultrix/patches using the command: + + patch -p diff --git a/freebsd-2.0/files.patch b/freebsd-2.0/files.patch new file mode 100644 index 0000000..56fb2b7 --- /dev/null +++ b/freebsd-2.0/files.patch @@ -0,0 +1,13 @@ +*** files.orig Wed Dec 14 13:11:12 1994 +--- files Wed Dec 14 13:13:56 1994 +*************** +*** 139,144 **** +--- 139,146 ---- + net/if_ethersubr.c optional ether + net/if_loop.c optional loop + net/if_ppp.c optional ppp ++ net/ppp_tty.c optional ppp ++ net/bsd-comp.c optional ppp + net/if_sl.c optional sl + net/pppcompress.c optional ppp + net/radix.c standard diff --git a/linux/Makefile.top b/linux/Makefile.top new file mode 100644 index 0000000..00ca83d --- /dev/null +++ b/linux/Makefile.top @@ -0,0 +1,13 @@ +# PPP top-level Makefile for Linux. + +all: + cd chat; $(MAKE) all + cd pppd; $(MAKE) all + +install: + cd chat; $(MAKE) install + cd pppd; $(MAKE) install + +clean: + cd chat; $(MAKE) clean + cd pppd; $(MAKE) clean diff --git a/ppp.texi b/ppp.texi new file mode 100644 index 0000000..02bce41 --- /dev/null +++ b/ppp.texi @@ -0,0 +1,214 @@ +\input texinfo @c -*-texinfo-*- +@setfilename ppp.info +@settitle PPP + +@iftex +@finalout +@end iftex + +@ifinfo +@format +START-INFO-DIR-ENTRY +* PPP: (ppp). Point-to-Point Protocol. +END-INFO-DIR-ENTRY +@end format + +@titlepage +@title PPP-2.x +@author by Paul Mackerras +@end titlepage + +@node Top, Introduction, (dir), (dir) + +@ifinfo +This file documents the ppp-2.x package for setting up network links +over serial lines using the Point-to-Point Protocol. + +@end ifinfo + +@menu +* Introduction:: What PPP is and what you can use it for. +* Installation:: How to compile and install the software. +* Configuration:: How to set up your system for +establishing a link to another system. +* Security:: Potential dangers and how to avoid them. +* Compression:: +@end menu + +@node Introduction, Installation, Top, Top +@chapter Introduction + +The Point-to-Point Protocol (PPP) is the protocol of choice for +establishing network links over serial lines. This package (ppp-2.x) +provides an implementation of PPP which supports the Internet Protocols +(TCP/IP, UDP/IP, etc.) and which runs on a range of Unix +workstations. + +As an example, an otherwise isolated system could connect to another +system via a modem using PPP. Suppose that the second system was +connected to the Internet. When the PPP link is established, the first +system is then also connected to the Internet. It can establish +connections with any other Internet host. Users can then use +a wide range of network-based applications on the first system, such as +telnet, ftp, rlogin, email, Mosaic, sup, and X clients and servers. + +Features of PPP include: +@itemize +@item +Multi-protocol support. The PPP packet encapsulation includes a +protocol field, allowing packets from many different protocols to be +multiplexed across a single link. +@item +Negotiation of link characteristics. During link establishment, the two +systems negotiate about the link configuration parameters, such as the +IP addresses of each end of the link. +@item +Authentication. Optionally, each system can be configured to require the +other system to authenticate itself. In this way, access can be +restricted to authorized systems. +@item +Transparency. On asynchronous serial lines, PPP can be configured to +transmit certain characters as a two-character escape sequence. +@item +Compression. PPP includes support for various kinds of compression to +be applied to the packets before they are transmitted. +@end itemize + +This software consists of two parts: + +@itemize @bullet + +@item +Kernel code, which establishes a network interface and passes +packets between the serial port, the kernel networking code and the +PPP daemon (pppd). This code is implemented using STREAMS modules on +SunOS 4.x, AIX 4.1 and OSF/1, and as a line discipline under Ultrix, +NextStep, NetBSD, FreeBSD, and Linux. + +@item +The PPP daemon (@code{pppd}), which negotiates with the peer to establish +the link and sets up the ppp network interface. Pppd includes support +for authentication, so you can control which other systems may make a +PPP connection and what IP addresses they may use. +@end itemize + +@menu +* PPP Concepts:: +@end menu + +@node PPP Concepts, , Introduction, Introduction +@section PPP Concepts + +Establishing a PPP link involves communication between two systems. The +two systems are called ``peers''. When we are talking from the point of +view of one of the systems, the other is often referred to as ``the +peer''. Although we may sometimes refer to one system as a ``client'' +and the other as a ``server'', this distinction is not made in the PPP +protocols. + +PPP requires the use of a communications medium which transmits 8 bits +per character. Typically this is a serial line, perhaps including +modems and telephone lines, but other media can be used (even a telnet +session). The medium must be full duplex---capable of transmitting +characters independently in both directions. Note that PPP cannot work +over a serial link which transmits only 7 bits per character. + +PPP has a mechanism to avoid sending certain characters if it is known +that the medium interprets them specially. For example, the DC1 and DC3 +ASCII characters (control-Q and control-S) may be trapped by a modem if +it is set for ``software'' flow control. PPP can send these characters +as a two-character ``escape'' sequence. The set of characters which are +to be transmitted as an escape sequence is represented in an ``async +control character map'' (ACCM). The ``async'' part refers to the fact +that this facility is used for asynchronous serial lines. For +synchronous serial connections, the HDLC bit-stuffing procedure is used +instead. + +During the lifetime of a PPP link, it proceeds through several phases: + +@enumerate +@item +Communications establishment. In this phase, the underlying +communications medium is prepared for use. This may involve sending +commands to a modem to cause it to dial the remote system. When the +remote system answers, there may be a dialog involving a username and +password. Or, in the case of two systems connected directly by a cable, +there may be nothing to do. + +@item +Link Control Protocol (LCP) negotiation. In this phase, the peers send +LCP packets to each other to negotiate various parameters of the +link, such as the ACCM to be used in each direction, whether +authentication is required, and whether or not to use various forms of +compression. When the peers reach agreement on these parameters, LCP is +said to be ``up''. + +@item +Authentication. If one (or both) of the peers requires the other +peer to authenticate itself, that occurs next. If one of the peers +cannot successfully authenticate itself, the other peer terminates the +link. + +@item +Network Control Protocol (NP) negotiation. PPP can potentially support +several different network protocols, although IP is the only network +protocol (NP) supported by the ppp-2.x package. Each NP has an +associated Network Control Protocol defined for it, which is used to +negotiate the specific parameters which affect that NP. For example, +the IP Control Protocol (IPCP) is used to negotiate the IP addresses for +each end of the link, and whether the TCP header compression method +described by Van Jacobsen in RFC 1144 is to be used. + +@item +Network communication. When each NCP has successfully negotiated the +parameters for its NP, that NCP is said to be ``up''. At that point, +the PPP link is made available for data traffic from that NP. For +example, when IPCP comes up, the PPP link is then available for carrying +IP packets (which of course includes packets from those protocols which +sit above IP, such as TCP, UDP, etc.) + +@item +Termination. When the link is no longer required, it is terminated. +Usually this involves an exchange of LCP packets so that one peer can +notify the other that it is shutting down the link, enabling both peers +to shut down in an orderly manner. But of course there are occasions +when the link terminates because the underlying communications medium is +interrupted, for example when the modem loses carrier and hangs up. + +@end enumerate + +PPP is defined in several RFC (Request For Comments) documents, in +particular RFCs 1661, 1662, and 1334. IPCP is defined in RFC 1332. +Other RFCs describe the control protocols for other network protocols +(e.g., DECnet, OSI, Appletalk). + +@node Installation, Configuration, Introduction, Top +@chapter Installation + +Because ppp-2.x includes code which must be incorporated into the +kernel, its installation process is necessarily quite heavily +system-dependent. In addition, you will require super-user privileges +(root access) to install the code. + +Some systems provide a ``modload'' facility, which +allows you to load new code into a running kernel without relinking the +kernel or rebooting. Under SunOS 4.x, AIX 4.1, OSF/1 and NextStep, this +is the recommended (or only) way to install the kernel portion of the +ppp-2.x package. + +Under the remaining supported operating systems +(NetBSD, FreeBSD, Ultrix, Linux), it is necessary to go through the +process of creating a new kernel image and reboot. (Note that NetBSD +and FreeBSD have a modload facility, but ppp-2.x is currently not +configured to take advantage of it.) + +@node Configuration, Security, Installation, Top +@chapter Configuration + +@node Security, Compression, Configuration, Top +@chapter Security + +@node Compression, , Security, Top +@chapter Compression + +@bye diff --git a/svr4/ppp.conf b/svr4/ppp.conf new file mode 100644 index 0000000..e443a7a --- /dev/null +++ b/svr4/ppp.conf @@ -0,0 +1 @@ +name="ppp" parent="pseudo" instance=0; diff --git a/ultrix/Makefile.top b/ultrix/Makefile.top new file mode 100644 index 0000000..11954bf --- /dev/null +++ b/ultrix/Makefile.top @@ -0,0 +1,23 @@ +# +# ppp top level makefile +# + +BINDIR = /usr/local/etc +MANDIR = /usr/local/man + +all: + cd chat; $(MAKE) all + cd pppd; $(MAKE) all + cd pppstats; $(MAKE) all + +install: + cd chat; $(MAKE) BINDIR=$(BINDIR) MANDIR=$(MANDIR) install + cd pppd; $(MAKE) BINDIR=$(BINDIR) MANDIR=$(MANDIR) install + cd pppstats; $(MAKE) BINDIR=$(BINDIR) MANDIR=$(MANDIR) install + +clean: + rm -f *~ + cd chat; $(MAKE) clean + cd pppd; $(MAKE) clean + cd pppstats; $(MAKE) clean + diff --git a/ultrix/patches b/ultrix/patches new file mode 100644 index 0000000..53e5ddf --- /dev/null +++ b/ultrix/patches @@ -0,0 +1,150 @@ +*** /usr/sys/h/ioctl.h.orig Fri Dec 9 10:05:18 1994 +--- /usr/sys/h/ioctl.h Fri Dec 9 10:06:06 1994 +*************** +*** 405,410 **** +--- 405,411 ---- + #define SLPDISC 0x07 /* BSD Serial Line IP */ + #define PCMDISC 0x08 /* Peripheral Control Module + for dial and button boxex */ ++ #define PPPDISC 0x09 /* PPP Point-to-Point Protocol */ + /* Line disc #'s 16-23 are + reserved for local extension.*/ + +*** /usr/sys/net/net/if.h.orig Wed Aug 4 01:57:00 1993 +--- /usr/sys/net/net/if.h Fri Dec 9 09:29:11 1994 +*************** +*** 231,236 **** +--- 231,237 ---- + #define IFT_XETHER 0x1a /* obsolete 3MB experimental ethernet */ + #define IFT_NSIP 0x1b /* XNS over IP */ + #define IFT_SLIP 0x1c /* IP over generic TTY */ ++ #define IFT_PPP 0x1d /* PPP over generic TTY */ + + /* + * Output queues (ifp->if_snd) and internetwork datagram level (pup level 1) +*** /usr/sys/net/net/netisr.h.orig Fri Dec 9 09:53:17 1994 +--- /usr/sys/net/net/netisr.h Fri Dec 9 09:54:14 1994 +*************** +*** 77,82 **** +--- 77,83 ---- + #define NETISR_LAT 14 /* same as AF_LAT */ + #define NETISR_BSC 15 /* same as AF_BSC */ + #define NETISR_DLO 19 /* same as AF_OSI */ ++ #define NETISR_PPP 26 /* Point-to-Point Protocol */ + + #define schednetisr(anisr) { set_bit_atomic(anisr,&netisr); setsoftnet(); } + +*** /usr/sys/net/net/conf_net.c.orig Fri Dec 9 13:29:49 1994 +--- /usr/sys/net/net/conf_net.c Fri Dec 9 13:32:50 1994 +*************** +*** 84,89 **** +--- 84,90 ---- + #ifdef vax + #include "bsc.h" + #endif vax ++ #include "ppp.h" + + + #if ((NETHER==0 && NFDDI==0) || NINET==0) +*************** +*** 251,257 **** + }; + + +! extern int rawintr(), ipintr(), nsintr(), dnetintr(), dlointr(), dliintr(), latintr(), bscintr(); + #ifdef __mips + extern int scsiisr(); + #endif +--- 252,258 ---- + }; + + +! extern int rawintr(), ipintr(), nsintr(), dnetintr(), dlointr(), dliintr(), latintr(), bscintr(), pppintr(); + #ifdef __mips + extern int scsiisr(); + #endif +*************** +*** 289,294 **** +--- 290,298 ---- + {NETISR_SCSI,scsiisr}, + #endif /* NSCSI > 0 || NSII > 0 || NASC > 0 */ + #endif /* __mips */ ++ #if NPPP > 0 ++ {NETISR_PPP,pppintr}, ++ #endif /* NPPP */ + + {-1 ,0} + }; +*** /usr/sys/data/pseudo_data.c.orig Sat Sep 19 06:20:31 1992 +--- /usr/sys/data/pseudo_data.c Fri Dec 9 09:32:23 1994 +*************** +*** 25,30 **** +--- 25,35 ---- + + #endif /* NSL > 0 */ + ++ #include "ppp.h" ++ #if NPPP > 0 ++ pppattach(); ++ #endif ++ + return; + } + +*** /usr/sys/data/tty_conf_data.c.orig Sat Sep 19 06:19:21 1992 +--- /usr/sys/data/tty_conf_data.c Fri Dec 9 09:32:38 1994 +*************** +*** 83,88 **** +--- 83,94 ---- + int slopen(), slclose(), slinput(), sltioctl(), slstart(); + #endif + ++ #include "ppp.h" ++ #if NPPP > 0 ++ int pppopen(), pppclose(), pppread(), pppwrite(), pppinput(); ++ int ppptioctl(), pppstart(); ++ #endif ++ + #ifdef BINARY + + extern int nldisp; +*************** +*** 141,146 **** +--- 147,161 ---- + nodev, nodev, nodev, nodev, nodev, + nodev, nodev, nodev, nodev, nodev, + #endif ++ ++ #if NPPP > 0 ++ pppopen, pppclose, pppread, pppwrite, ppptioctl, ++ pppinput, nodev, nulldev, pppstart, nulldev, /* 9 - PPPDISC */ ++ #else ++ nodev, nodev, nodev, nodev, nodev, ++ nodev, nodev, nodev, nodev, nodev, ++ #endif ++ + + }; + +*** /usr/sys/conf/mips/files.mips.orig Sat Sep 11 06:09:28 1993 +--- /usr/sys/conf/mips/files.mips Fri Dec 9 09:32:01 1994 +*************** +*** 114,120 **** + io/netif/if_ln_copy.s optional ln Binary + io/netif/if_ne.c optional ne device-driver Binary + io/netif/if_sl.c optional sl device-driver Binary Unsupported +! io/netif/slcompress.c optional sl device-driver Binary Unsupported + io/netif/if_qe.c optional qe device-driver Binary + io/netif/if_uba.c optional inet device-driver Binary + io/netif/if_ni.c optional bvpni device-driver Binary +--- 114,123 ---- + io/netif/if_ln_copy.s optional ln Binary + io/netif/if_ne.c optional ne device-driver Binary + io/netif/if_sl.c optional sl device-driver Binary Unsupported +! io/netif/if_ppp.c optional ppp device-driver Notbinary +! io/netif/ppp_tty.c optional ppp device-driver Notbinary +! io/netif/bsd-comp.c optional ppp device-driver Notbinary +! io/netif/slcompress.c optional sl or ppp device-driver Notbinary + io/netif/if_qe.c optional qe device-driver Binary + io/netif/if_uba.c optional inet device-driver Binary + io/netif/if_ni.c optional bvpni device-driver Binary diff --git a/ultrix/upgrade b/ultrix/upgrade new file mode 100644 index 0000000..4512a23 --- /dev/null +++ b/ultrix/upgrade @@ -0,0 +1,66 @@ +*** /usr/sys/net/net/netisr.h.orig Fri Dec 9 09:53:17 1994 +--- /usr/sys/net/net/netisr.h Fri Dec 9 09:54:14 1994 +*************** +*** 77,82 **** +--- 77,83 ---- + #define NETISR_LAT 14 /* same as AF_LAT */ + #define NETISR_BSC 15 /* same as AF_BSC */ + #define NETISR_DLO 19 /* same as AF_OSI */ ++ #define NETISR_PPP 26 /* Point-to-Point Protocol */ + + #define schednetisr(anisr) { set_bit_atomic(anisr,&netisr); setsoftnet(); } + +*** /usr/sys/net/net/conf_net.c.orig Fri Dec 9 13:29:49 1994 +--- /usr/sys/net/net/conf_net.c Fri Dec 9 13:32:50 1994 +*************** +*** 84,89 **** +--- 84,90 ---- + #ifdef vax + #include "bsc.h" + #endif vax ++ #include "ppp.h" + + + #if ((NETHER==0 && NFDDI==0) || NINET==0) +*************** +*** 251,257 **** + }; + + +! extern int rawintr(), ipintr(), nsintr(), dnetintr(), dlointr(), dliintr(), latintr(), bscintr(); + #ifdef __mips + extern int scsiisr(); + #endif +--- 252,258 ---- + }; + + +! extern int rawintr(), ipintr(), nsintr(), dnetintr(), dlointr(), dliintr(), latintr(), bscintr(), pppintr(); + #ifdef __mips + extern int scsiisr(); + #endif +*************** +*** 289,294 **** +--- 290,298 ---- + {NETISR_SCSI,scsiisr}, + #endif /* NSCSI > 0 || NSII > 0 || NASC > 0 */ + #endif /* __mips */ ++ #if NPPP > 0 ++ {NETISR_PPP,pppintr}, ++ #endif /* NPPP */ + + {-1 ,0} + }; +*** /usr/sys/conf/mips/files.mips.orig Sat Sep 11 06:09:28 1993 +--- /usr/sys/conf/mips/files.mips Fri Dec 9 09:32:01 1994 +*************** +*** 115,120 **** +--- 115,122 ---- + io/netif/if_ne.c optional ne device-driver Binary + io/netif/if_sl.c optional sl device-driver Binary Unsupported + io/netif/if_ppp.c optional ppp device-driver Notbinary ++ io/netif/ppp_tty.c optional ppp device-driver Notbinary ++ io/netif/bsd-comp.c optional ppp device-driver Notbinary + io/netif/slcompress.c optional sl or ppp device-driver Notbinary + io/netif/if_qe.c optional qe device-driver Binary + io/netif/if_uba.c optional inet device-driver Binary