Chapter 8. Configuring an USB Eagle modem for Bering

Revision History
Revision 0.22003-07-20JN
It appears that adiusbadsl must be loaded after internal NICs. So the documnetation has been revised accordingly. Thanks to M. Bulandra for his remarks
Revision 0.12003-07-12JN
initial release

Table of Contents

Step 1: declare the ppp.lrp and eagle.lrp packages
Step 2: declare the necessary modules
Step 3: configure eagle and ppp packages
Step 4: configure your interfaces file
Step 5: configure Shorewall
Step 6: reboot...
Getting connected with PPPoE
A special appendix for French users...


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 .

Step 1: declare the ppp.lrp and eagle.lrp packages

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.

Step 2: declare the necessary modules

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
# add one of the two following modules

# 8390 based ethernet cards (your internal NIC here will be set as eth0)

# adiusbadsl: should be insmoded after you internal NIC module(s) and will be assigned eth1(2, 3,..)

# Modules needed for PPP connection

# Masquerading 'helper' modules

Backup the modules.lrp package.

Step 3: configure eagle and ppp packages

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

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.

# OPTN2=23700000
# OPTN3=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 :
Encapsulation=00000006                        define here the protocol to be used (default=PPPoA/VC)


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
kdebug 1
# the following statement can be uncommented if you do not use dsncache
mru 1492
mtu 1492
pty "/usr/sbin/pppoa -I $(/usr/sbin/adictrl -i)"
noaccomp -am

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

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.

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:

# Loopback interface.
auto lo
iface lo inet loopback

# Declare the internal interface
auto eth0
iface eth0 inet static
      masklen 24

# 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:


if [ `pidof pppd` ] ; then
        logger "ppp connection seems already started!"

# 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:

# 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.

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:

net     ppp0            -
loc     eth0            detect


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

Backup the shorwall.lrp package.

Step 6: reboot...

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.

Getting connected with PPPoE

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:


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.

A special appendix for French users...

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:


Ne pas oublier de sauvegarder le package eagle.lrp lorsque vous avez fait ces modifications!