Multiple dial-ups with pppd

Multiple dial-ups with pppd

Post by Robert Pearc » Sun, 22 Oct 2000 04:00:00



I currently have a Linux box set up to act as a gateway to the Internet,
with pppd configured for demand dialling to Demon. I also have a
Freeserve account, which expires every couple of months unless I dial in
to them. What I would like to do is set up a weekly dial-up to
Freeserve.

So my questions are :

  Can I dial Freeserve without having to take the demand dial Demon
connection down first? I was thinking perhaps set up chat-ppp1 and
ifcfg-ppp1 for Freeserve, not demand dial just a straight connection,
then use a cron job to do "ifup ppp1". Would this work when ppp0 is
already up but not connected ?

  If this works, what is the best way to prevent my ip-up.local from
trying to fetch news off Demon when connected to Freeserve ?

  On a slightly related topic, now that Demon have SurfTime enabled, is
it possible to persuade pppd to dial a different number off-peak than
on-peak ?
--
Rob Pearce

The "from" must be wrong, nothing that helpful ever comes from the TAN team!

 
 
 

Multiple dial-ups with pppd

Post by Clifford Kit » Sun, 22 Oct 2000 04:00:00



> I currently have a Linux box set up to act as a gateway to the
> Internet, with pppd configured for demand dialling to Demon. I
> also have a Freeserve account, which expires every couple of months
> unless I dial in to them. What I would like to do is set up a weekly
> dial-up to Freeserve.
> So my questions are :
> Can I dial Freeserve without having to take the demand dial Demon
> connection down first? I was thinking perhaps set up chat-ppp1 and
> ifcfg-ppp1 for Freeserve, not demand dial just a straight connection,
> then use a cron job to do "ifup ppp1". Would this work when ppp0
> is already up but not connected ?

Only if just dialing into Freeserve and negotiating a PPP connection is
enough to keep the account from expiring.  The demand dialing default
route that's already present on your box would keep you from doing
anything beyond pinging the Freeserve peer.  As far as the Freeserve
connection is concerned that default route is bogus.  You only need
to keep all the pppd and chat options for Freeserve separate from
the demand dial options.

If you actually wanted to *use* Freeserve then the easiest thing to
do would be to kill -TERM the demand pppd instance, dial Freeserve,
and when you finish with Freeserve, restart it.

Quote:> If this works, what is the best way to prevent my ip-up.local from
> trying to fetch news off Demon when connected to Freeserve ?

You should be able to use the pppd ipparam option to distinguish
between demand and Freeserve and script ip-up.local appropriately.
Read man pppd for what ipparam buys you.

Quote:> On a slightly related topic, now that Demon have SurfTime enabled,
> is it possible to persuade pppd to dial a different number off-peak
> than on-peak ?

No, there's no pppd or chat option to do that.

--

/* Better is the enemy of good enough. */

 
 
 

Multiple dial-ups with pppd

Post by Re-Animato » Sun, 22 Oct 2000 04:00:00


A fairly simple thing would be to set up seperate pppd configs and use cron
to overwrite the 'proper' config file when going to off-peak. When standard
rate starts again use a cron timer to overwrite the config file with your
standard options.

You could also use cron to switch your various config files (pppd, ip
gateway, etc) from Demon to Freeserve each week. Dial up freeserve, do some
stuff, log out and reset the config. files back to their defaults.

I realise that it sounds like loads of script authoring but you don't have
to make them clever.........

> > On a slightly related topic, now that Demon have SurfTime enabled,
> > is it possible to persuade pppd to dial a different number off-peak
> > than on-peak ?

> No, there's no pppd or chat option to do that.

> --

> /* Better is the enemy of good enough. */

 
 
 

Multiple dial-ups with pppd

Post by Robert Pearc » Sun, 22 Oct 2000 04:00:00




Quote:>A fairly simple thing would be

Thanks Adrian, I'll try that later.

