Subject: resetting a pppoe connection?
To: None <>
From: Carl Brewer <>
List: netbsd-users
Date: 02/07/2005 10:49:35

I've got a pppoe link running with a local wireless
network provider that's been a bit unstable of late,
and I'm trying to work out if the way I have it set up
is the 'right way', and also how to reset if without
a reboot if it gets upset.

NetBSD 1.6.1 (yes, I know, a bit old .... it'll get rebuilt
soon though) on x86.

I have the following :

/etc/ifconfig.pppoe0 :

! /sbin/ifconfig sip3 up
! /sbin/pppoectl -e sip3 $int
! /sbin/pppoectl $int myauthproto=pap '' 
'myauthsecret=XXXXXXX' hisauthproto=none up

When it's all running, it looks good :

plug: {6} ifconfig pppoe0
         inet a.b.c.d -> netmask 0xff000000
         inet6 fe80::209:5bff:fe1b:7497%pppoe0 -> :: prefixlen 64 
scopeid 0xc
plug: {7} pppoectl pppoe0
pppoe0: phase=network
         myauthproto=pap myauthname=""
         lcp timeout: 1.000 s
         idle timeout = disabled
         max-auth-failure = 5

Now, when we get some random lossage, the wireless bridge
drops out, or whatever, I can't get the connection to restart
without a reboot of the box - I've tried the following :

ifconfig pppoe0 delete
ifconfig pppoe create
ifconfig pppoe0 inet down
ifconfig sip3 up
pppoectl -e sip3 pppoe0
pppoectl pppoe0 myauthproto=pap ''
'myauthsecret=XXXXXXXX' hisauthproto=none
ifconfig pppoe0 up
ifconfig pppoe0

The above works to set up the link in the first place (that's how
I did it the first time), but if the link's dropped out it
doesn't seem to get past the pppoe authenticate phase, and
then drops back to phase=dead.  Power-cycling the wireless
bridge makes no difference.

Can anyone suggest a better way to reset/restart the connection
if/when it coughs?