Chapter 5. PPPoA configuration

Revision History
Revision 0.32002-05-18JN
initial revision

Table of Contents

Objectives
Step 1: declare the pppatm package
Step 2: declare the ppp and pppoatm modules
Step 3: configure pppatm
Step 4: configure your interfaces file
Step 5: configure Shorewall
Step 7: reboot...

Objectives

We assume here that you want to connect your LEAF router to the Internet via PPPoA. The PPPoE connection is covered in another section of this user's guide. So is the PPTP/PPPoA connection. What is described here corresponds to section 3.2.4 of the DSL How-To document. The traffic to your internal network goes through eth0 while access to the Internet via PPPoA goes through ppp0.

The PPP-Howto and the DSL-Howto are two useful references for this section.

The following setup has been tested by Dave Anderson, who gets connected to BT DSL service using a Bewan ATM/PCI "st" card on a P166 machine.

Thanks to Dave for his patience in testing!

Comments on this section should be addressed to its maintainer: Jacques Nilo .

Step 1: declare the pppatm package

In order to be able to get connected through PPPoA you will need a special version of ppp patched for PPPoA support. This support is provided by a pppoatm.so "plugin" which is - unfortunately - only available for ppp version 2.4.0b2 (The "standard" Bering ppp version is 2.4.1). The pppatm.lrp package is nothing more than this patched version of ppp 2.4.0b2 which was developped by Michael Mitchell. This package will replace the ppp.lrp package provided on your Bering floppy.

Note: pppd will appear as 2.4.0b1 in syslog but it's really pppd 2.4.0b2 !

Boot your Bering floppy image. Once the LEAF menu appears get access to the linux shell by (q)uitting the menu. Edit the syslinux.cfg file and REPLACE the pump entry by pppatm in the LRP= list of packages to be loaded at boot. Check the Bering installation guide to learn how to do that.

Your syslinux.cfg file will then look like (adjust to your tastes):

display syslinux.dpy
timeout 0
default linux initrd=initrd.lrp init=/linuxrc rw root=/dev/ram0 boot=/dev/fd0u1680:msdos
	PKGPATH=/dev/fd0u1680 LRP=root,etc,local,modules,iptables,pppatm,keyboard,shorwall,ulogd,dnscache,weblet

Important

The last two lines ("default linux ... dnscache,weblet") must be typed as a single one in syslinux.cfg

The pppatm.lrp package is available here.

Step 2: declare the ppp and pppoatm modules

In order to have a PPPoA connection working, you need to have both ppp and pppoatm support enabled through the appropriate kernel modules. You also need to declare the driver(s) module(s) of your network card(s). In the following example, we assume that the external connection to the Internet is provided by a Bewan ATM/PCI card while the internal network goes through a standard ne 2000 PCI card.

All the modules which are necessary for ppp support are provided on the standard Bering floppy. You just need to "declare" them since they are not loaded by default. As far as the pppoatm module is concerned you will have to download it from the Bering modules download area and store it in /lib/modules.

The module drivers for the Bewan ATM/PCI card are provided in the driver contrib section. Store them in /lib/modules as well. Other ATM drivers are available here.

To declare your modules, go to the LEAF Packages configuration menu and choose modules. Enter 1) to edit the /etc/modules file and enter the following information:

# 8390 based ethernet cards
8390
ne2k-pci

# Modules needed for PPP connection
slhc
ppp_generic

# PPPOA support
pppoatm

# Bewan ATM-PCI "st" drivers
unicorn_atm
unicorn_pci ActivationMode=1

# Masquerading 'helper' modules
ip_conntrack_ftp
ip_conntrack_irc
ip_nat_ftp
ip_nat_irc

Backup the modules.lrp package.

Step 3: configure pppatm

Connection with your ISP will be handled by PPP. The PPP Howto document will give you very detailed information about this protocol and how to set-up its numerous parameters.

Through the LEAF packages configuration menu get access to pppatm configuration. The following menu will show-up:

                        pppatm configuration files

        1) ISP pppd options
        2) System wide pppd options
        3) chap secret
        4) pap secret
        5) pppd daemon script

  q) quit
  ----------------------------------------------------------------------------
        Selection:

Enter 1) and adjust the corresponding /etc/ppp/peers/dsl-provider file:

#
# Adjust here VP/VC - depends on country & ISP
# UK/BT: 0.38 - US/BE/FR: 8.35
#
plugin /usr/lib/pppd/pppoatm.so 0.38
#
# If chap or pap identification uncomment the #name "ISPUserID" line
# and replace ISPUserID with your ISP user name
# There should be a matching entry in /etc/ppp/pap-secrets or chap-secrets
#
#name "ISPUserID"
lock
noipdefault
noauth
defaultroute
hide-password
lcp-echo-interval 20
lcp-echo-failure 3
maxfail 0
persist

The most important parameters in this file are the VP.VC combination which depends on your country and/or your ISP and the name parameter.

You should not need to adjust 2).

Edit either the CHAP (Entry 3) or PAP (Entry 4) option to set up how your system authenticates. If you edit chap, replace #ISPUserID and ISPUserPassword this the relevant information.

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
#ISPUserID      *       ISPUserPassword

ISPUserID must exactly match the entry that you made for the name parameter in Entry 1) "ISP pppd options" file. The "*" can be replaced with the IP address or name of the server you are dialling into if you know it. Usually, an asterisk is sufficient.

If you want to authenticate using PAP, add the same entry to the PAP item instead.

Backup the pppatm.lrp package.

Step 4: configure your interfaces file

Trough the LEAF configuration menu type 1 to access to the network configuration menu and 1 again to edit your /etc/network/interfaces file. Enter the following information:

auto lo ppp0 eth0

iface lo inet loopback

iface ppp0 inet ppp
	provider dsl-provider

iface eth0 inet static
	address 192.168.1.254
	masklen 24
	broadcast 192.168.1.255

In this /etc/network/interfaces file the lo, ppp0 and eth0 interfaces are brought up automatically when the ifup -a statement is executed at boot time by the /etc/init.d/networking script.

The "iface ppp0 inet ppp" section defines the external address of the router and activates the pon script

The "iface eth0 inet static" defines the internal address of the router.

Backup the etc.lrp package.

Step 5: configure Shorewall

Through the LEAF packages configuration menu, choose shorwall and check the three following files:

A/ The interfaces file (entry 3) defines your interfaces. Here connection to the net goes through ppp0. So we must set:

(...)
#ZONE   INTERFACE       BROADCAST       OPTIONS
net     ppp0            -
loc     eth0            detect          routestopped
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE

Warning

Do not forget the "-" under the BROADCAST heading for the net/ppp0 entry.

B/ The masq file (entry 8). It should look like:

(...)
#INTERFACE              SUBNET
ppp0                    eth0
#LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE

Backup the shorwall.lrp package.

Step 7: reboot...

Your PPPoA connection should be established automatically. Type plog to check the login sequence with your ISP. If there is no output check /var/log/syslog to get a clue on potential problems.