If you're using IE, then well... good luck. IE is broken. It doesn't
understand HTML, it violates the HTTP protocol, and it fucks up in other
fun ways, too.
In short, you should be seeing this document as normal text. If it comes
up with big fucking letters, use another browser. :-)
PPP-Mini-How-To
v0.4
Copyright Daniel A. Nobuto
April 19th 1997
Last half-hearted update Feb 4, 2000
I. Welcome!
This PPP-Mini-How-To explains how to set up a dynamic PPP connection
to a dial-up service, such as an ISP. I wrote this because the current
PPP-How-To (as of this writing) was too complex and difficult for the
people I helped set up PPP.
Also, it was more fun than using a canned script. :-)
Note, there is now a program called wvdial that can do everything
that's covered in here for you, so if you don't want to go digging
in the configuration files, use that program.
This How-To isn't for everyone. It's based on the Linux 2.[0123].x
kernels and ppp 2.2.0f/2.3.x. It's incomplete. It's far from
perfect. It doesn't cover SLIP. It assumes you have PPP support
in your kernel or as a loadable module. So, if you want to find out
how to do something, look around the Linux Documentation Project at:
http://www.tldp.org
If you're still stumped, get a book on Unix system administration. If
that doesn't work, ask someone.
Note: the -------------'s denote where a file begins/ends. They are
not part of the file.
II. The Technical Stuff
In order to get a PPP link up, you must create/edit the following files
A. /etc/ppp/options:
This file contains all the options that you would specify on the
command-line if you started pppd by hand. Basically, it should look
like the following:
------------------------------------------------------------------------------
# /etc/ppp/options
#
# Created Jan 5th, 1996
# By Foo Bar Baz
/dev/ttyS? # /dev/ttyS?, where ? is where the modem is. COM port minus 1,
# for DOS users. So COM 4 is ttyS3, and COM 3 is ttyS2, etc.
# Try ttyS1 first.
115200 # The speed with which the system should communicate with the modem
# (not the speed at which the modem communicates over the phone line).
# 115200 for 33.6k and 28.8k modems, 38400 for 14.4k, 19200 for
# 9600, etc. Your modem manual should tell you. Hopefully.
asyncmap 0 # Note: This might have to be changed. Ask your ISP if unsure.
connect 'chat -f /etc/ppp/myisp.chat'
crtscts
defaultroute # This assumes you're not part of a lan.
lock
mru 552
netmask 255.255.255.0 # This also might need to be changed. Ask your ISP
modem
------------------------------------------------------------------------------
B. /etc/ppp/pap_secret_myisp
If you need PAP to authenticate to the ISP, you need this file.
Otherwise, don't make it.
This file contains your user-name and password for the ISP that you're
dialing into. Make *sure* this file has had mode 600 so intruders
can't get your password.
Note: PAP and CHAP stuff haven't been tested/tried in a long time.
These may not work.
------------------------------------------------------------------------------
# /etc/ppp/pap_secret_myisp
#
# Created Jan 5th, 1996
# By Foo Bar Baz
myusername * mypassword
------------------------------------------------------------------------------
The same thing for CHAP.
------------------------------------------------------------------------------
# /etc/ppp/chap_secret_myisp
#
# Created Jan 5th, 1996
# By Foo Bar Baz
myusername * mypassword
------------------------------------------------------------------------------
C. /etc/ppp/myisp.chat
This file contains the commands to start the chat program to get a
connection to your ISP established. The format is: "RECEIVE:SEND"
over and over. Replace the 5551212 with your ISP's phonenumber.
Make sure you get the apostrophe count correct!
------------------------------------------------------------------------------
ABORT BUSY ABORT 'NO CARRIER' '' ATZ OK
ATM0 OK
ATDT5551212 CONNECT ''
ogin: myusername
ssword: mypassword
------------------------------------------------------------------------------
D. /etc/resolv.conf
This file contains your Domain Name Server (DNS) information. This
file must be mode '644' to work. Do a 'chmod 644 /etc/resolv.conf'
as root, if you need to.
You can have multiple nameservers, but make sure you put the IP
(numeric) address here. (i.e. 127.0.0.1, not dns.example.com)
Also, example.com could be example.net, example.org, example.mil,
example.edu, etc. Ask your access provider what your domain is, and
plug it in there.
------------------------------------------------------------------------------
domain example.com
nameserver 123.45.678.901
------------------------------------------------------------------------------
Now, to start up the PPP session as root, type:
pppd
That's it! That's all you need! Simple, huh? :-)
III. More info.
You will definitely want to read the man pages for pppd(8), chat(8),
and your modem's manual. The ATM0 in the chat script turns off the
modem's speaker. If you don't want to, change that to whatever modem
initialization string you want.
Also, some of the values here may have to be changed. Make sure you
ask your ISP about the following values (not all are needed in the
files mentioned here, but you'll need them all).
*IP Address for your Gateway
*IP Address(es) for your DNS server(s).
*Netmask
*Whether you have a dynamic (assigned on connection) or static
(always the same) address, and if static, what it is.
*The Maximum Transmission Unit (mtu).
*The Maximum Receive Unit (mru).
*Whether you should use PAP or CHAP authentication or not.
*The domain name of the ISP.
*Whether to use VJ header compression or not. -- Even if they say
you should turn it on, if you get a lot (as in hundreds every
minute) of corrupted packets, try turning them off. Some dial-up
servers handle VJ compression incorrectly.
IV. Panic!
Remember, if you have problems, you can always turn debugging on. Just
change the /etc/ppp/options' connect line to read:
connect 'chat -vf /etc/ppp/myisp.chat'
Add the following lines to your /etc/ppp/options:
debug
kdebug
Finally, log in as root and keep a
tail -f /var/log/messages /var/log/lastlog /var/log/debug &
running on the console.
If you're *really* desperate, change 'kdebug' to 'kdebug 2'.
*** WARNING ***
Changing kdebug to 2 will generate *GIGANTIC* log files in /var/log!
After you solve the problem, disconnect and remove or comment out those
options from /etc/ppp/options IMMEDIATELY!
*** WARNING ***
Good luck!
(You're gonna need it! ;-)
V. FTP Locations.
The Linux kernel source:
ftp://ftp.us.kernel.org/pub/linux/kernel/v2.0
ftp://ftp.us.kernel.org/pub/linux/kernel/v2.2
ftp://ftp.us.kernel.org/pub/linux/kernel/v2.4
pppd source:
ftp://metalab.unc.edu/pub/Linux/system/network/serial/ppp
ftp://cs.anu.edu.au/pub/software/ppp
And make sure you read the README and Documentation/Changes files
in the kernel source.
VI. FAQ.
Q. Help! It says 'Serial line is looped back.'!
A. Use a dial-up program like minicom or seyon to dial your ISP's
number. Then write down everything that comes up after the
Password: prompt. If it tells you what your IP address with a line
such as:
PPP 123.4.567.89
Then add the line:
PPP ''
To the end of your /etc/ppp/myisp.chat file. Basically, put an
"EXPECT:NULL" sequence in your file that matches the ISP's output
after the Password: and before the }}}##!%%$$(%-ish garbage that
spews on your screen (you might not see this, don't worry if you don't)
.
On the other hand, if you get a shell prompt ($, %, >, #), you're
probably dialing into the wrong number, or need to start up ppp on
the remote end. Ask your ISP what command starts PPP on their shell,
or what number you should be dialing. Also, this could mean they use
PAP or CHAP, so you need to set it up for that. A few terminal servers
require you to wait for the login: prompt and put ppp in there. Again,
ask your ISP to be sure.
Q. Help! I want to do xxxxx, but your Mini-How-To doesn't cover it!
A. Try reading the PPP-How-to and the ISP-Hookup-How-to. If that
doesn't help, ask on IRC or a newsgroup. Make sure you ask on an
appropriate channel/newsgroup, though.
Q. What about the other How-To's? What are they like?
A. Depends on whether that's what you want or not. It's all a matter
of taste. Give the other stuff a spin, and find one that you like.
Just experiment. (Make sure you back your config files up when you
find one that works before trying out another one).
Q. It says, 'PPP is not available on this machine'!
A. Do you have PPP support in the kernel, or as a module? If you
have it as a module, is the module loaded with insmod or kerneld?
If the support is there and you're still getting the message, it's
time to upgrade your pppd. Otherwise, re-compile your kernel. The
Kernel-How-To should cover it.
Q. My 'tail' says that chat is sending what I should be recieving,
and waiting for what I should be sending!
A. You probably made a typo in the /etc/ppp/myisp.chat script, then.
Check to make sure you have the proper number and order of arguments.
Also, make sure you have a '' where appropriate.
Q. How do I read mail, news, browse the web, ftp, telnet, etc.?
A. That's beyond the scope of this Mini-How-To. Look on the Linux
Documentation Project home page for other How-To's and try the man
pages in your system.