Subject: PPP over Ethernet integrated into -current
To: None <current-users@NetBSD.ORG>
From: Martin Husemann <>
List: current-users
Date: 04/29/2001 13:53:47
I have just commited an in-kernel implementation of PPP over Ethernet (see
RFC 2516) to -current.

This protocol is used by several ADSL providers (e.g. the german t-online
T-DSL offer).

From the commit message:
While there are completely userland (bpf based) implementations available,
those have a vastly larger per packet overhead thus causing major CPU
overhead and higher latency. On an i386 base router, running a 486DX at 50MHz
my line (768kBit/s downstream) was limited to something (varying) between 10
and 20 kByte/s effective download rate. With this implementation I get full
bandwidth (~85kByte/s).

This is client side only. Arguably the right way to add full PPPoE support
(including server side) would be a variation of the ppp line discipline and
appropriate modifications to pppd. I promise every help I can give to anyone
doing that - but I needed this realy fast. Besids, on low memory NAT boxes
with typically a single PPPoE connection, this implementation is more
lightweight than a pppd based one, which nicely fits my needs.

I have been using this code extensively over the last weeks and hit quite some
bugs, mainly related to the unusual MTU of pppoe interfaces (1494 instead of 
1500). Besides these bugs in other subsystems the code has been stable and

What is still missing is support in /etc/rc.d for this and some userland
stuff (i.e. something to run ppp-up/-down scripts when the interface 
negotiates a new address). I'm working on this.

If you would like to try this stuff right now, here is the /etc/netstart.local
from my NAT machine:

#! /bin/sh

# Need ethernet interface UP (or it won't send any packets)
/sbin/ifconfig ne0 up

# Let pppoe0 use ne0 as it's ethernet interface
/usr/sbin/pppoectl -e ne0 pppoe0

# Configure authentication
/usr/sbin/pppoectl pppoe0 \
  myauthproto=pap \
  myauthname=........................\ \
  myauthsecret=xxxxxxxxxxx \

# Configure the pppoe0 interface itself. This addresses are magic
# meaning we don't care about either address and let the remote
# ppp choose them.
/sbin/ifconfig pppoe0 up

# Route flush is only needed because I boot via network, so DHCP already
# has a route installed
route flush
# Now add a default route and let it stick to the interface (not the
# addresss, which will change during PPP negotiation).

Have fun & let me know of any bugs ;-)