I'm having difficulty getting 'diald' to function correctly. I've set
up 'ppp', and it works fine (I can ping, name lookups, etc.) when I
start 'pppd' (as root).
However, when make the modifications suggested by the 'diald'
documentation (removing the connect, defaultroute, device and rate
lines) and start 'diald', it dials the phone, connects, starts 'pppd',
but nothing happens until 'diald' times out waiting for 'pppd' to
startup and kills 'pppd'.
When I start 'diald', it creates the sl0 device, as expected, and when
I try to ping somebody, the modem dials, connects, and logs in, but
'ping' eventually times out waiting for the nameserver.
The really odd part, is that the 'pppd' works fine by itself!
If anyone has a suggestion, fix, or needs more information, please
either post, or email me at spe...@america.net. Thanks!
Here are the particulars:
----- OS: Red Hat Linux 5.1 CD-ROM
----- diald package: diald-0.16.5-201
----- ppp package: ppp-2.3.3-4
----- /var/log/messages:
Sep 10 23:02:21 akira diald[1038]: Running connect (pid = 1145).
Sep 10 23:02:21 akira connect: Initializing Modem
Sep 10 23:02:23 akira connect: Dialing <number>
Sep 10 23:02:23 akira chat[1149]: report (CONNECT)
Sep 10 23:02:23 akira chat[1149]: timeout set to 45 seconds
Sep 10 23:02:23 akira chat[1149]: abort on (NO CARRIER)
Sep 10 23:02:23 akira chat[1149]: abort on (BUSY)
Sep 10 23:02:23 akira chat[1149]: abort on (NO DIALTONE)
Sep 10 23:02:23 akira chat[1149]: abort on (ERROR)
Sep 10 23:02:23 akira chat[1149]: send (ATDT<number>^M)
Sep 10 23:02:24 akira chat[1149]: expect (CONNECT)
Sep 10 23:02:24 akira chat[1149]: ^M
Sep 10 23:02:43 akira chat[1149]: ^MATDT<number>^M^M
Sep 10 23:02:43 akira chat[1149]: CONNECT
Sep 10 23:02:43 akira chat[1149]: -- got it
Sep 10 23:02:43 akira chat[1149]: send (^M)
Sep 10 23:02:43 akira diald[1038]: Unknown request 'chat: Sep 10
23:02:43 CONNECT 115200' made.
Sep 10 23:02:43 akira diald[1038]: Unknown request 'Closing
"/var/log/diald.connect".' made.
Sep 10 23:02:43 akira connect: Opening "/var/log/diald.connect"...
chat: Sep 10 23:02:43 CONNECT 115200 Closing
"/var/log/diald.connect".
Sep 10 23:02:44 akira connect: Logging in
Sep 10 23:02:45 akira connect: Protocol started
Sep 10 23:02:45 akira diald[1038]: Running pppd (pid = 1157).
Sep 10 23:02:46 akira kernel: PPP: version 2.2.0 (dynamic channel
allocation)
Sep 10 23:02:46 akira kernel: PPP Dynamic channel allocation code
copyright 1995 Caldera, Inc.
Sep 10 23:02:46 akira kernel: PPP line discipline registered.
Sep 10 23:02:46 akira kernel: registered device ppp0
Sep 10 23:02:46 akira pppd[1157]: pppd 2.3.3 started by root, uid 0
Sep 10 23:03:45 akira diald[1038]: pppd startup timed out. Check your
pppd options. Killing pppd.
Sep 10 23:03:45 akira kernel: Swansea University Computer Society IPX
0.34 for NET3.035
Sep 10 23:03:45 akira kernel: IPX Portions Copyright (c) 1995 Caldera,
Inc.
Sep 10 23:03:46 akira kernel: Appletalk 0.17 for Linux NET3.035
Sep 10 23:03:46 akira pppd[1157]: Terminating on signal 2.
Sep 10 23:03:47 akira pppd[1157]: Exit.
Sep 10 23:03:48 akira diald[1038]: Delaying 10 seconds before clear to
dial.
-----/var/log/pppd (I modified /etc/syslog.conf to write out
daemon.debug to /var/log/pppd)
Sep 10 23:02:21 akira diald[1038]: Running connect (pid = 1145).
Sep 10 23:02:43 akira diald[1038]: Unknown request 'chat: Sep 10
23:02:43 CONNECT 115200' made.
Sep 10 23:02:43 akira diald[1038]: Unknown request 'Closing
"/var/log/diald.connect".' made.
Sep 10 23:02:45 akira diald[1038]: Running pppd (pid = 1157).
Sep 10 23:02:45 akira diald[1157]: Running pppd: /usr/sbin/pppd
-detach modem crtscts mtu 1500 mru 1500 debug
Sep 10 23:02:46 akira pppd[1157]: pppd 2.3.3 started by root, uid 0
Sep 10 23:03:45 akira diald[1038]: pppd startup timed out. Check your
pppd options. Killing pppd.
Sep 10 23:03:46 akira pppd[1157]: Terminating on signal 2.
Sep 10 23:03:47 akira pppd[1157]: Exit.
----- ifconfig output with diald running:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0
TX packets:0 errors:0 dropped:0 overruns:0
eth0 Link encap:Ethernet HWaddr 00:E0:29:09:9C:CA
inet addr:192.168.100.1 Bcast:192.168.100.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0
TX packets:0 errors:0 dropped:0 overruns:0
Interrupt:11 Base address:0x6100
eth1 Link encap:Ethernet HWaddr 00:E0:29:09:9C:D9
inet addr:192.168.10.1 Bcast:192.168.10.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0
TX packets:0 errors:0 dropped:0 overruns:0
Interrupt:9 Base address:0x6200
sl0 Link encap:Serial Line IP
inet addr:192.168.0.1 P-t-P:192.168.0.2 Mask:0.0.0.0
UP POINTOPOINT RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0
TX packets:12 errors:0 dropped:0 overruns:0
----- /etc/ppp/options (the working one, used to successully connect
without using 'diald')
connect /etc/diald/connect
defaultroute
/dev/modem0
115200
persist
0.0.0.0:0.0.0.0
-pap
-chap
----- /etc/ppp/options (the 'broken' one, used to unsuccessfully
connect using 'diald')
#connect /etc/diald/connect
#defaultroute
#/dev/modem0
#115200
persist
0.0.0.0:0.0.0.0
-pap
-chap
----- /etc/diald/diald.conf:
#
# diald.conf for akira
#
# Bring the link up for anything, timeout in seconds. Use this for
# when the computer has its own phone line
# accept any 420 any
# Use the filter file that comes with diald. This can be a bit
drastic,
# so use the filter below
include /usr/lib/diald/standard.filter
# or use the filter that brings the link up for use on a line shared
# with a phone
# include /etc/diald/phone.filter
# stuff to set up the diald connection
device /dev/modem0
speed 115200
modem
crtscts
lock
mode ppp
# We may get another terminal server, thus use
# 'dynamic' and do not tell PPP the IP number of the other end
# For use with gated, comment out the 'dynamic' option, and
# set remote to be the same as local
dynamic
local 192.168.0.1
remote 192.168.0.2
defaultroute
# pppd options
pppd-options debug
# Delay sending packets for 5 seconds after PPP device opens -
# this allows routes to be established back to the appropriate dialup
server.
#up-delay 5
connect /etc/diald/connect
redial-timeout 10
fifo /etc/diald/diald.ctl
----- /etc/diald/connect (this is the standard script distributed with
RH 5.1, with my information inserted):
#!/bin/sh
# Copyright (c) 1996, Eric Schenk.
#
# This script is intended to give an example of a connection script
that
# uses the "message" facility of diald to communicate progress through
# the dialing process to a diald monitoring program such as dctrl or
diald-top.
# It also reports progress to the system logs. This can be useful if
you
# are seeing failed attempts to connect and you want to know when and
why
# they are failing.
#
# This script requires the use of chat-1.9 or greater for full
# functionality. It should work with older versions of chat,
# but it will not be able to report the reason for a connection
failure.
# Configuration parameters
# The initialization string for your modem
MODEM_INIT="ATZ&C1&D2"
# The phone number to dial
PHONE_NUMBER="<number>"
# The chat sequence to recognize that the remote system
# is asking for your user name.
USER_CHAT_SEQ="ogin:--ogin:--ogin:--ogin:--ogin:--ogin:--ogin:"
# The string to send in response to the request for your user name.
# Set this to empty if you are using PAP or CHAP.
USER_NAME="<username>"
# The chat sequence to recongnize that the remote system
# is asking for your password.
PASSWD_CHAT_SEQ="ssword:"
# The string to send in response to the request for your password.
PASSWORD="<password>"
# The prompt the remote system will give once you are logged in
# If you do not define this then the script will assume that
# there is no command to be issued to start up the remote protocol.
PROMPT=""
# The command to issue to start up the remote protocol
PROTOCOL_START="ppp"
# The string to wait for to see that the protocol on the remote
# end started OK. If this is empty then no check will be performed.
START_ACK=""
# Pass a message on to diald and the system logs.
function message () {
[ $FIFO ] && echo "message $*" >$FIFO
logger -p local2.info -t connect "$*"
message "Initializing Modem"
chat TIMEOUT 5 "" $MODEM_INIT TIMEOUT 45 OK ""
if [ $? != 0 ]; then
message "Failed to initialize modem"
exit 1
fi
# Dial the remote system.
chat -v -r /var/log/diald.connect \
REPORT CONNECT \
TIMEOUT 45 \
ABORT "NO CARRIER" \
ABORT BUSY \
ABORT "NO DIALTONE" \
ABORT ERROR \
"" ATDT$PHONE_NUMBER \
CONNECT ""
case $? in
0) message "$(cat /var/log/diald.connect)";;
1) message "Chat Error"; exit 1;;
2) message "Chat Script Error"; exit 1;;
3) message "Chat Timeout"; exit 1;;
4) message "No Carrier"; exit 1;;
5) message "Busy"; exit 1;;
6) message "No DialTone"; exit 1;;
7) message "Modem Error"; exit 1;;
*)
esac
# We're connected try to log in.
if [ $USER_NAME ]; then
message "Logging in"
chat \
TIMEOUT 5 \
$USER_CHAT_SEQ \\q$USER_NAME \
TIMEOUT 45 \
$PASSWD_CHAT_SEQ $PASSWORD
if [ $? != 0 ]; then
message "Failed to log in"
exit 1
fi
fi
# We logged in, try to start up the protocol (provided that the
# user has specified how to do this)
if [ $PROMPT ]; then
message "Starting Comm Protocol"
chat TIMEOUT 15 $PROMPT $PROTOCOL_START
if [ $? != 0 ]; then
message "Prompt not received"
exit 1
fi
fi
if [ $START_ACK ]; ...
read more »