Subject: resetting a pppoe connection?
To: None <netbsd-users@NetBSD.org>
From: Carl Brewer <carl@bl.echidna.id.au>
List: netbsd-users
Date: 02/07/2005 10:49:35
Hello,

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 :

create
! /sbin/ifconfig sip3 up
! /sbin/pppoectl -e sip3 $int
! /sbin/pppoectl $int myauthproto=pap 'myauthname=user@isp.com.au' 
'myauthsecret=XXXXXXX' hisauthproto=none
0.0.0.0 0.0.0.1 up


When it's all running, it looks good :

plug: {6} ifconfig pppoe0
pppoe0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1456
         inet a.b.c.d -> 203.201.104.1 netmask 0xff000000
         inet6 fe80::209:5bff:fe1b:7497%pppoe0 -> :: prefixlen 64 
scopeid 0xc
plug: {7} pppoectl pppoe0
pppoe0: phase=network
         myauthproto=pap myauthname="user@isp.com.au"
         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 0.0.0.0 0.0.0.1 down
ifconfig sip3 up
pppoectl -e sip3 pppoe0
pppoectl pppoe0 myauthproto=pap 'myauthname=user@isp.com.au'
'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?

thanks!

Carl