Thanks Clifford too. I gave it a try setting up ifcfg-ppp1 and chat-ppp1
for Freeserve. I found that while ppp1 is up I get two default routes
(hardly surprising really, as that's what the configs say!) and actually
can access the Internet via Freeserve. However, /var/log/messages gets a
lot of "/dev/modem is in use" errors appearing when I do so.
--
Rob Pearce

The "from" must be wrong, nothing that helpful ever comes from the TAN team!

 
 
 

Multiple dial-ups with pppd

Post by Clifford Kit » Sun, 22 Oct 2000 04:00:00



> Thanks Clifford too. I gave it a try setting up ifcfg-ppp1 and chat-ppp1
> for Freeserve. I found that while ppp1 is up I get two default routes
> (hardly surprising really, as that's what the configs say!) and actually

Actually it's a surprise to me.  The standard track pppd alone won't
set a default route when there already exists a default route, even with
the defaultroute option.  Something outside of pppd is setting a second
default route, perhaps in /etc/ppp/ip-up.

Quote:> can access the Internet via Freeserve. However, /var/log/messages gets a

Yes, only the last default route created is the active one.

Quote:> lot of "/dev/modem is in use" errors appearing when I do so.

Dunno about this, except to guess that you don't use the pppd "lock"
option.

--

/* Need to post debug logs under a MS OS?  Change the *nix EOL to
   MSDOS EOL with "sed s/\$/^M/g logfile > foo", where ^M is a CR
   created with control-v control-m.  Copy foo to a DOS formatted
   floppy, read it under MS. */

 
 
 

Multiple dial-ups with pppd

Post by Robert Pearc » Mon, 23 Oct 2000 04:00:00





>> Thanks Clifford too. I gave it a try setting up ifcfg-ppp1 and chat-ppp1
>> for Freeserve. I found that while ppp1 is up I get two default routes
>> (hardly surprising really, as that's what the configs say!) and actually

>Actually it's a surprise to me.  The standard track pppd alone won't
>set a default route when there already exists a default route, even with
>the defaultroute option.  Something outside of pppd is setting a second
>default route, perhaps in /etc/ppp/ip-up.

Not that I can see. There are no route commands in ip-up or ip-up.local
but both ifcfg-pppx files have DEFROUTE=yes.

Quote:>> can access the Internet via Freeserve. However, /var/log/messages gets a

>Yes, only the last default route created is the active one.

Well that would seem logical. The Freeserve one, which was last to be
established, appears first in the route list.

Quote:>> lot of "/dev/modem is in use" errors appearing when I do so.

>Dunno about this, except to guess that you don't use the pppd "lock"
>option.

The /etc/sysconfig/network-scripts/ifup-ppp script _always_ includes
"lock" as the first option.
--
Rob Pearce

The "from" must be wrong, nothing that helpful ever comes from the TAN team!

 
 
 

Multiple dial-ups with pppd

Post by Clifford Kit » Tue, 24 Oct 2000 04:00:00




>>Actually it's a surprise to me.  The standard track pppd alone won't
>>set a default route when there already exists a default route, even with
>>the defaultroute option.  Something outside of pppd is setting a second
>>default route, perhaps in /etc/ppp/ip-up.

> Not that I can see. There are no route commands in ip-up or ip-up.local
> but both ifcfg-pppx files have DEFROUTE=yes.

The standard track pppd doesn't set a second default route.  Something
in the scripts that launch pppd must be doing it if there's nothing
in /etc/ppp/ip-ip, or, perhaps, the pppd is modified off the standard
track.  This sounds like Red Hat, which has it's own ways.

Quote:>>> can access the Internet via Freeserve. However, /var/log/messages gets a

>>Yes, only the last default route created is the active one.

> Well that would seem logical. The Freeserve one, which was last to be
> established, appears first in the route list.
>>> lot of "/dev/modem is in use" errors appearing when I do so.

>>Dunno about this, except to guess that you don't use the pppd "lock"
>>option.

> The /etc/sysconfig/network-scripts/ifup-ppp script _always_ includes
> "lock" as the first option.

I suppose something else could be using the serial port, or it's IRQ,
and that *might* make the modem look busy.  The "lock" should prevent
the serial port from being used directly by anything that respected
the lock though.

--

/* The wealth of a nation is created by the productive labor of its
 * citizens. */

 
 
 

Multiple dial-ups with pppd

Post by Robert Pearc » Mon, 30 Oct 2000 05:44:22






>>>Actually it's a surprise to me.  The standard track pppd alone won't
>>>set a default route when there already exists a default route, even with
>>>the defaultroute option.  Something outside of pppd is setting a second
>>>default route, perhaps in /etc/ppp/ip-up.

>> Not that I can see. There are no route commands in ip-up or ip-up.local
>> but both ifcfg-pppx files have DEFROUTE=yes.

>The standard track pppd doesn't set a second default route.  Something
>in the scripts that launch pppd must be doing it if there's nothing
>in /etc/ppp/ip-ip, or, perhaps, the pppd is modified off the standard
>track.  This sounds like Red Hat, which has it's own ways.

Well, it now seems that you're right. I haven't changed anything since
that first test, but when I brought up the Freeserve ppp today I didn't
get a route. Weird!

--
Rob Pearce

The "from" must be wrong, nothing that helpful ever comes from the TAN team!

 
 
 

1. 2.3 -> 2.7 via Dial-up (Re: CVS over 'dropping' dial-ups)

You are better off borrowing/buying/stealing a CD and loading a fresh 2.7
install.
From what I've heard, there are issues with upgrading via CVS.  Plus, it's
_SLOW_.
Trust me. If you don't have the cash (US $30, I believe) you could probably
ask
somebody to copy their 2.7 CD for you (hint,hint).  Of course, buying the CD
makes
OBSD 2.8 and higher a possibility, which is a Good Thing.

Good luck.

2. Changing Shells

3. Unix based dial-ups

4. Parralel to SCSI driver ?

5. UNIX Dial-ups

6. ttyp0 and ttyp1 taken from me.

7. Dial-ups not Traveling

8. moving boot disk to a different IDE location

9. DIP and Two Dial-ups

10. dial-ups: puzzling results

11. Squid & undesired dial-ups

12. Shape Ups,Men's Shape Ups,Men's Skechers Shape Ups - new styles!

13. pppd demand; dialing and dialing