Zetnet Services - Connecting with Linux
Two suggested methods for connecting using Linux are:
This is a script prepared for use by Zetnet customers by Chris Bond. This document assumes you are running a 1.2 or 2.0 Linux kernel - the instructions below may work for older versions.
We also assume a basic familiarity with general Linux/Unix usage.
1. Preliminary
Before you start, make sure you have at least the following installed:
A 1.2 or 2.0 kernel with PPP support enabled.
If you're not sure, type cat /proc/version on the command line.
This should report the version you're running as something like:
Linux version 2.0.33 (root@warrior.uk.logics.com) (gcc version 2.7.2.3) #4 Sat Jan 17 09:51:56 GMT 1998
The pppd program
You need version 2.1.2 for a 1.2 kernel, and 2.2.x for a 2.0
kernel. You can check the version of pppd by typing
/usr/sbin/pppd -v on the command line. pppd will report its
version and exit.
In the unlikely event that you don't have both of the above, you will
need to get and install them. That's beyond the scope of this document
- see the PPP-Howto for more information.
Check to see that the directory /etc/ppp exists; if not, create it by
typing:
mkdir /etc/ppp
as root. This is where your PPP configuration files will be placed.
2. Setting up DNS
Put the following in /etc/resolv.conf:
domain zetnet.co.uk
nameserver 194.247.47.47
nameserver 194.247.40.126
3. The Chat Script
This is the script which pppd will use to negotiate the initial modem
connection. Put the following in /etc/ppp/zetnetscript:
#!/bin/sh
exec /usr/sbin/chat \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
'OK-+++\c-OK' ATH0 \
TIMEOUT 30 \
OK ATDT$TELEPHONE \
CONNECT '' \
ogin: ZETppp \
ame 'Your Full User Name' \
umber 1234-567-89 \
'' 10000000 \
'' password
You must of course set up correct values for name, number and your
registration details.
Note: this file should be owned by root and should not be
world-readable; it contains your dialup password, which should be kept
secret, especially if more than one person uses your Linux box.
(chmod 700 /etc/ppp/zetnetscript)
4. The pppd Configuration File
This file contains run-time configuration directives for pppd. Put the
following in /etc/ppp/options:
lock
This is the shell script you run to bring your connection up. Put the
following in /usr/sbin/ppp-on:
#!/bin/sh
TELEPHONE=08450798090
LOCAL_IP=0.0.0.0
REMOTE_IP=0.0.0.0
NETMASK=255.255.255.0
# cua0 = COM1, cua1 = COM2, cua2 = COM3, cua3 = COM4
DEVICE=cua1
export TELEPHONE
DIALER_SCRIPT=/etc/ppp/zetnetscript
exec /usr/sbin/pppd lock modem crtscts /dev/$DEVICE 115200 \
asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
The value for DEVICE should be cua0 if your modem is on COM1, cua1 if
your modem is on COM2, and so on.
5. The ppp-off Script
This is the shell script you run to take your connection down. Put the
following in /usr/sbin/ppp-off:
#!/bin/sh
if [ "$1" = "" ]; then
DEVICE=ppp0
else
DEVICE=$1
fi
if [ -r /var/run/$DEVICE.pid ]; then
kill -INT `cat /var/run/$DEVICE.pid`
if [ ! "$?" = "0" ]; then
rm -f /var/run/$DEVICE.pid
echo "ERROR: Removed stale pid file"
exit 1
fi
echo "PPP link to $DEVICE terminated."
exit 0
echo "ERROR: PPP link is not active on $DEVICE"
exit 1
Note: These scripts need to be readable and excutable. (chmod 755 file)
6. Trying it out
You should now be ready to make a connection to Zetnet. As root, type:
/usr/sbin/ppp-on
All output from pppd is logged to the messages file; the first time
you try to connect, you should watch this file for possible problems.
To do this, type:
tail -f /var/log/messages
To check the status of the PPP interface, type:
ifconfig ppp0
The output should be similar to the following. If the command
generated no output, the link is not up.
ppp0 Link encap:Point-Point Protocol
inet addr:194.247.43.31 P-t-P:194.247.43.30 Mask:255.255.255.0
UP POINTOPOINT RUNNING MTU:1500 Metric:1
RX packets:5097 errors:0 dropped:0 overruns:0
TX packets:4931 errors:0 dropped:0 overruns:0
At this point you're all set - happy browsing!
7. Troubleshooting
I get the error message 'Sorry - this system lacks PPP support'
This can be one of two things:
+ Your kernel does not the PPP drivers built in. You will need
to compile a new kernel which does.
+ Make sure that you're using the correct serial device in the
ppp-on script. Mistakenly selecting, say, the mouse as your
serial device will result in this error - not very intuitive,
but that's life :-)
If you are still having problems getting a dialup connection to work
using Linux, you could email me Chris Bond <chris@uk.logics.com>.
You will need to include all error logs, what distribution and kernel
you are using.
WvDial is a program that connects your Linux workstation to the Internet as easily as possible. It will automatically detect your modem, and it can log into almost any Internet Provider's server without any special configuration
Further details can be obtained from the Worldvision Web Site.
26/10/98