On Thu, 16 Oct 2003, David Tredinnick wrote:
> Grant Parnell said:
>
> > I've often been frustrated when dealing with multiple ppp interfaces
> > knowing which is which and have decided to investigate. The following
> > applies to RedHat systems but probably can be adapted to others easily
> > enough.
> >
> > The DEVNAME in the /etc/sysconfig/network-scripts/ifcfg-ppp0 file is the
> > key.
> >
> > ...snip...
> >
> > Of course if somebody could explain to me why you can't specify the actual
> > interface name such that you can arbitrarily bring up a single interface
> > 'ppp9' for example with /sbin/ifup ppp9 I'd love to know.
>
> A solution I found the other day for a similar problem (trying to get ifup
> to work for different ISP accounts but all using
> the same modem), was to copy ifcfg-ppp0 to ifcfg-ppp1 and change the
> reference in the file from ppp0 to ppp1. In my case I also changed the
> section name for WVDIAL so it would use a different phone
> number/name/password combination.
>
> After doing this, I could then do /sbin/ifup ppp0 or /sbin/ifup ppp1.
> /sbin/ifdown ppp1 works too. The only thing that confused me a little was
> when ppp1 was up, ifconfig still should ppp0.
That last paragraph is the problem I'm talking about. I'm not sure you get
it so lets say you wanted to know from an independent script which ISP you
were currently dialed up to. It would be nice to be able to do...
ISP0=`ifconfig | grep ppp0`
ISP1=`ifconfig | grep ppp1`
if [ ! -z $ISP0 ]; then
echo "We're online to ISP 0"
fi
if [ ! -z $ISP1 ]; then
echo "We're online to ISP 1"
fi
With ppp-2.4.1 you cannot to this. With ppp-2.4.2b3 you could add to your
ifcfg-ppp1 file PPPOPTIONS="unit 1"
I don't know what happens if there is a ppp1 device already up
incidentaly, anyone tried that?
--
---<GRiP>---
Electronic Hobyist, Former Arcadia BBS nut, Occasonal nudist,
Linux Guru, SLUG/AUUG/Linux Australia member, Sydney Flashmobber,
BMX rider, Walker, Raver & rave music lover, Big kid that refuses
grow up. I'd make a good family pet, take me home today!
Do people actually read these things?
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug