Initial PPP Setup
by Bill Unruh05/03/2001
|
Table of contents:
Modem |
The key problem in hooking up a PPP link to an ISP is that the ISPs
seem to compete with each other as to who can find another obscure way of
authenticating
users. Thus we have login, PAP, CHAP 05, CHAP80, CHAP80-lanman, CHAP81,
and combinations of these. The
chief difficulty of connecting to an ISP is discovering which technique
is actually being used by the ISP in an orderly way. Since few of them know
anything
about Linux, and since few of them even understand what technique they
actually use, this procedure should allow you to set up without their
help, and to understand what the ISP's help means if it is given.
The following has a number of steps to connecting to your ISP. The temptation is to skip steps. This is a bad idea, as it will almost certainly lead to grief. Do each step and you will succeed, and you will also learn something about your system in the process.
These instructions were developed with the 2.0.x versions of the Linux
kernels, and also work with the 2.2.x series of kernels.
Similarly, they work with versions of pppd at least from version 2.3.3
on (up to 2.4.1 by now). In fact, some of the features
below only work with later versions of pppd. I would urge you to
upgrade to the latest version. You can get the latest pppd from
ftp://ftp.samba.org/pub/ppp.
You may be able to get older versions from
ftp://linuxcare.com.au/pub/ppp
or
ftp://cs.anu.edu.au/pub/softw
are/ppp/
but these sites are not being updated.
Initial setup
These steps are essentially independent of your ISP. Many ISPs do not know their own systems, and their advice must often be taken with a grain of salt. Thus, the document below shows you how to find out what your ISP wants, independent of what your ISP says he wants. However, you cannot do the first step without your ISP. You must get a user name and a password from your ISP -- which usually means that you must open an account with them and pay money. It is worth asking them to make sure that they tell you exactly what form that user name must take when you sign on. For example, some of them demand that you use your full email address with them as your user name, rather than simply the name itself. Others demand additions to the bare user name. Try to get them to be as specific as possible about exactly what you need to use.
You also need to get the ISP's Domain Name Server (DNS-IP)
address. (This is an address in Internet Protocol [IP] format, which is
four numbers each less than 256 separated by dots [for example, 137.82.43.58].)
Often they
will give you more than one. Occasionally an ISP will refuse. In that
case, they may supply the DNS dynamically instead. Using PPP version
greater than 2.3.7 will allow you still to sign on with them as
described below.
Having that information, log on as root, or, after you have logged on as a user, run su and enter your root password at the prompt.
Modem
Make sure that you know which port your modem is on. The two programs
at modem-chk.html
can help you to determine which port your modem is on. COM1 (serial
port 1) is /dev/ttyS0. COM2 is /dev/ttyS1, etc. In the following, I will assume
/dev/ttyS1.
Change for your situation. It is preferable to use the ttyS ports rather
than
the cua ports or the modem port. The cua ports will disappear in future
releases
of Linux, and the /dev/modem port hides what you are actually doing and
can lead
to conflicts with other programs which use the serial ports.
[Note that if your modem is a winmodem, it will not work as-is under Linux. Some winmodems now have drivers for Linux. See www.linmodems.org--- It is probably a winmodem if it is a PCI modem, less so if it is an ISA and improbable if it is an external modem, and also improbably if it is not a 56-Kbps modem.
If you have the latest
kernels with USB support (Kernels 2.2.17 with the USB patches or 2.4.x)
you may also be able to use USB modems. (They must comply with the ACM
standard.) See the file
Documentation/usb/acm.txt included with the Linux source
(/usr/src/linux* if included on your system, or
here is a copy
from
kernel 2.2.17). Note that for USB modems, the correct port to use is not
the serial port ttyS? series but probably the /dev/usb/acm/? series of
ports, where ? is a USB number. I have never used a USB modem, so can
provide no guidance on setting them up correctly.
See
http://www.o2.net/~gromitkc/winmodem.html for a listing of known
winmodems. For some advice on buying modems for Linux, see
http://www.math.sunysb.edu/~comech/tools/CheapBox.html#modem]
Message Logging
To figure out what is happening while you are trying to log on to
your
ISP, you must turn on debugging and log the debug messages to a file.
The key programs are pppd, and a program it uses, called chat.
We will store those debugging messages in a file called /var/log/ppp.
(You can use any file you wish, including /var/log/messages. Some
distributions are now installing a directory called /var/log/ppp (for example,
the Corel distribution does this). If
yours does, you must use a different name, such as /var/log/ppplog. Use that
name instead everywhere this document talks about /var/log/ppp.)
To make your system record the debugging information from both these programs, do the following
cp /etc/syslog.conf /etc/syslog.conf.orig
to make sure you have a copy of a good version in case you mess up the next command. If you have trouble, copy back the original version.
Edit /etc/syslog.conf and add the lines
local2.* /var/log/ppp
daemon.* /var/log/ppp
(Some versions of syslogd (especially SunOS) demand that those be tabs -- not
spaces --
between the two parts on each line. Some editors refuse to insert
tabs and convert them to spaces. The syslogd shipped with most recent
distributions of Linux do not seem to care, but be warned.)
Then, to tell syslogd to actually log the information, do
killall -1 syslogd
Pages: 1, 2 |