Subsections

PPP

PPP comes in various flavours for different situations, the most commonly needed will likely be DSL and for WRT54G3G users UMTS. So there exists a hook-script that evaluates a use-template option and generates a ppp-peer. This way everything needed so far can be configured within the interfaces file. Be sure you have installed the packages kmod-ppp, ppp and ppp-mod-pppoe. For providers using PPTP for authentication, instead of PPPoE, you need to install pptp.

DSL with PPPoE

[label=\file{/etc/network/interfaces}]
auto ppp0
iface ppp0 inet ppp
        use-template dsl
        provider foobar
        ppp-username 1234567890121234567890120001@bar.de
        ppp-password bar
        ppp-device eth0.1

Now your DSL connection will be started on boot (auto ppp0) and you can manually shut it down with ifdown ppp0 or start it up with ifup ppp0. The template dsl will configure a typical PPPoE peer for you.

DSL with PPTP

[label=\file{/etc/network/interfaces}]
auto ppp0
iface ppp0 inet ppp
        use-template pptp
        provider foobar
        ppp-username foo
        ppp-password bar
        ppp-modemip 10.0.0.1
        ppp-mtu 1480
        ppp-device eth0.1

Now your DSL connection will be started on boot (auto ppp0) and you can manually shut it down with ifdown ppp0 or start it up with ifup ppp0. The template pptp will configure a typical PPTP peer for you.

UMTS

Same footprint different template and some specific options. That is all that is needed for an UMTS connection to Vodafone as it can be seen in this example.
[label=\file{/etc/network/interfaces}]
iface ppp0 inet ppp
        use-template    umts
        provider        umts
        #ppp-username   ""
        #ppp-password   ""
        ppp-device      /dev/noz0
        umts-apn        web.vodafone.de
        umts-pincode    1234
        umts-mode       umts_first
As you can see: unneeded options like ppp-username or ppp-password can just be removed or commented out. Don't leave them without a value as that causes a failure in ipup. It does work if you give empty double quotes as value like "".

Note that you have to set the correct APN, username and password for your provider!

You may also remove the pin from your SIM-card and the configuration if you like.

For LINKSYS WRT54G3G a package called broadcom-watchbutton will be installed, this is a small daemon that monitors the UMTS-button of the router and executes ifup umts or ifdown umts on a button press. You have to set watchbutton=YES in /etc/rc.conf to have it start automatically.

This is totally independent from the auto umts setting. Even if you start the connection on bootup you can shut it down again with a button press.