Unix PPPoE Configuration - Linux Console
Setting Up PPPoE Under a Linux Environment
By Adam Kalicak
This document is provided “as-is”. We hope you find it useful. Unfortunately, at this time Primus cannot provide telephone support for Linux users.
Setting up a PPPoE connection is quite different in Linux than it is in a Windows, or Macintosh environment. Some Linux distributions are now being bundled with PPPoE clients. If this is not the case for you, or if you are not sure, then you will have to download and install one. You will find a client on any Linux archive site such as http://www.freshmeat.net, etc. or, look below for a simple, yet effective PPPoE client by Roaring Penguin Software called RP-PPPoE.
Installation
System Requirements
To be able to install and use this PPPoE client, you will need:
- A Linux system with a 2.0-, 2.2- or 2.4-series kernel
- Kernel support for “packet sockets”. All standard distribution kernels include this.
- The pppd daemon, version 2.3.7 or later. If you are using demand-dialing, you need version 2.3.10 or later.
- For kernel 2.4, you need pppd 2.4. (These, and other required modules for Linux can be found at: http://www.rpmfind.net)
- A working Ethernet card.
- ADSL service, and an ADSL modem.
You must be logged in as root to install and configure the software. If you are installing from sourcecode, you will need a complete C development environment installed (ie: compiler, make, linker, headers, libraries). GCC (GNU-C) is the most popular compiler for Linux, and can also be found on http://www.rpmfind.net or http://www.linuxapps.com, but most distributions of Linux come with GCC (or other compilers) installed already.
Set up your Ethernet hardware (aka your Network Card [NIC])
First, make sure the Ethernet card you intend to use with the modem is visible to the Linux kernel. Just how to do this is beyond the scope of this document. However, if the card is the only Ethernet card in the system, executing:
ifconfig eth0
should display something like this:
eth0 Link encap:Ethernet HWaddr 00:60:67:62:31:D4
Keep in mind that your HWaddr will be different. As long as you see the HWaddr line, your card should be working.
DO NOT assign an IP address to the Ethernet card.
DO NOT configure the card to come up when booting.
Set up DNS
If you are using DNS servers supplied by Primus Canada, edit the file /etc/resolv.conf to contain these lines:
nameserver 216.254.141.2
nameserver 209.90.160.222
Installing using RPM
If you downloaded the RPM filetype, you will need to type the following from your shell prompt:
If you don’t want the GUI type:
rpm -Uvh rp-pppoe-3.5-1.i386.rpm
Then:
/usr/sbin/adsl-setup
If you do want the GUI type:
rpm -Uvh rp-pppoe-3.5-1.i386.rpm rp-pppoe-gui-3.5-1.i386.rpm
Then:
/usr/bin/tkpppoe
Installing from Sourcecode (Mandrake and other Distributions of Linux)
If you downloaded the compressed tar file, you will need to change to the directory that you downloaded the file to (usually your home directory), and type the following from the shell prompt:
tar -xvfz rp-pppoe-3.5.tar.gz
This will extract all the source code and libraries needed to compile, configure, and install the PPPoE client on your system. You will then need to go into the directory where all those files were extracted by typing:
cd rp-pppoe-3.5
Now that you are in the /rp-pppoe-3.5/ folder, compiling is easy, but you need to make a choice whether you would like to compile the Shell Based Client or the GUI Based Client.
If you want the Shell Based Client, from your shell prompt, type:
./go
If you want the GUI Based Client (for XWindows), from your shell prompt, type:
./go-gui
IF THE ABOVE DOES NOT WORK FOR YOU...
Because every distribution of Linux is unique, not everyone’s system will compile the source code using the above procedure. If you get stuck, or can not compile the program, you may try to compile the client manually by following these steps from your shell prompt:
First off, you will need to extract all the nescessary files by typing:
tar -xvfz rp-pppoe-3.5.tar.gz
After all the files have been extracted, you will need to bring yourself into the source directory by typing:
cd rp-pppoe-3.5/src
Now that you are in the source directory, you will need to configure the source code to be compatible with your system by typing:
./configure
Once the source code has been configured for your system, you will need to compile the source code into a useable program called a binary file. To do this you simply need to type:
make
After the binary has been compiled (or made), it will need to be installed on your system. Once again, you will use the make command in conjunction with an install function by typing:
make install
Now for your last step, you will need to setup the dsl client by typing:
adsl-setup
Okay, I’ve installed RP-PPPoE, but how do I connect?
As root, you can connect from the shell by typing:
adsl-start
To disconnect, all you need to do is, from the shell, type:
adsl-stop
How do I connect automatically at startup?
On a Red Hat system, the installation procedure should have installed a script called /etc/rc.d/init.d/adsl. In order to bring up the connection at boot time, just type this command as root:
chkconfig --add adsl
On non-Red-Hat systems, add this line to the end of /etc/rc.d/rc.local file:
/usr/sbin/adsl-start



