Table of Contents
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.
Comments on this section should be addressed to its maintainer: Eric
Spakman <espakman at users.sourceforge.net>
.
In order to be able to get connected through PPPoA you will the pppoatm.lrp package together with ppp.lrp.
Boot your Bering-uClibc floppy image. Once the LEAF menu appears get
access to the linux shell by (q)uitting the menu. Edit the
leaf.cfg
file and REPLACE the dhcpcd entry by pppoatm
in the list of packages to be loaded at boot. Check the Bering-uClibc
Installation
Guide to learn how to do that.
The pppoatm.lrp packages is available here.
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 Madge Ambassador 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-uClibc modules CVS
area and store it in /lib/modules
.
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 # ATM-PCI "st" drivers ambassador # Masquerading 'helper' modules ip_conntrack_ftp ip_conntrack_irc ip_nat_ftp ip_nat_irc
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:
pppoatm configuration files 1) DSL pppd options 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.
Through the LEAF packages configuration menu get access to ppp configuration. The following menu will show-up
ppp configuration files 1) ISP pppd options 2) ISP login script 3) System wide pppd options 4) chap secret 5) pap secret q) quit ---------------------------------------------------------------------------- Selection:
Edit either the CHAP (Entry 4) or PAP (Entry 5) option to set up how your system authenticates. If you edit chap, replace #ISPUserID and ISPUserPassword with 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 pppoatm Entry 1) "DSL 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.
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 netmask 255.255.255.0 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.
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
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
To save the changes, start lrcfg. The added modules will be saved to moddb with the command "m) Backup modules". The configuration changes are saved with "s) Save config".