fred smith wrote:

> How do I have diald manage two different links, one to my ISP and one
> to my office? When it is trying to manage the link to my ISP I can't
> even manually bring up a PPP connection to the office without first
> killing diald.
>
> There's gotta be a way but it doesn't jump out at me from a couple of
> (re-)reads of the docs.
>

Fred,

You could echo block > /your config dir/diald.ctl prior to bringing up your office
link.  This works for me when I use kppp to bring up my work link, echo unblock >
/your config dir/diald.ctl when you are done.  But read on.

I've had limited success doing this by running diald twice with different config
files.  Both config files are in the /etc/diald not /etc.  My ISP script is the
primary,  the intent of the other is to key off a specific IP address.  The trick
is to not run the second config with the default route option, but to add the
default route with the 'addroute' config option.  This is the config file I'm using
for the secondary (work) dialup:

#
# diald.conf for anathoth
#
# Select the demand dial rules you want
# Bring the link up for anything, timeout in seconds. Use this for
# when the dompute has its own phone line
accept any 300 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/ttyS1
speed 38400
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 11.0.0.1
remote 11.0.0.2
pppd-options asyncmap 0 user chiodr remotename kuda
modem
crtscts
connect "/usr/sbin/chat -f /etc/ppp/kudachat"
redial-timeout 10
fifo /etc/diald/kuda.ctl
ip-up /etc/diald/ipup.kuda
addroute /etc/diald/add.kuda.route
# restrict 9:00:00 17:45:00 1 * *
# or-restrict 9:00:00 17:45:00 2 * *
# or-restrict 9:00:00 17:45:00 3 * *
# or-restrict 9:00:00 17:45:00 4 * *
# or-restrict 9:00:00 17:45:00 5 * *
# up

This is the ipup.kuda script:

#! /bin/bash
/sbin/route add default dev $1

This is the add.kuda.route script:

#! /bin/bash
/sbin/route add -net xxx.yyy.0.0 netmask 255.255.0.0 dev $1

Use your work IP subnet and net mask above.

This has not been 100% successful, but it seems to work most of the time.  I think
my problems are related to DNS lookups.  None of the name servers in my resolv.conf
point to the xxx.yyy.0.0 subnet.  All accesses to bring up the work link must be by
IP address not domain name.  After the link is up domain names are okay.

What is supposed to happen:

>From the documentation, the addroute script runs when diald is invoked, and the
ip-up script runs when the connection is established.  The local and remote IP
addresses are different than those used by the primary script (for my ISP).

Running diald twice requires two tap devices, tap0 and tap1.  See the ethertap
notes in the diald distribution.

Bob Chiodini


-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]

Reply via email to