Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!newsfeed.internetmci.com!news.mci.com!news-w.ans.net!newsfeeds.ans.net!lantana.singnet.com.sg!usenet From: light@singnet.com.sg (Jason Tseng) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Tips : Dynamic PPP On-Demand Setup Date: Wed, 11 Dec 1996 06:21:55 GMT Organization: Singapore Telecom Internet Service Lines: 88 Message-ID: <58jrqe$vks@lantana.singnet.com.sg> NNTP-Posting-Host: ts900-4005.singnet.com.sg X-Newsreader: Forte Free Agent 1.0.82 This is IN ADDITION to my earlier posting : "Tips : Dynamic PPP Setup" Just got ppp on-demand to work. Patience is all that is really needed. Here are the additional steps: 1) My new ppp.conf (where xxxxx is the ISP a/c name, yyyyy is the ISP password, zzzz is the ISP phone number) default: set device /dev/cuaa1 set speed 115200 set redial 1 10 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0M0W2 OK-AT-OK \\dATDTzzzzz\\T TIMEOUT 25 CONNECT" set login "TIMEOUT 5 name-\\r-name xxxxx word yyyyy " set timeout 1200 set ifaddr 192.168.0.0/0 165.21.1.10/0 netmask 0xffffff00 set openmode active delete ALL add 0 0 HISADDR ondemand: set device /dev/cuaa1 set speed 115200 set redial 1 10 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0M0W2 OK-AT-OK \\dATDTzzzzz\\T TIMEOUT 25 CONNECT" set login "TIMEOUT 5 name-\\r-name xxxxx word yyyyy " set timeout 60 set ifaddr 192.168.0.0/0 165.21.1.10/0 netmask 0xffffff00 set openmode active delete ALL add 0 0 HISADDR * IMPORTANT (For "ondemand"): - You need to set dummy addresses so that you can start the ppp in auto mode. Importantly, for the "set ifaddr" line, make sure it is in this format "set ifaddr x.x.x.x/0 y.y.y.y/0" where x.x.x.x is your localhost address (eg 127.0.0....), also found in the hosts file. The y.y.y.y is the destination address, you can use any dummy addresses here. Just be consistent throughout (later on...). - Make sure "delete all" and "add 0 0 HISADDR" are added as well - The reason why I wanted a new label for the ppp on-demand is just so that I can adjust the timeout setting when on-demand. - Setting the timeout to 60 is a safe bet (See note later on) * Starting ppp on-demand 1) Initialize the tun0 device to some dummy addresses by typing: "ifconfig tun0 inet x.x.x.x y.y.y.y" at the shell prompt, where x.x.x.x is your localhost address and y.y.y.y is some other dummy address. eg. $ ifconfig tun0 inet 192.168.0.0 192.168.0.1 * where 192.168.0.0 is my local host address. This address IS IMPORTANT and must be the same as the one found in the hosts file. * 192.168.0.1 is just a dummy address 2) Start up the ppp program by typing "ppp -auto xxxxx" where xxxxx is a valid label in ppp.conf. eg $ ppp -auto ondemand 3) ppp daemon is now running. you can start to use your internet applications * IMPORTANT: - Patience... be prepared to wait between 20-30secs after trying to access an address (eg ping etc), before any modem activity starts up. - About the timeout value in ppp.conf. I noticed that the system will logon to the ISP even when I do nothing to access any net addresses.While it is connected, I have yet to test the timeout value to see if it will disconnect after the certain period of time, or stay online indefinitely. You can also try putting the ppp on-demand startup in a script file or put the ifconfig settings for tun0 in the sysconfig instead. But I havent tried the latter. Bye now.