Table of Contents
We assume here that you want to connect your LEAF router to the Internet via an ADSL PPPoE connection. What is described here corresponds to section 3.2.3 of the DSL How-To document. Your ADSL modem is supposed to be connected to eth0, while the traffic to your internal network goes through eth1.
What follows has been tested with Bering v1.0-rc1 on a 486er and a pentium machine, a rtl8139 compatible and a 3com network card connected to eth0 and eth1 and ADSL "T-online" service offered here in Germany.
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
Wolzak <leaf at wolzak.de>
.
Those two packages are provided on the standard Bering floppy disk, but are not activated by default.
Boot a 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 ppp,pppoe 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,ppp,pppoe,keyboard,shorwall,ulogd,dnscache,weblet
The last two lines ("default linux ... dnscache,weblet")
must be typed as a single one in syslinux.cfg
In order to have a PPPoE connection working, you need to have ppp and pppoe 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 both ethernet interfaces are provided through a standard ne 2000 PCI card.
All the modules which are necessary for a PPPoE connection are
provided on the standard Bering floppy. You just need to "declare"
them since they are not loaded by default. As far as your network cards
are concerned, the most popular driver modules are provided in
/lib/modules
but you might need to download the one
corresponding to your own hardware from the Bering modules download
area. Refer to the Bering installation
guide to learn how to do that.
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/PPPOE connection slhc n_hdlc ppp_generic ppp_synctty pppox pppoe # Masquerading 'helper' modules ip_conntrack_ftp ip_conntrack_irc ip_nat_ftp ip_nat_irc
The /etc/modules
file provided in the Bering
distro is already setup with those entries commented out. Just remove
the leading # sign to activate the corresponding module.
Backup the modules.lrp package.
In the normal situation, you won't have to do anything here, the ppp is preconfigured for the standard situation.
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.
Please refer to the Serial Modem configuration section of this user's guide to learn how to configure your ppp package.
The default options provided with the ppp.lrp should work and if you are not familiar with ppp leave them at first. After you get a connection you can "fine tune" your setup.
Through the LEAF Package configuration menu choose pppoe. The following menu will appear:
pppoe configuration files 1) DSL pppd options 2) pap secret q) quit ---------------------------------------------------------------------------- Selection:
Entry 1) allows you to adjust the parameter of your ppp connection
through the /etc/ppp/peers/dsl-provider
file. The
most important argument is the user parameter which
defines your login name.
Replace the field following the user statement in the
/etc/ppp/peers/dsl-provider
[ "[email protected]"
] by the login name provided by your ISP.
# Configuration file for PPP, using PPP over Ethernet # to connect to a DSL provider. # plugin /usr/lib/pppd/pppoe.so # MUST CHANGE: Uncomment the following line, replacing the [email protected] # by the DSL user name given to your by your DSL provider. # (There should be a matching entry in /etc/ppp/pap-secrets with the password.) user "[email protected]" (...)
Entry 2) allows you to edit the /etc/ppp/pap-secrets
.
Enter in this file the login and password provided by your ISP. Your login
name must EXACTLY match the one given in the previous
/etc/ppp/peers/dsl-provider
file. If you have special
characters in secret or username, you should put them in quotes
# This is a pap-secrets file # #papname * papsecret "[email protected]" * "secretfoo"
Backup both pppoe and ppp packages.
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 eth1 iface lo inet loopback iface ppp0 inet ppp pre-up ip link set eth0 up provider dsl-provider eth0 iface eth1 inet static address 192.168.1.254 masklen 24 broadcast 192.168.1.255
In this /etc/network/interfaces
file the lo,
ppp0 and eth1 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" says:
Execute the "ip link set eth0 up" command BEFORE ppp0 is activated (pre-up statement)
Execute the /sbin/pon dsl-provider eth0
script to establish the PPPoE connection. The dsl-provider
file used as input by /sbin/pon
is provided in
the pppoe.lrp package.
The "iface eth1 inet static" defines the internal address of the router.
Backup the etc.lrp package.
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 - routefilter loc eth1 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 7). With a dial-up
modem setup it should look like:
(...) #INTERFACE SUBNET ppp0 eth1 #LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE
C/ You may also need to edit the config
file
(entry 12) to adjust the CLAMPMSS variable to "yes":
(...) # Set this variable to "Yes" or "yes" if you want the TCP "Clamp MSS to PMTU" # option. This option is most commonly required when your internet # interface is some variant of PPP (PPTP or PPPoE). Your kernel must # # If left blank, or set to "No" or "no", the option is not enabled. # CLAMPMSS="yes" (...)
Backup the shorwall.lrp package.
Your modem 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.
PPPoE connections are going up and taken down. Here my provider takes down the connection after 15 minutes of inactivity. Also if you switch your router out over night and wants to know if it really got connected beep.lrp is your friend. It gives a sound of configurable duration and frequency. If you have your router on a greater distance, have a monitor installed or use the serial line for direct monitoring, you don't use it. The package should only be inserted on the disk and beep written in the syslinux.cfg package=.....,beep. The configuration is easy, in /etc/ppp/if-up there is allready a small sound included. You can change frequency with the -f option.
C. Hostelet is using an old laptop as a Bering router. His hardware configuration consists of one HP Omnibook 3000 laptop (Pentium 233Mhz, 144MB Ram, CD-Rom drive module, no floppy, no HDD), one Xircom CEM56 Modem/ethernet PCMCIA card and one 3Com 3C589 PCMCIA card. The connection to the net is provided through the first PCMCIA card connected to an Alcatel SpeedTouch Home ethernet modem which gives him access to France Telecom "Netissimo" ADSL service. The connection to the local network is done trough the second PCMCIA card.
Here is his /etc/network/interfaces
file:
auto lo iface lo inet loopback iface eth0 inet static address 10.0.0.1 masklen 24 broadcast 10.0.0.255 up pon dsl-provider eth0 up shorewall restart down shorewall stop down poff iface eth1 inet static address 192.168.1.254 masklen 24 broadcast 192.168.1.255 up /etc/init.d/dnscache restart down /etc/init.d/dnscache stop
Only lo is brought up automatically at boot time. eth0 and eth1 are
brought up by the PCMCIA cardmgr program which calls the
/etc/pcmcia/network
script.
The connection with the Alcatel speedtouch modem is done through the eth0 interface at address 10.0.0.1
Once the eth0 interface is up the pppd daemon is called by the pon script. Shorewall must then be restarted since eth0 was not available at boot time
Once the eth1 interface is up we restart dnscache which could not start at boot time since eth1 was not available.