D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Re: Dial on Demand



On Friday 21 September 2001  9:01 am, you wrote:
> It should be a matter or adding something like "demand idle 300" or just
> "idle 300" to the ppp command line.

I had to add :<remote-IP> ipcp_accept_remote, according to man pppd on 
Mandrake 7.2. I just took one of the remote IP's listed on running the script 
and put that in place of <remote-IP>. Doesn't seem to make any difference as 
I get assigned an IP from a pool anyway, both for ppp0 local and ppp0 remote. 
I don't think it worked without the 2 IP options. (Maybe that was something 
else that caused it to fail though). I suppose the stated IP could be almost 
anything as long as it wasn't a local one like 127.0.x.x or 192.168.x.x etc.

I then created a file called internet in /etc/cron.daily containing just 
/etc/ppp/<myinternetfile> and set chmod to 755, chown to root.root

Now it dials only when programs request internet access.
(and drops the line after 5 minutes of inactivity.)

/etc/ppp/myinternetfile
exec pppd connect 'chat -v -f /etc/ppp/mychatscript' -detach crtscts \
defaultroute user my.user.name /dev/ttyS0 115200 modem idle 300 demand \
:62.64.xxx.xxx ipcp-accept-remote

(real IP instead of the xxx)

/etc/ppp/mychatscript
ABOT BUSY ABORT 'NO CARRIER' ''
ATZ OK
ATM0L0 OK
"ATDT myISPnumber"
TIMEOUT 120
CONNECT ''
'' my.user.name
'' my.pass.word

-- 

Neil Williams
#-#-#-#-#-#-#-#-#
linux@xxxxxxxxxxxxxx
neil@xxxxxxxxxxxxxx
neil@xxxxxxxxxxxx
www.codehelp.co.uk

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly