I have a linux box with a bank of modems and need to create demand-dial (outbound) PPP connections to a very large set of remote machines. Since I have far more remotes than local modems, I'd like to launch one or more instances of pppd
in demand
mode, but not allocate a particular modem until a connection is requested. When the connection becomes idle, I'd like pppd
to release the modem so it can be used for a connection to a different remote.
I've been through the pppd man
pages and understand the concepts of the call
and connect
options, as well as the options.DEVICE
files and the /etc/ppp/peers
directory. Lock files will tell me which modems are in use or available. And I'm able to connect to multiple remote peers as long as I hard-code the modem assignments. But I haven't found a way to assign them dynamically, say by calling a get_available_modem
script when pppd
needs to dial. Google doesn't seem to know, either.
A work-around might be to detect the need to demand-dial with an external mechanism, and then launch pppd
to service it, but it seems cleaner to leverage the facility within pppd
itself.
Any pointers or ideas are appreciated. Thanks for your thoughts!