Subject: Re: problems reconnecting via PPPoE
To: Quentin Garnier <cube@cubidou.net>
From: =?UTF-8?Q?C=C3=A9sar_Catri=C3=A1n?= C. <ccatrian@eml.cc>
List: tech-net
Date: 04/20/2005 21:26:54
On Wed, 20 Apr 2005 19:47:33 +0200
Quentin Garnier <cube@cubidou.net> wrote:

> On Wed, Apr 20, 2005 at 01:32:19PM -0400, César Catrián C. wrote:
> [...]
> > > > > If it talks PPPoA to the modem, then why would it offer a PPPoE interface
> > > > > instead of directly a PPP interface?  This looks completely bogus.
> > > > 
> > > > The pppoa2 program talks only PPPoA to the modem_run program (the USB modem 
> > > > driver), and at the same time it offers an ethernet like interface for use with 
> > > > our PPP implementation for the authentication, etc.
> > > > 
> > > > net/speedtouch out of the box uses net/userppp to work, and userppp accept the 
> > > > output of pppoa2 piped as a device in the config file. But I wanted to use 
> > > > native PPP.
> > > 
> > > But userppp and pppoe are very different things.  The kernel equivalent
> > > of userppp is ppp(4) and the userland equivalent of pppoe(4) is
> > > rp-pppoe.  The fact that your current setup works (with its drawbacks,
> > > but still) means that you're actually doing PPPoEoA (that is, with an
> > > added Ethernet layer).  If userppp can work with your DSL installation,
> > > you'd better try using ppp(4) if you want the native implementation,
> > > because involving Ethernet in this only brings trouble, notably with
> > > tht MTU.
> > 
> > The main reason I quit using userppp was for the MTU issues, problems while
> > setting the default route, etc.
> 
> What MTU issues with userppp?  I don't know any, and compared to the
> whole mess PPPoE is about it...

I got these errors running userppp. Besides, the kernel trace shown many unnecesary
and repeated procedures (ie, too many seteuid(0) calls).

ppp[3182]: tun0: Warning: Add! route failed: 0.0.0.0: errno: Too many references: 
can't splice
ppp[3182]: tun0: Error: tun_configure: ioctl(SIOCSIFMTU): Invalid argument

> 
> > So I looked at ppp(4), but doesn't allow to specify a program (pppoa2) as a device
> > as userppp does. And at the same time, pppoa2 provides bridging option (-b) to 
> 
> Sure it does.  pppd pty "my program".
> 

Using: "pty /usr/pkg/sbin/pppoa2 -vpi 8 -vci 32 -v 1" in /etc/options 
instead of: set device !"/usr/pkg/sbin/pppoa2 -vpi 8 -vci 32 -v 1" in the ppp.conf at userppp?

> > use a ethernet interface. The rest was to use native PPPoE with my setup.
> 
> Well, I strongly advise you to avoid PPPoE at all cost.  userppp simply
> _cannot_ be as bad as having to use PPPoE.

PPPoE was a good thing to me. By then, the only problem I had was libpusb. Due
to the lack of devfs, every time the USB port was reset or unplugged, the program 
went into a loop. I don't have more option than restart the system with that
problem. And I don't remember having problems with PPPoE at that time.

I remember I changed to PPPoE while using NetBSD 2.0B. The problem with PPPoE 
started about one or two months ago, maybe while I migrated to 2.0, I don't know 
for sure. I thought it was a USB port reset, so I did nothing except rebooting.

> 
> If you want, I can have a look at making net/speedtouch work with
> ppp(4).  I know that last time I tried (about 3 years ago...), it
> didn't work for some strange reason I couldn't properly investigate,
> and userppp was working reasonably enough for me.  However, its lack
> of support to maintain the link with LCP Echo packets is annoying,
> which is a good reason to switch to pppd(8).

Of course, it would be a good thing.

César