To setup the connection I use the PPPoE daemon that comes with FreeBSD. This program uses netgraph to listen for incoming PPPoE requests, setup a PPP session and then run the ppp(8) program to service them. More information about the mechanics of PPPoE can be found in RFC 2516. To run pppoed(8) at bootup you can add the following to /etc/rc.conf
### PPPOE
pppoed_enable="YES"
pppoed_interface="de0"
pppoed_flags="-P /var/run/ppoed.pid -l pppoein"
Don't forget to change the interface it's on. You will also need
to create a ppp(8) label called 'pppoein'. Mine looks like this
pppoein: set ifaddr 10.0.2.1 10.0.2.20 set dns 10.0.2.1 set nbns 10.0.2.1 disable utmp disable passwdauth enable lqr set cd 5! accept dns enable mschapv2 mppe disable deflate pred1 deny deflate pred1 set mppe 128 * set timeout 0 set mru max 1400 set mtu max 1400 set speed syncNote 1) the MSChapV2 lines and the 'set mppe' line. These ensure encryption actually happen. Unfortunately ppp(8) only supports MPPE encryption which has some drawbacks.
foo: set device PPPoE:wi0 accept pap disable chap enable lqr set cd 5 set dial set login set redial 0 0 set authname username set authkey passwordObviously you will have to change the label, interface, username and password to suit. Once that is done you can initiate the connection by executing 'ppp -ddial foo'.