Linux PPP operations come in two parts: PPP support code in the kernel, and a PPP daemon. We will tackle each in turn.
Many distributions seem to provide PPP kernel support in their default installation kernels, but others do not.
If at boot your kernel reports messages like
PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
PPP line discipline registered.
then your kernel does have PPP support compiled in.
You can check these boot-time messages using the command
dmesg
If you do not have kernel support for PPP, you will need to re-build the kernel. See your distribution's documentation, or the Kernel-HOWTO at The Linux Kernel HOWTO for full details.
You will need version 2.0 or better of the PPP Daemon, pppd
.
You can check if pppd
is installed, and find out its version
number using
pppd -version
(or maybe /usr/sbin/pppd -version
).
If you need to install pppd
, look first on your distribution
disks or web site. If your Linux distribution does not include the
PPP software, you will need to obtain and compile
the Linux PPP daemon source code. Locate a file named
ppp-X.Y.Z.tar.gz
, and choose the latest version (i.e., highest
version X.Y.Z) available from this site.
The PPP package contains instructions on how to compile and install the software so this document does not!
Copy the following
chat script to
/etc/ppp/chat/das
.
ABORT BUSY ABORT 'NO DIALTONE' ABORT 'NO CARRIER' ABORT 'RING\r'
'' ATZ
OK-ATZ-OK ATM0D3988211
CONNECT \p\c
TIMEOUT 10
name:--name:--name:--name: _your_das_username_here_
sword: _your_das_password_here_\q
Box "ppp /compressed default"
Edit the script:
_your_das_username_here_
with your
DAS user name.
_your_das_password_here_
with the
password. Note that there is a trailing '\q' after the password
with no space between the password and '\q'. Leave it there:
it suppresses writing the password into log files.
If you need to embed a space into either the username or the password, you can quote the string. For example: "this password has spaces". Finally, note that your DAS password is contained in cleartext in this file, so it must be protected:
chmod 600 /etc/chat/das
First, make sure you are logging debug-level syslog messages. If
your /etc/syslog.conf
does not have a line such as:
*.debug;cron.none -/var/log/debug
then put one there, and make syslog re-read the file with kill -HUP
`cat /var/run/syslogd.pid`
, or similar.
Next, attempt to set up a PPP connection with a command such as:
pppd ttyS1 38400 modem crtscts defaultroute lock \
netmask 255.255.255.0 \
connect "chat -v -f /etc/ppp/chat/das"
You must, of course, replace ttyS1
with the name of the serial
port to which your modem is connected. Remember, DOS COM
n
translates to ttyS
n-1 in linux.
The '-v' option for chat
turns on verbose mode, in which the
complete chat dialog is logged to syslog. After the above
modification, debug-level syslog messages are being logged to the file
/var/log/debug
. You should tail -f /var/log/debug
now to check the progress of the chat script.
Assuming all goes well, you will eventually see a message in the syslog similar to:
Sep 19 12:25:27 hilbert pppd[17524]: Connect: ppp0 <--> /dev/ttyS3 Sep 19 12:25:30 hilbert pppd[17524]: local IP address 198.168.189.92 Sep 19 12:25:30 hilbert pppd[17524]: remote IP address 198.168.189.8
(The IP addresses will be different, of course)
You're on the net! Running ifconfig
should show a ppp0
interface. The net tools, such as telnet, should now work. Of
course, there may be something amis with the nameserver at this point.
So it is prudent to first try with an IP address: telnet
132.206.51.245
. If that works, try with the name: telnet nova
.
Your PPP connection is ended by: kill -HUP `cat
/var/run/ppp*.pid`
. The syslog should show the link going
down.