This is a discussion on Well I managed to connect to the internet! within the Linux Networking forums, part of the Linux Forums category; Many thanks, I managed to connect to the internet using a pppd line like this: /usr/sbin/pppd /dev/ttyS1 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Many thanks, I managed to connect to the internet using a pppd line
like this: /usr/sbin/pppd /dev/ttyS1 115200 debug user dwlee connect "/usr/sbin/chat -v '' ATDT5472107 CONNECT''" The only problem is that it does not set the default route automatically, so I have to enter this line to make the internet scautly work: route add default ppp0 That does not bother me too much, but I want it to do it automatically. Thanks for all your help! Iguanaman |
|
|||
|
On Fri, 09 Jan 2004 23:40:42 -0500, Iguanaman <iggyman25@hotmail.com> wrote:
> > > Many thanks, I managed to connect to the internet using a pppd line > like this: > /usr/sbin/pppd /dev/ttyS1 115200 debug user dwlee connect > "/usr/sbin/chat -v '' ATDT5472107 CONNECT''" > > The only problem is that it does not set the default route > automatically, so I have to enter this line to make the internet > scautly work: > > route add default ppp0 > > That does not bother me too much, but I want it to do it > automatically. Thanks for all your help! > > Iguanaman Good work! Why don't you just put all that in a script? #!/bin/sh /usr/sbin..... while true do; if /sbin/ifconfig | grep 'ppp0' &> /dev/null ; then # check and see if your ppp interface is up, and if it is: route add...... exit 0 else continue; fi; done # if it isn't, check again until it is (may need some tweaking, but I use one almost identical to it for the same purpose) Call it ppu (or my_nifty_internet_connection_script :-), run chmod +rx on it and put it in /usr/local/bin. Then you can just enter ppu at the prompt and it's done. $type ppu will tell you whether the string is taken for a function, script, application, variable or alias... AC |
|
|||
|
In comp.os.linux.misc Alan Connor <zzzzzz@xxx.yyy> wrote:
> On Fri, 09 Jan 2004 23:40:42 -0500, Iguanaman <iggyman25@hotmail.com> wrote: > > > > Many thanks, I managed to connect to the internet using a pppd line > > like this: > > /usr/sbin/pppd /dev/ttyS1 115200 debug user dwlee connect > > "/usr/sbin/chat -v '' ATDT5472107 CONNECT''" > > > > The only problem is that it does not set the default route > > automatically, so I have to enter this line to make the internet > > scautly work: > > > > route add default ppp0 [..] > Why don't you just put all that in a script? While this should of course work, why not just read the fine manual 'man pppd' and add 'defaultroute' to your options file? -- Michael Heiming Remove +SIGNS and www. if you expect an answer, sorry for inconvenience, but I get tons of SPAM |
|
|||
|
On Sat, 10 Jan 2004 10:24:53 +0100, Michael Heiming <michael+USENET@www.heiming.de> wrote:
> > > In comp.os.linux.misc Alan Connor <zzzzzz@xxx.yyy> wrote: >> On Fri, 09 Jan 2004 23:40:42 -0500, Iguanaman <iggyman25@hotmail.com> wrote: >> > >> > Many thanks, I managed to connect to the internet using a pppd line >> > like this: >> > /usr/sbin/pppd /dev/ttyS1 115200 debug user dwlee connect >> > "/usr/sbin/chat -v '' ATDT5472107 CONNECT''" >> > >> > The only problem is that it does not set the default route >> > automatically, so I have to enter this line to make the internet >> > scautly work: >> > >> > route add default ppp0 > [..] > >> Why don't you just put all that in a script? > > While this should of course work, why not just read the fine > manual 'man pppd' and add 'defaultroute' to your options file? > Certainly a better idea, Michael. AC |
|
|||
|
Michael Heiming wrote:
> In comp.os.linux.misc Alan Connor <zzzzzz@xxx.yyy> wrote: >> On Fri, 09 Jan 2004 23:40:42 -0500, Iguanaman <iggyman25@hotmail.com> >> wrote: >> > >> > Many thanks, I managed to connect to the internet using a pppd line >> > like this: >> > /usr/sbin/pppd /dev/ttyS1 115200 debug user dwlee connect >> > "/usr/sbin/chat -v '' ATDT5472107 CONNECT''" >> > >> > The only problem is that it does not set the default route >> > automatically, so I have to enter this line to make the internet >> > scautly work: >> > >> > route add default ppp0 > [..] > >> Why don't you just put all that in a script? > > While this should of course work, why not just read the fine > manual 'man pppd' and add 'defaultroute' to your options file? > That would clearly be too easy, and besides this gives him an excuse to write another script :P |
|
|||
|
On Friday, in article
<r20vvv0p6fs039d06ubk2ttiucl94aurhf@4ax.com> iggyman25@hotmail.com "Iguanaman" wrote: > Many thanks, I managed to connect to the internet using a pppd line > like this: > /usr/sbin/pppd /dev/ttyS1 115200 debug user dwlee connect > "/usr/sbin/chat -v '' ATDT5472107 CONNECT''" > The only problem is that it does not set the default route > automatically, so I have to enter this line to make the internet > scautly work: > route add default ppp0 If you use the keyword "defaultroute" pppd will assume the default route if one doesn't already exist. (If one does, you will still have to manually add the ppp route, and optionally delete the original.) -- Raj Rijhwani | This is the voice of the Mysterons... raj@rijhwani.org | ... We know that you can hear us Earthmen http://www.rijhwani.org/raj/ | "Lieutenant Green: Launch all Angels!" |
|
|||
|
Iguanaman <iggyman25@hotmail.com> writes:
]Many thanks, I managed to connect to the internet using a pppd line ]like this: ]/usr/sbin/pppd /dev/ttyS1 115200 debug user dwlee connect ]"/usr/sbin/chat -v '' ATDT5472107 CONNECT''" ]The only problem is that it does not set the default route ]automatically, so I have to enter this line to make the internet ]scautly work: a) make sure that there is no default route when ppp starts up. Most distros set up a default route on any ethernet card on the system. Eitehr remove it (eg put route del default at the end of rc.local) or set up the ethernet so that the default route is not set up. b) make sure you have defaultroute in /etc/ppp/options. |