Table of Contents
We assume here that you want to connect your LEAF router to the Internet via a DSL modem based on the Anolog chipset Eagle 8051. The Sagem F@st 800 modem as well as USRobotics DSL modems are based on this chipset. However, only the F@st 800 as been fully tested.
A useful link can be found here. You can also find a French newsgroup dedicated to this driver here. The PPP-Howto and the DSL-Howto are useful references for this section.
The following setup has been tested by Mathieu a French user who gets connected to the Free DSL service. Thanks to Mathieu for his help with the testing!
Comments on this section should be addressed to its maintainer:
Jacques Nilo <jnilo at users.sourceforge.net>
.
In order to be able to get connected through the Sagem F@ST 800 USB modem you will need to install on your floppy the eagle.lrp package which will provide the latest (1.0.4) driver developped by Sleeper.
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 [ppp,eagle] 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,eagle,keyboard,shorwall,ulogd,dnscache,weblet
The last two lines ("default linux ... dnscache,weblet")
must be typed as a single one in syslinux.cfg
The eagle.lrp package is available here. The ppp.lrp package is available on the Bering standard floppy.
The eagle.lrp package provides the modem microcode and the adiusbadsl.o module. This module has been compiled and tested against Bering 1.2 kernel. The working of this package with other versions of Bering is untested.
In order to have your modem working you need to copy in your /lib/module directory the following set of modules:
The modules to enable USB support: usbcore.o
and - depending on your hardware - usb-uhci.o
or
usb-ohci.o
.
The modules to have your internal network (eth0) NIC working
(e.g. 8390.o
and ne2k-pci.o
for the ne2000 compatible card assumed in the following example).
The modules for ppp with HDLC support: slhc.o
,
n_hdlc.o
, ppp_generic.o
and
ppp_synctty.o
(in this order).
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:
# USB support usbcore # add one of the two following modules usb-uhci #usb-ohci # 8390 based ethernet cards (your internal NIC here will be set as eth0) 8390 ne2k-pci # adiusbadsl: should be insmoded after you internal NIC module(s) and will be assigned eth1(2, 3,..) adiusbadsl # Modules needed for PPP connection slhc n_hdlc ppp_generic ppp_synctty # Masquerading 'helper' modules ip_conntrack_ftp ip_conntrack_irc ip_nat_ftp ip_nat_irc
Backup the modules.lrp package.
Through the LEAF packages configuration menu get access to eagle configuration. The following menu will show-up:
eagle configuration files 1) adiusbadsl configuration file 2) eagle ppp configuration file 3) startadsl script (expert only) 4) stopadsl script (expert only) q) quit ---------------------------------------------------------------------------- Selection:
Enter 1) to check your connection parameters:
# Options are set whith the following syntax: # # Name = Value # # where "Name" is the option name, and # "Value" is the option value, specified # in hexadecimal (without any prefix). # Option names are case sensitive. # Options that are commented out are specified # with their default values. # # Other than VPI, VCI and Encapsulation, # I really don't known what these options mean. #POTS FOR EAGLE OPTN0=80020066 # OPTN2=23700000 # OPTN3=00000000 OPTN4=00000000 # OPTN5=00000000 # OPTN6=00000000 # OPTN7=02CD8044 # OPTN15=09090909 VPI=00000008 define here the VPI parameter (country specific) VCI=00000023 define here the VCI parameter (country specific) #The following values are valid for encapsulation : #MPOA_MODE_BRIDGED_ETH_LLC ----> 1 #MPOA_MODE_BRIDGED_ETH_VC ----> 2 #MPOA_MODE_ROUTED_IP_LLC ----> 3 #MPOA_MODE_ROUTED_IP_VC ----> 4 #MPOA_MODE_PPPOA_LLC ----> 5 #MPOA_MODE_PPPOA_VC ----> 6 Encapsulation=00000006 define here the protocol to be used (default=PPPoA/VC) Linetype=00000001 RatePollFreq=00000009
Enter 2) and adjust the corresponding /etc/ppp/peers/eagle
file:
user "your_login_here" # the following two statements can be commented out once everything is working OK debug kdebug 1 # the following statement can be uncommented if you do not use dsncache #usepeerdns noipdefault defaultroute mru 1492 mtu 1492 pty "/usr/sbin/pppoa -I $(/usr/sbin/adictrl -i)" noauth nobsdcomp nodeflate nopcomp novj novjccomp noaccomp -am persist
The most important parameter in this file is your ISP "user" parameter. The other parameters might need to be adjusted depending on your ISP.
Once your parameters are correct, save the eagle.lrp package!
Then move to the ppp configuration menu:
ppp configuration files 1) ISP pppd options 2) ISP login script 3) System wide pppd options 4) chap secret 5) pap secret 6) pppd daemon script q) quit ---------------------------------------------------------------------------- Selection:
Edit the pppd options file (entry 3) and remove any existing statement. This file should be empty.
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 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 user
parameter in the /etc/ppp/peers/eagle
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 ppp.lrp package.
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:
# Loopback interface. auto lo iface lo inet loopback # Declare the internal interface # auto eth0 iface eth0 inet static address 192.168.1.254 masklen 24 broadcast 192.168.1.255 # Declare the external (ppp) interface auto ppp0 iface ppp0 inet ppp pre-up startadsl provider eagle post-down stopadsl
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. When the ifup ppp0 command is
executed, it first execute the /usr/sbin/startadsl
script then it executes the pon eagle command which
brings up the ppp0 interface. The startadsl
script is
the following:
#!/bin/sh if [ `pidof pppd` ] ; then logger "ppp connection seems already started!" exit fi # Check if usbdevfs is mounted. If not mount it [ "$(mount | grep 'usbdevfs')" ] || mount -t usbdevfs none /proc/bus/usb sleep 2 [ "$(showstat | grep 'operational')" ] || adictrl -d # Wait for modem "operational" state: adictrl -s # Get the ADI network interface name: INTERFACE=`adictrl -i` # Configure the ADI network interface: ip link set $INTERFACE up
When the ifdown ppp0 command is executed, the
poff eagle command is executed then the
stopadsl
script. The stopadsl
script looks like:
#!/bin/sh # Get the ADI network interface name: INTERFACE=`adictrl -i` # Remove the ADI network interface: ip link set $INTERFACE down
The "iface eth0 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 - loc eth0 detect #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
Backup the shorwall.lrp package.
Your PPP 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.
If you want to get connected through pppoe, perform the following steps:
Add the pppoe.lrp package to the LRP= list of packages in your
Bering floppy syslinux.cfg
file. The pppoe.lrp
package is provided on the standard Bering floppy. Extensive documentation
is available in Chapter 4, PPPoE configuration.
As explained in the pppoe documentation, download the necessary
pppoe modules in /lib/modules
and declare them in
/etc/modules
. Save modules.lrp.
Edit the adiusbadsl.conf
file and set the
Encapsulation parameter to 1:
(...) Encapsulation=00000001 (...)
Backup the eagle.lrp package.
Through the leaf package configuration menu, edit the
/etc/ppp/peers/dsl-provider
file of the pppoe
package. Add you user name as explained in the Bering pppoe documentation.
Save pppoe.lrp.
Edit you /etc/interfaces
file as explained
above. The ppp0 section will have to modified as follows:
(...) iface ppp0 inet ppp pre-up startadsl provider dsl-provider eth1 post-down stopadsl (...)
Finally adjust your Shorewall parameters as described above. You will also probably need to edit the Shorewall config file (entry 14) 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.
La configuration ci-dessus a été testée avec le service ADSL de Free non dégroupé. Si vous êtes connecté à Free avec le service dégroupé les modifications suivantes sont à apporter:
Ne pas installer ppp.lrp et le remplacer par pump.lrp (Client dhcp).
Par ailleurs les paramdètres du fichier adiusbadsl
devront être modifiés comme suit:
(...) VCI=00000024 (...) Encapsulation=00000004 (...)
Ne pas oublier de sauvegarder le package eagle.lrp lorsque vous avez fait ces modifications!