| Is it possible to automatically decide which ISP to call?
| I have a computer on a local network (192.168.5.0), and with
| an ISDN adapter to access the rest of the world.
| When I try to access a computer in the network x.y.z.0, I
| would like to call a specific telephone number (ISP A).
| When I try to access a computer on all other networks,
| I would like to call a different telephone number (ISP B).
| Is it a way to set up Linux networking to do this?
I haven't tried this, but I think I see a way. You will have to start a
copy of pppd which supports demand dialing (and have the patched kernel,
etc). Use the demand option, with a short idle out, like 'idle 120' to
keep from tying up the line. Don't use defaultroute, and call the "one
network only" ISP.
After it starts, use route to add the network you want to go over pp0,
like 'route add 192.168.33.0 netmask 255.255.255.0 ppp0'
Now start a second copy of pppd, using defaultroute, to ISP B. Same
idea, start it up.
In theory, if you initiate a packet to 192.168.33.nn it will go via
ppp0, the first process will demand dial, the connection will work,
locking will prevent connection to ppp1, and all will be well. Same
thing for other networks, the packets will go via ppp1, ISP B will be
Unless you have two modems I don't suggest trying to use both
connections at once. However, you should get clean timeouts, network is
unreachable, stuff like that. One pppd *may* die, although I don't think
Well, let us know if you try this.
"Anything worth doing is worth doing to excess."
-- Fat John (R.I.P.)