ppp0 and ppp1 keep switching around centos

andycol

Member
Joined
Nov 18, 2009
Messages
11
Reaction score
0
Hi Guys

I hope someone can help me

my problem is i have setup 2x ppp used for adsl to split local and international bandwidth
ppp0 is using the international account
and ppp1 is using the local only account
this all works fine but every so often i notice when i do an ifconfig that ppp0 is dialed up on the local account and ppp1 is dialed up on the international one, and sometimes a reboot fixes it and sometimes it doesnt

does anyone have any ideas?

my config files are the following:

# Default ADSL network config file, as used by redhat
USERCTL=yes
PEERDNS=no
TYPE=xDSL
DEVICE=ppp0
BOOTPROTO=dialup
ONBOOT=yes
PIDFILE=/var/run/pppoe-adsl0.pid
FIREWALL=NONE
PING=.
PPPOE_TIMEOUT=80
LCP_FAILURE=3
LCP_INTERVAL=20
CLAMPMSS=1412
CONNECT_POLL=6
CONNECT_TIMEOUT=0
PERSIST=no
SYNCHRONOUS=no
DEFROUTE=yes
PROVIDER=provider
ETH=eth1
DEMAND=no
USER='[email protected]' (international account)

# Default ADSL network config file, as used by redhat
USERCTL=yes
PEERDNS=no
TYPE=xDSL
DEVICE=ppp1
BOOTPROTO=dialup
ONBOOT=yes
PIDFILE=/var/run/pppoe-adsl1.pid
FIREWALL=NONE
PING=.
PPPOE_TIMEOUT=80
LCP_FAILURE=3
LCP_INTERVAL=20
CLAMPMSS=1412
CONNECT_POLL=6
CONNECT_TIMEOUT=0
PERSIST=no
SYNCHRONOUS=no
DEFROUTE=no
PROVIDER=provider
ETH=eth1
DEMAND=no
USER='[email protected]' (local account)

anyone have any ideas?

thanks
 
There is an option to set which device it must use. I've modified my scripts so that the correct account always has the same device number.
I just can't remember what it is offhand.

Try 'man pppd'. I'll see if I can get in to my machine remotely to take a look for you.

Ahh, found it. There's a command line option called 'unit', so you would specify "/usr/sbin/pppd [options go here] unit 1" for ppp1 or "unit 2" for ppp2.
 
Last edited:
thanks for the reply
i get garbled stuff in that file

were do i put those options?
and what would ppp0 be?
 
I'm afraid I don't know CentOS very well. This might be a bit advanced for you, but you'd need to find the ppp-up script, or whatever the equivalent is that brings up ppp on your system, and modify it accordingly.

I note that your configs have the option 'DEVICE=pppx', but it looks like that isn't necessarily doing the trick
Personally, I would go about editing your config files as above, and adding an item UNIT=x where the 'x' would match the number for 'DEVICE=pppx'.

Then I'd edit the ppp-up script, and add in 'unit ${UNIT}' at the appropriate place where it calls pppd.

Like I said above, I'm not sure if that approach would be entirely appropriate for your system, but it's where I would begin looking.

Mayhap one of the other *nix gurus will have a better answer.
 
Thanks for pointing out the unit option as I have been burned by downloading, accidentally, with my int account (which had automatic topup enabled) instead of my local account through the pppX numbers switching around causing me to setup the ip rules and routes incorrectly.

In my config for each adsl connection (eg. /etc/peers/is-local) I just added "unit X", X being the pppX number I wanted for the connection. So far it seems to adhere to this setting nicely.
 
Last edited:
This happens when the authentication process for ppp1 takes shorter than ppp0 (assuming int is 0 and local is 1). Your edit should lock things in place.
 
In my config for each adsl connection (eg. /etc/peers/is-local) I just added "unit X", X being the pppX number I wanted for the connection. So far it seems to adhere to this setting nicely

My settings are /etc/sysconfig/network-scripts/ifcfg-pppX
do i just add UNIT=0 for ppp0
and UNIT=1 for ppp1?

Ta
 
Without the equals sign, so "unit 0" for ppp0 and "unit 1" for ppp1. Just add it to your connection config.
 
Top
Sign up to the MyBroadband newsletter
X