Linux is an exciting, and
rewarding operating system to run, however creating an actual connection to
the net can be a rather harsh process at times. This walkthrough is aimed at
the novice Linux user whom wishes to establish a connection to Green Apple
using the pppd and chat programs. This method is approached simply due to it
being the most universal application among all distributions. Assumptions made
are the following.
- That you have installed a version of Linux
correctly (ie: Slackware, Debian, Redhat Mandrake, ect.)
- You have a somewhat decent knowledge of the
Linux operating system and it's components.
- That your kernel supports ppp. Note: Most
kernels coming out of the box already have ppp support enabled by default.
- That you have a working hardware based modem,
support is available for some Winmodems but this is out of scope of this
document. (pppsetup supports LT Winmodems)
- There is already a working script that sets
the serial ports of your machine (Nearly all distributions have this out of
the box.
Detecting The Modem
The first step before beginning the setup of
ppp is to first have a working, and recognized modem. You should have your
modem connected to a serial port (if its an external) or already in your
machine, hopefully with no conflicts in resources. It is always a good idea to
see what com ports are enabled in your bios before jumpering a modem to a
particular com port or IRQ. You may need to disable one of your com ports in
your BIOS before jumpering your internal modem to avoid complications. If you
have an external modem you need not worry about anything except that the
serial port you have connected your modem to is in proper working order. Linux
treats all devices as files, which can make querying a modem quite easy. There
are really only a few places a modem can hide in Linux. Com ports are listed
differently in Linux. In DOS you have com 1, com 2, com 3 and com 4. In Linux,
however; the following applies.
| In DOS |
In Linux |
| COM 1 |
/dev/ttyS0 |
| COM 2 |
/dev/ttyS1 |
| COM 3 |
/dev/ttyS2 |
| COM 4 |
/dev/ttyS3 |
As you can see, things are a bit different
here, but this does not prove to be too much of a problem. There are many
suites in which you can download and use to detect your modem. Programs such
as Seyon, or Minicom prove to be excellent testing programs. Since some people
may not have these programs installed, we shall use a generic way of testing
for a modem.
- Login as root on your machine.
- Pick your first ttySx for example /dev/ttyS1
- Plug in a speaker to the speaker out of your
modem and turn up the volume while also making sure that the phone line has
been plugged into your modem.
- Type the following at the shell prompt
echo -e "ATZ\n" > /dev/ttySx where /dev/ttySx is the tty of the COM
port you wish to test. Example: echo -e "ATZ\n" > /dev/ttyS0
- After you have typed this, type the following
where /dev/ttySx is the tty you have used in the previous entry. Type the
following at the shell prompt echo -e "ATL1M1\n" > /dev/ttySx
after typing this and hitting enter, follow with echo -e "ATDT654-2133\n" >
/dev/ttySx
- If you here the handshake tones you have
found your modem and it is capable of dialing. If you get no response after
about thirty seconds, hit ctrl-c to kill the process and try again with
another tty. NOTE: this does not connect you to Green Apple. It will simply
cause the modem to dial in.
Hopefully, if all goes well, you have found
your modem.
Getting Connected
After you have reached this point there are
many tools available for setting up your internet connection via ppp. Many of
these tools work in Xwindows, however many Linux users find it necessary to
have their connection made available at boot time. Taking this into account,
we shall setup our connection using a tool called pppsetup. This program is
compatible with nearly all distributions of Linux. This program also solves
the need for having an interface available through console at boot time, as
well as the ability to configure your connection from console as root. There
are however a few requirements for its use.
- First you must have the ncurses library
installed on your system. This library is used for the GUI of pppsetup. Most
distributions of Linux come with this preinstalled. To check to see if you
have this library, login as root and type the following at the prompt.
updatedb; locate ncurses This will cause the database of files to be
updated and for a search to be performed for the ncurses library. If you do
not see the file libncurses.a anywhere then it is likely you need to download
the ncurses library. You can obtain the ncurses library from
ftp://ftp.gnu.org/gnu/ncurses/. Downloading the file from another machine
onto a disk is normally the best way to obtain the library, however you may
need to break up the tar.gz into two separate files and place them onto two
different disks. If this is the case make sure you unzip each file into the
same directory before installing. If you are having trouble mounting your
floppy disks look further down in the tutorial where I give the correct
syntax for mounting a floppy. The normal configure, make and make install
should do the trick for installation, and as always read the README file for
more in depth configuration of ncurses.
- Again, that you have a kernel that supports
ppp either as a module or as native built in support.
Now to begin the installation of pppsetup,
first obtain a floppy disk and access to a machine with a working internet
connection. It is recommended that you perform these next steps with another
Linux box of a friend's perhaps, or a Windows/MSDOS based system.
- First point your browser to
http://greenapple.linux.tucows.com. In the box marked "Search for
Software" type in pppsetup. In the pull down menu choose the option "Linux".
After doing so hit the go button to proceed.
- Once you have done this you should be shown
the current version of pppsetup. Click the link and save the tar.gz to the
disk you have previously formatted for either dos, or Linux (depending on
what machine you are working from).
- After doing so take the floppy to your
machine running linux and perform the following as root to mount the disk.
First cd to /mnt and check to see if there is a directory called floppy. If
there is not a directory called floppy then create one and type the
following: mount -t msdos /dev/fd0 /mnt/floppy This should mount
the floppy under /mnt/floppy. If your disk contains a Linux Native filesystem
you may omit the -t msdos from the mount command.
- Now, type cd /mnt/floppy to place yourself in
the mounted floppy directory. After doing so type cp ppp* /tmp which will
cause the tar.gz file to be placed in /tmp .
- After doing the following type cd /tmp;
gunzip ppp*; tar -xvf ppp* which will first take you to /tmp then unzip the
tarball and finally unpack the tarball into a directory much like the name of
the tarball.
- After finishing this step type ls to see the
directory that was formed, then type cd thatdirectoryname to enter the
directory. Finally type ./pppsetup
- Follow the boxes, they should be pretty
descriptive however you will need the following pieces of information, so
copy them down or print out this document.
|
Information Needed |
| Phone Number |
654-2133 |
| Primary DNS |
192.168.187.6 |
| PAP or CHAP? |
PAP |
| Login Name |
<your login> |
| Password |
<your password> |
| Modem Comport |
You Should Know this Now |
Note: If you have pppsetup-2.25 or higher, you
may not be asked for DNS servers. Also PLEASE make sure you read the readme
files with pppsetup. Not only are they educational, they may provide you with
tips and tricks for getting the most out of your ppp connection. Just
following through the boxes should be all that is required to set up pppsetup.
After you are finished your files are stored in /etc/ppp/ and you may want to
browse through them to look at the files. |
|
This document is copyright Green Apple, Inc, 1995-2007.
Permission is granted for the free distribution of it provided that its
contents, including this notice, are not in any way altered. Green Apple disclaims all responsibility of fitness and suitability
of this document. User is responsible for any software they
download or install. It is incumbent upon User to read and obey copyright and
licensing notices of all the software they use.
|