DIALD: Demand Dialling
with help from Jeffrey Hawkins RTSWGURU@msn.com
Revised for Kernel 2.4.x with diald 1.0.1
SEE PPP->DEMAND DIALLING FOR AN EASIER
If you are a windoze refugee, you may have been looking for the equivalent of 'dial up networking'. You have found it.
Demand dialling causes your modem to connect to
your ISP automatically when you begin to browse the
internet or run your mailer program.
Like most steps, it is assumed you are a root user, and you have knowledge how to edit a file via the console, or from a gui. It also assumes you know how extract and compile a tarball, or, install and rpm. THESE items are not covered here.see here for basic coverage of these items.
Diald is actually two packages in one:
Diald, as supplied, from tarball or rpm does not contain the setup scripts you need to tailor it to your system. These scripts are detailed in this SxS.
INSTALLING DIALD (versus installing DCTRL)
diald uses the pppd daemon directly. It does NOT use any pppd dialling scripts you may already have created. It does NOT use kppp, or Xisp.
However, save yourself pain and grief by FIRST doing PPP->CLIENT. DO NOT CONTINUE WITH THIS SxS UNTIL YOU"VE DONE SO. YOU ARE WASTING YOUR TIME.
The options you enter into diald directly, will be the same
or similar to ppp-client. Not only, must you first establish a
working dialup conection, you will use most of the data from
that SxS, AND, it is one lot easier to debug Do it now, come
back here later.
These steps make assumptions that you do in fact have a working ppp->client.
Download and install diald version 1.0.1, or better from sourceforge.
if this link is broken, go to www.rpmfind.net and obtain a similar rpm
Steps for installing this file, or it's tarball, are NOT
included here, since by now, you will be very familiar with
such a process.
diald uses a fifo to communicate.
if this 'file' is not present type the following as su
chmod 777 diald
mknod /etc/diald/diald.ctl p
chmod 664 /etc/diald/diald.ctl
chown root.users /etc/diald/diald.ctl
Create the following script file as /etc/ppp/connect
FOR PAP CONNECTIONS (you MUST install PPP->CLIENT)
/usr/sbin/chat "" ATDT12345 CONNECT ""
FOR SCRIPT CONNECTIONS
#/usr/sbin/chat "" ATDT12345 CONNECT "" ogin: YOURNAME word: YOUR_PASSWORD
FOUR: change permissions
chown root.root /etc/ppp/connect
chmod 700 /etc/ppp/connect
FIVE: make a config file
chown root.root /etc/diald.conf
chmod 600 /etc/daild.conf
SIX: edit the skeleton config
The following is the recommend contents of the file, man diald for more info
(content order is not important)
# items only you can know
#modem specifics, normally just right
accept any 600 any
Local and remote are dummy entries. They are
re-configured by 'dynamic' during ppp
negotiation with your ISP. IF your ISP does NOT supply dynamic IP's remove dynamic and
enter the correct fixed values, (only you and your ISP can know these details.)
Note that on dynamic connections where the 'local' ip number is set AFTER the connection, the very first packet from diald will FAIL.
The only way around this is to set the 'dummy' address to the 'real' address before dialing.A difficult task.
accept any 600 any, allows any connection for any off computer traffic
Next assign tap devices
here is the script required, or, you can do this by hand
# create fifo
[ -f /etc/diald/diald.ctl ] || mknod /etc/diald/diald.ctl p
# make 16 (ether)tap entries in /dev and add to modules.cof
for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
[ -c /dev/tap$i ] || mknod /dev/tap$i c 36 $(($i+16))
echo "alias tap$i ethertap" >>/etc/modules.conf
echo "options tap$i -o tap$i unit=$i" >>/etc/modules.conf
Add the following to /etc/modules.conf
# tap device configuration
alias tap0 ethertap
options tap0 -o tap0 unit=0
alias tap1 ethertap
options tap1 -o tap1 unit=1
alias tap2 ethertap
options tap2 -o tap2 unit=2
alias tap3 ethertap
options tap3 -o tap3 unit=3
alias tap4 ethertap
options tap4 -o tap4 unit=4
alias tap5 ethertap
options tap5 -o tap5 unit=5
alias tap6 ethertap
options tap6 -o tap6 unit=6
alias tap7 ethertap
options tap7 -o tap7 unit=7
alias tap8 ethertap
options tap8 -o tap8 unit=8
alias tap9 ethertap
options tap9 -o tap9 unit=9
alias tap10 ethertap
options tap10 -o tap10 unit=10
alias tap11 ethertap
options tap11 -o tap11 unit=11
alias tap12 ethertap
options tap12 -o tap12 unit=12
alias tap13 ethertap
options tap13 -o tap13 unit=13
alias tap14 ethertap
options tap14 -o tap14 unit=14
alias tap15 ethertap
options tap15 -o tap15 unit=15
And create the tap devices with the corresponding "mknod
/dev/tap* c 36
NN" command (NN starts at 16 for tap0 and goes incremented by 1 until
31 for tap15). You don't need to create all tap devices but it is
at least one more than those you know that you'll need just to stay on
the safe side.
Note, you must have Ethernet Tap Support enabled in the Kernel.
You can now type diald at the command prompt.
pinging an external ip, should bring the modem up. /var/log/messages is your friend. Almost ALL connection issues would be due to and covered by ppp->client. If you have not done THAT step, why are you here?
ADDENDA #1 Killing diald.
Diald uses a fifo mechanisim to communicate to you. The commands you need to know are
echo "COMMAND" >/etc/diald/diald.ctl
The COMMANDs are
up force the ppp to dial
down force the line to drop
reset force diald to re-initialise itself (and re-read diald.conf)
quit kill diald
ADDENDA #2 Dial control and monitoring.
dctrl from the command line initiates a gui display
dctrl title = diald fifo=/etc/diald/diald.ctl
this is an excellent little gui that can sit there
monitoring the traffic levels, and other items respective to
diald. You can control most
aspects of diald, via this gui.