How to setup PPPoE in Ubuntu

In some cases, you may want to use your DSL router as a modem or you have a DSL modem and a linux box. It occurs to me right now since ZyXEL Prestige 650R-31 is not quite good for large network and its routing policy doesn't enable nat loopback by default. I managed to enable that feature via cron by the linux box but it seems sometimes not work properly. So I decided to switch it back to bridging mode (modem) through PPPoE. Setting up PPPoE in Ubuntu is very easy.

You have to make sure that all essential packages are installed.

apt-get install pppoe pppoeconf

First of all, you should make sure that your router has been correctly configured to operate in bridging mode by running pppoe-discovery.

pppoe-discovery

If you found some responses, that's correct. Run pppoeconf to automatically generate a configuration for your router.

pppoeconf

After that you are able to control DSL connection via pon, poff and plog.

  1. Dial

    pon dsl-provider
    
  2. Hang up

    poff dsl-provider
    
  3. Show log

    plog
    

For your information, the actual PPP script is at /etc/ppp/peers/dsl-provider and the password is stored at /etc/ppp/pap-secrets. If you have multiple interfaces, it is strongly recommended to add a script in /etc/network/if-down.d to hang up as follows.

#!/bin/sh

poff dsl-provider

Tags: , , ,

Post new comment