Thank you for your help. You pointed me in the right direction.
I had several people ask if I found the answer to reply to them. The
answer is as follows:
There are several files involved. The following probably could
be cleaned up a bit, but it works, and I am tired (I've spent 3 days on
this) so I'll clean it up later. Each file name is <bracketed>
</etc/rc.d/rc.local>
rc.diald
</etc/rc.d/rc.diald>
# Internet access provider. Default route
/etc/ppp/mindspring.diald
# Special network connection. Only packets targeted for
12.0.0.0/8 should go here
/etc/ppp/att.diald
# this piece is � the magic that gets the 12.0.0.0/8 to go to
AT&T
/etc/ppp/att.downroute
</etc/ppp/mindspring.diald>
diald -f /etc/ppp/mindspring.diald.conf
</etc/ppp/mindspring.diald.conf>
connect /usr/lib/diald/mindspring.chatscript
device /dev/ttyS0
local 192.168.0.1
remote 192.168.0.2
defaultroute
# the next four lines stop the 12.0.0.0/8 from going out the
default route
ignore tcp tcp.dest&255.0.0.0=12.0.0.0
ignore udp udp.dest&255.0.0.0=12.0.0.0
ignore tcp ip.daddr&255.0.0.0=12.0.0.0
ignore tcp icmp.dest&255.0.0.0=12.0.0.0
# you get this file with diald
include /usr/lib/diald/standard.filter
</etc/usr/lib/diald/mindspring.chatscript>
!/bin/sh
# The following is modified from the sample chatscript provided
with diald
# Configuration parameters
# The initialization string for your modem
MODEM_INIT="ATZ&C1&D2%C0"
# The phone number to dial
PHONE_NUMBER="4043350600"
# The chat sequence to recognize that the remote system
# is asking for your user name.
USER_CHAT_SEQ="ogin:"
# The string to send in response to the request for your user
name.
USER_NAME="LogonName"
# The chat sequence to recongnize that the remote system
# is asking for your password.
PASSWD_CHAT_SEQ="word:"
# The string to send in response to the request for your
password.
PASSWORD="Password"
# 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="Switching to PPP."
# Pass a message on to diald and the system logs.
function message () {
[ $FIFO ] && echo "message $*" >$FIFO
logger -p local2.info -t connect "$*"
}
# Initialize the modem. Usually this just resets it.
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.
message "Dialing system"
chat \
TIMEOUT 45 \
ABORT "NO CARRIER" \
ABORT BUSY \
ABORT "NO DIALTONE" \
ABORT ERROR \
"" ATDT$PHONE_NUMBER \
CONNECT ""
case $? in
0) message Connected;;
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.
message "Loggin 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
# 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 ]; then
chat TIMEOUT 15 $START_ACK ""
if [ $? != 0 ]; then
message "Failed to start Protocol"
exit 1
fi
fi
# Success!
message "Protocol started"
</etc/ppp/att.diald>
diald -f /etc/ppp/att.diald.conf
</etc/ppp/att.diald.conf>
connect /usr/lib/diald/att.chatscript
device /dev/ttyS1
local 192.168.0.3
remote 192.168.0.4
# here is the rest of the magic that makes this works!
ip-down /etc/ppp/att.downroute
addroute /etc/ppp/att.uproute
#Notice that there is no 'defaultroute' in this file!
include /usr/lib/diald/standard.filter
</usr/lib/diald/att.chatscript>
(This is the same as </usr/lib/diald/mindspring.chatscript>
except modified for this service provider)
</etc/ppp/att.downroute>
# this gets the packets to bounce off diald and get it to dial
the modem
/sbin/route add -net 12.0.0.0 netmask 255.0.0.0 gw 192.168.0.4
</etc/ppp/att.uproute>
# this gets the packets for 12.0.0.0 to go to the correct modem
!/bin/sh
/sbin/route add -net 12.0.0.0 netmask 255.0.0.0 gw $4 window
2048 metric $5 dev $1
Note that I used one modem for one service provider and a second
for the second service provider. I would like to be able to set it up
so that either modem will dial either service provider. This would be
useful one of the modems failed.
On Sun, 20 Sep 1998, Deling, Charles wrote:
> I can not figgure out how to set up diald to dial the second
number when
> someone wants to access the 12.0.0.0 network.
I tried this a few years ago. If I recall correctly, the idea
is to run
two different diald with different configuration files.
Ed
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]