To download a copy of this document, please select one of the following:
hartr@hedunx.hedland.edu.au
``Red Hat Tips'' are documentation meant to help Red Hat users with specific tasks. Some of these documents are for new users, some are for advanced users. Hopefully each document will also be of help for both new and advanced users. If you have contributions to make, please send them to tech-sup@redhat.com. If you have changes that need to be made to individual Tips, send them to the author of that document.
This document is intended for use in setting up your Red Hat machine to connect to the Internet using PPP.
You need the following information about the ``far end'' of your connection (ie from your Internet Service Provider - ISP) :
You also need to know how your ISP's system prompts you for your username and password. The simplest way to find this out is to dial in using Minicom, capture the entire log in process to a file and print this out.
(This is also useful as it checks the modem configuration and serial port set up - make sure that your modem's ``stored'' configuration works fine for connecting to your ISP).
Make sure you have installed the PPP daemon (all RedHat precompiled kernels support PPP). To check this, login as root and type
rpm -qa | grep ppp
Your RedHat system should respond with something like
ppp-2.1.2d-2 (for a Linux 1.2.13 kernel)
ppp-2.2.... (for a Linux 1.3.x kernel)
If you do NOT have the PPP daemon installed, do this now.
Make sure you are logged in as root.
The file /usr/sbin/ppp-on is a script for you to edit. When you have
finished editing it, running this script will connecct your machine to
your ISP.
cp /usr/sbin/ppp-on /usr/sbin/ppp-<your ISP name>
where <your ISP name> is something you remember and easy to type!
/usr/sbin/ppp-<your ISP name>
LOCKDIR=/var/spool/lock
and change it to
LOCKDIR=/var/lock
DEVICE=com1
and change it to read cua0 (DOS com1:), cua1 (DOS com2:) etc -
the serial port on which you have your modem. If your modem is on
DOS com2:, the line should read.
DEVICE=cua1
PHONE=4511234
USER=Pkarl
PASSWORD=password
OUR_IP_ADDR=137.175.6.3
and change them so that they are the phone number, user name,
password and IP number you must use to dial and log into your ISP.
Remember - most ISP's are using Unix based machines (such as
Linux), so you MUST get the upper/lower case RIGHT!
If your ISP is giving you a "temporary" (dynamic) IP number each
time you dial in, use the "dummy" IP number of 0.0.0.0
stty 19200 -tostop
and change it to
stty 38400 -tostop
if chat -l LCK..$DEVICE ABORT "NO CARRIER" ABORT BUSY "" \
ATZ OK ATs50=255s111=0DT$PHONE CONNECT "" \
ogin: $USER ssword: \\q$PASSWORD
(NB This is ALL ONE LINE - but broken here with '\' for readability.
It MUST be all one line in your script - and the spaces before the
'\' are important!)
Change this line to read
if chat -l LCK..$DEVICE ABORT "NO CARRIER" ABORT BUSY "" \
ATZ OK ATDT$PHONE CONNECT "" \
ogin: $USER ssword: \\q$PASSWORD
Now - if your ISP's system uses prompts other than ``...ogin:'' to
ask for your user name and ``...assword:'' to ask for your
password, you must change these two elements to reflect the
prompts your system sees.
pppd asyncmap 0 -detach modem crtscts mru 1500 $OUR_IP_ADDR: \
/dev/$DEVICE
(Again, this must all be on one line - but for readability it is
broken at '\'). Change this by adding the defaultroute option.
pppd asyncmap 0 -detach modem crtscts defaultroute mru 1500 \
$OUR_IP_ADDR: /dev/$DEVICE
chat and pppd.
/etc/resolv.conf and add the IP
number(s)
of your IPS's name servers. Your /etc/resolv.conf should look like
domain <your ISP's domain name>
nameserver XX.XX.XX.XX
Where <your ISP's domain name> is something like
redhat.com
and the XX.XX.XX.XX is the IP number for the domain name server you
obtained from your ISP. (If your ISP gave you more than one IP number,
that's fine, out them all in, each one on a separate line, preceded by
the key word nameserver).
Most PPP connections work just fine, but if the above method does NOT give you a connection, you can get more detailed information from:
Help is also available on the RedHat Mailing list, regularly monitored by a number of ``knowledgeable'' PPP users (including the author of the PPP-Client-Howto) and the Linux newsgroups, particularly comp.os.linux.networking.
This document is Copyright (C) 1996 by Robert Hart. Redistribution of this document is permitted as long as the content remains completely intact and unchanged. In other words, you may reformat and reprint or redistribute only.