Created at:

PPPoE connection with pppoectl

Some computers don't come with more high-level interfaces for connecting to the internet. NetBSD, for example, comes with the pppoectl(8)_ program, that you can use to make a connection with your DSP.

pppoectl(8)

pppoectl man page is a very good resource to start with. Here I documented, similarly to the man page, how to connect to the local DSP, in this case, the brazilian Speedy (Telefonica), using a NetBSD box.

We suppose our local network interface is fxp0, which is unconfigured. We also need a pppoe0 interface, so let's create it::

    # ifconfig pppoe0 create

Then, let pppoe0 use fxp0 as its ethernet device::

    # pppoectl -e fxp0 pppoe0

Next, we just need to configure our PPPoE connection. We know that the authentication method to connect to Speedy (Telefonica) is PAP::

    # pppoectl pppoe0 \
        myauthproto=pap \
        myauthname=<username> \
        myauthsecret=<password>

The man page show other options and even use one called hisauthproto, but we don't need it. The options shown above seem enough.

Finally we just configure the pppoe0 interface and let the remote ppp chose its address (passing 0.0.0.0 0.0.0.1)::

    # ifconfig pppoe0 0.0.0.0 0.0.0.1 netmask 0xffffffff up

Then, tell your computer about the DNS server (the ones listed here are Google DNS servers)::

    # echo 'nameserver 8.8.8.8' > /etc/resolv.conf
    # echo 'nameserver 8.8.4.4' >> /etc/resolv.conf

And finally, check the route::

    # route delete default
    # route add 0 <route (can be get with ifconfig pppoe0)>