Drivers SpeedTouch USB ADSL PPP



News flash! HOWTO made obsolete by speedbundle!

  1. Drivers Speedtouch Usb Adsl Ppp Loan
  2. Drivers Speedtouch Usb Adsl Ppp Wireless Router
  3. Drivers Speedtouch Usb Adsl Ppp Setup
  4. Drivers Speedtouch Usb Adsl Ppp Router

HOWTO: Alcatel Speedtouch USB with kernel 2.6 Revisited As I have a Alcatel Speedtouch 330 USB modem (purple) and Gentoo running kernel 2.6.7-rc3mm2 I've had quit a challenge to get my box connected thru my ADSL line. Appendix: The Alcatel SpeedTouch USB ADSL Modem The Alcatel SpeedTouch USB modem is one of a very few non-ethernet modems with Linux drivers. This modem is quite popular in Europe (Alcatel's home turf), and is widely used elsewhere as well.

Go to thedownload pageand install the'speedbundle'.This contains everything you need to get a speedtouch modemworking under linux, including configuration files.It should all 'just work'.For legal reasons you will need toget the firmware elsewhere.Please write to the mailing list ifit does not work perfectly.There should be no need to consult this HOWTO.

Preface

After a serious session of postponing and not feeling like it, I wrotethis HOWTO. It contains everything I can think of that youcould/should/have to know to use this driver to it's fullestcapabilities. This HOWTO has explicit support for PPPoA and PPPoE, butthe driver can accommodate any ATM protocol available.

Copyright Information

This document is copyrighted 2001 by Johan Verrept.
Permission is granted to copy, distribute and/or modify thisdocument under the terms of the GNU Free DocumentationLicense, Version 1.1 or any later version published by theFree Software Foundation;

Driver Description

This is a driver for the Alcatel SpeedTouch USBADSL modem. The driver itself consists of two different parts. Akernel part and a user space part. Both parts were originally releasedby Alcatel's modem branch,now part of Thomson Multimedia.The kernel module is released under the GNU General Public License.The current maintainer is DuncanSands. The kernel module is responsible for all data traffic. It ismodeled as a Linux ATMcard. This allows you to use a wide range of protocols like PPPoA,RFC2684 Bridging (allowing PPPoE), and others over PVC's and it supportsATM signaling (SVC's).
The original user space part (speedmgmt) is maintained by Alcatel/Thomson. It isdistributed as a binary-only application. The Alcatel/Thomson applicationonly does management and firmware downloading. There is now anopen-source replacement (modem_run). It is available from the user space driver site.
The driver supports Plug-N-Play by using the Linux Hotpluggingpackage.

The choice between PPPoA and PPPoE depends on you provider. Mostproviders support one protocol, some both. Consult the FAQ to see which protocol is applicable to you. Ifyou can choose, PPPoA has the least overhead and thus bestperformance...

The First Step: Downloading.

General

You will need to download quite a few packages to get this thingrunning.
  • The binary management application speedmgmt from Alcatel/Thomson; or the latestCVS version of modem_run,an open-source replacement (part of the user space speedtouch drivers- an independent set of drivers for the speedtouch modem).
  • The firmware to be loaded into the modem. You can either use thefile mgmt.o that comes with speedmgmt,or the file alcaudsl.sys which comes with the windows drivers (it getsinstalled in windowssystem).
  • The OpenSource Kernel Module written by Johan Verrept and maintained by Duncan Sands. The currentdevelopement version is available via anonymous cvs(replace modulename with speedtouch).
  • The LinuxHotplugging Package
A number of these you will have to patch and/or compile yourself.

PPPoA

If your provider uses PPPoA you will need:
  • For kernels older than 2.4.15, the PPPoAkernel patch (grab the most recent one smaller than your currentkernel version) by Jens Axboe. Newerkernels already include this patch.
  • A PPP over ATM aware PPP daemon. To see if you already have one,run the command
    find /usr/lib/pppd -name pppoatm.so
    If the result is 'No such file or directory' then you will have todownload an ATM aware PPP daemon. Try thesepackages.
    Remark: Debian users can use aliento change rpm packages into the Debian deb format.
    Remark:
    If dependency problems are stopping you from installing theSuSe packages, you can try recompiling the source rpms that
    SuSe provides.

PPPoE

If your provider uses PPPoE, you will need:
  • A PPPoE aware PPP daemon, such as a recent version of the ppp package or Roaring Penguin PPPoE.

The Second Step: Patching the kernel

Drivers Speedtouch Usb Adsl Ppp Loan

Untarring the kernel

For this you will need root permissions.

Go to the directory where the kernel needs to be compiled.
cd /usr/src/
Now, move the old Linux kernel away:
mv linux linux.old
Remark: usually this is a symbolic link that can also bedeleted.

Untar your new kernel:
If this is linux-2.4.x.tar.gz :

tar zxvf linux-2.4.x.tar.gz
If this is linux-2.4.x.tar.bz2:
cat linux-2.4.x.tar.bz2 | bunzip2 - | tar xvf -
As a good measure, move your kernel and put a symbolic link.
mv linux linux-2.4.x
ln -s linux-2.4.x linux
Remark: Off course, do not forget to replace the 'x' withyour version number!
Remark: Do not apply both the PPPoA and PPPoE patches! They collide.
Remark: If you are using Mandrake 8.0, you can skip thispart. The kernel supplied with Mandrake 8.0 already contains thenescessary patches.
Remark: If you are using Mandrake 8.1, you can skip thisHOWTO! Mandrake 8.1 contains an rpm with the driver.

Applying PPPoA patches

Only necessary if you are going to use PPPoA! Only necessary if yourkernel is older than 2.4.15!
Now, go to the kernel directory.
cd /usr/src/linux
Unzip the patch:
gzip -d pppoatm-1.gz
Apply the patch:
patch -p1 -s -E < /path/to/pppoatm-1
Ready.

Applying PPPoE patches

Only necessary if you are going to use PPPoE!
Now, go to the kernel directory.
cd /usr/src/linux
Unzip the patch:
gzip -d br2684-against2.4.2.diff.gz
Apply the patch:
patch -p1 -s -E < /path/to/br2684-against2.4.2.diff
Ready.

The Third Step: Configuring the kernel

For easily configuring the kernel type:
cd /usr/src/linux/
make menuconfig
You will need to set the following options:
  • Code Maturity Level Options
    • Prompt for development and/or incomplete code/drivers [Y]
  • Loadable Module Support
    • Enable Loadable Module Support [Y]
  • General Setup
    • Support for hot-pluggable devices [Y]
  • Networking Options
    • Packet Socket [Y]
    • Asynchronous Transfer Mode (ATM) (EXPERIMENTAL) [Y]
  • Network Device Support
    • PPP (Point-to-Point Protocol) Support [Y]
    • PPP Deflate Compression [Y]
  • USB Support
    • Support for USB [Y]
    • Preliminary USB Device Filesystem [Y]
    • UHCI (Intel PIIX4, VIA,...) Support [M]
    • OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support [M]
For PPPoA you will need the following options:
  • Network Device Support
    • PPP Over ATM (EXPERIMENTAL) [Y]
For PPPoE you will need these options:
  • Networking Options
    • RFC 1483/2684 Bridged protocols [Y]
  • Network Device Support
    • PPP Over Ethernet (EXPERIMENTAL) [Y]
Remark: These are the options needed to get this driverrunning. you will also have to enable the other drivers you need foryour system. A good starting point to determine what these are arethe (currently) loaded modules. For more information on how to build akernel see theLinux Kernel HOWTO.

The Fourth Step: Building and Installing the Kernel

After configuring, this is easy!
Go to the kernel directory.
cd /usr/src/linux
Type:
make dep
make bzImage
make modules
make install
make modules_install
Congratulations with your new kernel!
Do not forget to reboot before you continue!
Remark: If your kernel refuses to build correctly, try to do a:
make mrproper
Before you try the above sequence.

As a quick check you can type:

uname -a
to see if your new kernel has booted. It should return something like:
Linux infinty 2.4.4 #4 Sun May 6 04:09:45 CEST 2001 i686unknown
If there are any problems in installing and getting your kernel to run,please consult the LinuxKernel HOWTO or the documentation of your distribution.

The Fifth Step: Building the SpeedTouch Kernel Module

Untar, build and install the SpeedTouch module:
tar zxvf speedtouch-1.x.tar.gz
cd speedtouch
make
make install
The last step needs to be done as root. Ready!

Remark: If you are using speedtouch-1.0.tar.gz, you canedit speedtouch.c before building and installing it and remove thefollowing line:

#define DEBUG_PACKET 1

This will cause the module to use a LOT less CPU resources.

The Sixth Step: Installing Hotplugging.

If you have downloaded the RPM, you do:
rpm --install hotplug-XXXXX-1.noarch.rpm
If you downloaded the source archive:
tar zxvf hotplug-XXXXX-1.tar.gz
make install
Remark: This only work smoothly for RedHat systems,installation instruction for other distributions can be found in thehotplug README file.

Now, to make sure your hotplugging subsystem is started at boottime:

cd /etc/rc.d/rc3.d
ln -s ../init.d/hotplug S07hotplug
To make sure hotpluggin is disabled at shutdown, add:

Drivers Speedtouch Usb Adsl Ppp Wireless Router

cd /etc/rc.d/rc3.d
ln -s ../init.d/hotplug K07hotplug

The Seventh Step: Installing the Binary Management Application

If you downloaded the speedmgmt package from Alcatel/Thomson,untar and install it:
tar zxvf speedmgmt-1.x.tar.gz
cd mgmt
make install
and go to step eight.
If you downloaded the CVSversion of modem_run, the procedure is more complicated.
First, install modem_run:
cd speedtouch
./configure
make
make modem_run
(this last step needs to be done as root).
Next, as root, copy the firmware to /usr/local/lib:
mkdir /usr/local/lib
then
cp mgmt.o /usr/local/lib/firmware.bin
or
cp alcaudsl.sys /usr/local/lib/firmware.bin
or
cp firmware.bin /usr/local/lib/firmware.bin
depending on the version of the firmware you are using.
Finally, you will need to install an appropriate hotplugging script:create the directory /etc/hotplug/usb:
mkdir /etc/hotplug/usb
and (as root) place the following in /etc/hotplug/usb/speedtouch.usermap:
speedtouch 0x0003 0x06b9 0x4061 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 0x00000000
and the following in /etc/hotplug/usb/speedtouch:
#!/bin/bash
case $ACTION in
add)
mesg 'speedtch: uploading microcode.'
if /usr/local/sbin/modem_run -k -f/usr/local/lib/firmware.bin ; then
sleep 5
if /usr/sbin/pppd ; then
mesg'speedtch: started pppd.'
fi
fi
;;
esac

The Eight Step: Installing PPPoA/PPPoE

Installing PPPoA

First we need the pppd.
If /dev/ppp does not exist, we need to create it ourself:
cd /dev
./MAKEDEV ppp
If your distribution does not include the MAKEDEV script, or it failsto create the correct device,
you can use the following command:
mknod /dev/ppp c 108 0
Now we install the pppd daemon:
rpm --install ppp-2.4.0b2-2.i386.rpm
Remark: Problems have been reported withpackage ppp-2.4.0-2.i386.rpm, that is why I list a beta package here.
Remark: If installation of this package fails because PAMhas not been installed (for example on a SuSE 7.1), pleasedownload the source archive and compile the pppd by hand.

Installing PPPoE

First we install the ATM Package:
tar zxvf atm-0.78.tar.gz
cd atm
make
make install
Remark: In RH 7.0, this package will probably fail thecompiling process. Do not worry, we only need the header files.

Now we compile and install the br2684ctl utility,

cc -o br2684ctl brctl-010226.c -latm
cp br2684ctl /usr/sbin/
Make sure you do not have a pppd installed on your system. It will beoverwritten!
Now we install the pppd daemon:
tar zxvf ppp-2.4.0-pppoe4.tgz
cd ppp-2.4.0.pppoe4
./configure
make
make install
If you chose to use roaringpenguin PPPoE, please consult the included install instructions.

The Ninth Step: Configuring the system

Configuring the usb subsystem

Add the following line to /etc/fstab:
/dev/usb /proc/bus/usb/ usbdevfs defaults 0 0
This will mount usbdevfs at boot time.

Remark: If you are using mgmt version 1.3.1 orolder, you must mount is under /proc/bus/usb/
Version 1.3.2 will also look in /dev/usb/.
Remark: If this gives errors during booting, checkwhether /dev/usb is not already there. If it already exists, replace/dev/usb in the above line with /dev/invalid . The exact name does notmatter, as long as it does not exist.

To mount it now type:

mount -a

Configuring PPPoA

Edit the file /etc/ppp/options and replace its contents withthe following:lock
defaultroute
noipdefault
noauth
holdoff 4
maxfail 25
persist
asyncmap 0
lcp-echo-interval 2
lcp-echo-failure 7
name user@domain
user user@domain

plugin /usr/lib/pppd/plugins/pppoatm.so
0.38

These settings will cause pppd to check the link state and time out aconnection after 14 seconds if the link is broken. I chose this valuebecause If the ADSL line looses sync, it will take about 10seconds to resync.

Remarks:
You will need to replace the two 'user@domain's with your ADSLusername.

Also, in the above example '0.38' is the VPI/VCI ATM pairfor the author's provider. You will need to know what the correctvalues are for your provider, and substitute those. If these values areincorrect, you may sync, but will not be able to connect to your ISP'sIP layer, and probably be frustrated. These values can be obtainedfrom the Window's Alcatel client, your ISP or the FAQ

Edit the file /etc/ppp/chap-secrets and replace itscontents with the following:

# Secrets for authentication using CHAP
# client server secret IP addresses
user@domain * password
Now put the same contents in /etc/ppp/pap-secrets.

Remark: You will need to replace'user@domain' with your ADSL username and 'password' with your ADSLpassword.

Configuring PPPoE

Edit the file /etc/ppp/options and replace its contents withthe following:
lock
defaultroute
noipdefault
noauth
holdoff 4
maxfail 25
persist
asyncmap 0
name user@domain
user user@domain
lcp-echo-interval 2
lcp-echo-failure 7
plugin /usr/lib/pppd/plugins/pppoe.so
nas0
Drivers SpeedTouch USB ADSL PPPThese settings will cause pppd check the link state and to time out aconnection after 14 seconds if the link is broken. I chose this valuebecause If the ADSL line looses sync, it will take about 10seconds to resync.

Remark: You will need to replace the two 'user@domain'swith your ADSL username.

Edit the file /etc/ppp/chap-secrets and replace itscontents with the following:

# Secrets for authentication using CHAP
# client server secret IP addresses
user@domain * password
Now put the same contents in /etc/ppp/pap-secretsDrivers speedtouch usb adsl ppp setup.

Remark: You will need to replace the 'user@domain's withyour ADSL username and 'password' with your real password..

The Tenth Step: Running the driver

If everything went according to plan, the driver should start as soonas you plug in the SpeedTouch USB modem. If the driver is installedcorrectly, you will see the following sequence when plugging in themodem:
  1. Both LED's green for a very short period.
  2. Left LED is blinking, right LED is green.
  3. Left LED is green, right LED is green/red
  4. Left LED is green, right LED is blinking
  5. Both LED's are green.
In your /var/log/messages file or on your console you will seeat plugin:
Speedmgmt[1234]: Alcatel SpeedTouch USB Management daemonstarted.
Speedmgmt[1234]: (C) Alcatel 2001, Version 1.3.1
Remark: If you are not seeing the version number, you areusing version 1.3 and you MUST upgrade. The 1.3 version has a bug thatwill severely limit your upstream bandwidth.

At then end of the sequence when both LED's are green something like the following will appear:

Speedmgmt[1234]: Modem initialized at 1120 kbit/sdownstream and 128 kbit/s upstream
Remark: the numbers in the message are purely dependent onyour ISP and your subscription.

If you want to dial in to your ISP, do the following:
For PPPoE only:

br2684ctl -b -c 0 -a 0.VP.VC
Remark: VP and VC are to be replaced with the VP/VC values ofyour ISP. You will need to know what the correct values are foryour provider, and substitute those. If these values are incorrect, youmay sync, but will not be able to connect to your ISP's IP layer,and probably be frustrated. These values can be obtained from theWindow's Alcatel client, your ISP or the FAQ

For PPPoE and PPPoA:

pppd
You can check your /var/log/messages to see if everything went ok.

For PPPoA this should be something like this:

pppd[1234]: Plugin /usr/lib/pppd/plugins/pppoatm.so loaded.
pppd[1234]: PPPoATM plugin_init
pppd[1324]: PPPoATM setdevname_pppoatm
pppd[1324]: PPPoATM setdevname_pppoatm - SUCCESS
pppd[1235]: pppd 2.4.0b1 started by root, uid 0
pppd[1235]: Using interface ppp0
pppd[1235]: Connect: ppp0 <--> 0.38
pppd[1235]: local IP address xxx.xxx.xxx.xxx
pppd[1235]: remote IP address yyy.yyy.yyy.yyy
For PPPoE this gives something like:
pppd[1234]: PPPoE Plugin Initialized
pppd[1235]: pppd 2.4.0 started by root, uid 0
pppd[1235]: Sending PADI
pppd[1235]: HOST_UNIQ successful match
pppd[1235]: HOST_UNIQ successful match
pppd[1235]: Got connection: 3b8
pppd[1235]: Connecting PPPoE socket: 00:90:1a:10:11:bd b803 nas00x807bdc0
pppd[1235]: Using interface ppp0
pppd[1235]: Connect: ppp0 <--> nas0
pppd[1235]: local IP address xxx.xxx.xxx.xxx
pppd[1235]: remote IP address yyy.yyy.yyy.yyy

Drivers Speedtouch Usb Adsl Ppp Setup

Congratulations! You are online!
Remark: If ppp refuses to connect, please consult the Linux PPP HOWTO.

Appendix A: Troubleshooting

When I plug in my modem, nothing happens.

Check whether hotplugging is working. If you plug in a USB device, theconsole should give something like:

/sbin/hotplug: arguments (usb) env (PWD=/etc/hotplugHOSTNAME=infinty DEVICE=/proc/bus/usb/001/002 ACTION=remove DEBUG=yesMACHTYPE=i386-redhat-linux-gnu OLDPWD=/ DEVFS=/proc/bus/usb TYPE=9/0/0SHLVL=1 SHELL=/bin/zsh HOSTTYPE=i386 OSTYPE=linux-gnu HOME=/ TERM=dumbPATH=/bin:/sbin:/usr/sbin:/usr/bin PRODUCT=451/1446/100 _=/usr/bin/env)

If this is not happening, check whether hotplugging was enabled inthe kernel.

If the LED's of the modem do not start their sequence, check whetherthe usb subsystem is started.

lsmod
This command should return something like:
Module Size Used by
speedtch 10128 2 (autoclean)
uhci 18496 0 (unused)
usb-ohci 16160 0 (unused)
If the uhci or usb-ohci is missing, try modprobing them:
modprobe uhci
modprobe usb-ohci
Remark: You will need only one of them to get thingsworking!

If modprobe complains about not finding the modules, go back to thesection about configuring the kernel, verify the configuration of theUSB subsystem. If nothing is wrong, go the section of making the kerneland rerun:

make install
make install_modules
reboot
If this is all ok, check whether mgmt is running.
ps -ef | grep mgmt
This should return a line like:

root 3215 1 0 19:41 ? 00:00:00/usr/sbin/speedmgmt

If it does not, then check your /var/log/messages.
If this shows something like:

kernel: usb.c: registered new driver Alcatel SpeedTouch USB
Speedmgmt[1234]: Alcatel SpeedTouch USB Management daemon started.
Speedmgmt[1234]: (C) Alcatel 2001, Version 1.3.1
Speedmgmt[1234]: bulk_write: Invalid argument
Speedmgmt[1234]: bulk_read: Invalid argument
Speedmgmt[1234]: bulk_write: Invalid argument
Speedmgmt[1234]: bulk_read: Invalid argument
Speedmgmt[1234]: USBDEVFS_SUBMITURB: Invalid argument

Then you forgot to mount usbdevfs on /proc/bus/usb/!
Check whether you added the line to /etc/fstab. If you have,type:

mount -a
If this does not work, check whether you have enabled the usbdevicefilesystem in you kernel configuration.

When I plug in my modem, the LED sequence finishes ok, but Icannot log on.

Check your console or /var/log/messages file to see when ppp says.
If it says something like this:

pppd[1234]: LCP: timeout sending Config-Requests

Go to /proc/net/atm and do:

cat '/proc/net/atm/speedtch:0'
If this file is not there, the speedtouch module is missing. Repeat step 5.

Drivers Speedtouch Usb Adsl Ppp Router


The output should be something like:
Speed Touch USB (usb-00:10.1-2)
MAC: 00:90:d0:2c:2c:5a
AAL5: tx 25599 ( 0 err ), rx 37419 ( 0 err, 0 drop )
Line up, firmware loaded
If the numbers are all 0's, the ppp daemon is wrongly configured and itis not sending data to the modem.
If the numbers are NOT zero, check whether you have used the correctVP/VC settings and the correct protocol!

When I plug in the modem the LED sequence stops when the left oneis green and the right one is red/green.

You are using the Alcatel managment tool Version 1.3.2, which does notwork correctly. Please upgrade to 1.3.3 or a more recent version.

When I plugin my modem, the LED sequence never goes beyond steptwo and the syslog gives something like:

Speedmgmt[1234]: Alcatel SpeedTouch USB Management daemonstarted.
Speedmgmt[1234]: (C) Alcatel 2001, Version 1.3.3
kernel: usb_control/bulk_msg: timeout
Speedmgmt[1234]: bulk_write: Connection timed out
kernel: usbdevfs: USBDEVFS_BULK failed dev 3 ep 0x5 len 991 ret -110
kernel: usb_control/bulk_msg: timeout
Please install the Alcatel management tool version 1.3.4 or later.

When I plug in the modem and it reaches sync, the system hangs.

Sounds like a bug in the kernel module. Pleasesend details and system logs to the mailing list.

The connection comes up, but it is very slow, especially upstream.

Upgrade your mgmt module to the latest version.

Everything seems to work ok, but ppp refuses to connect.

Please consult the LinuxPPP HOWTO.

pppd connects fine, but when I try to reach webpage, it doesn'twork.

You can try two things.
First, try to add the following option to your /etc/ppp/optionsfile.

usepeerdns
OR figure out the dns server of your provider (see Windows).
and edit your /etc/resolv.conf file.
It should look something like:
nameserver
nameserver aaa.bbb.ccc.ddd
nameserver eee.fff.ggg.hhh
with aaa.bbb.ccc.ddd and eee.fff.ggg.hhh mathcing the ipaddresses of your providers primary and secondary dns.
Remark: If you have only one ip address, just leave out thesecond line.

Appendix B: Some possible tweaks

Running without hotplugging.

It is entirely possible to run this driver without using thehotplugging package. You can then disable the kernel option andnot install the hotplugging package.
If you wish to do this, you have to insert the speedtch.o module byhand and start the mgmt daemon by hand.
modprobe speedtch.o
/usr/sbin/speedmgmt &
There are no real rules. Just make sure you insert the module beforethe line is in sync. From speedmgmt version 1.3.3 onwards, it no longermatters when you insert the kernel module.

Automatically dialing in at modem plugin.

It is possible to have your system automatically dial in when yourmodem is plugged in.
To do this you will have to edit the /etc/hotplug/usb/speedtouchfile.
For PPPoA it should look something like:#!/bin/bash

# configuration and startup-script for the Alcatel SpeedTouch USBmodem

case $ACTION in

add)

# start
mesg SpeedTouch Inserting module.
modprobe -k speedtch

mesg SpeedTouch Attempting to start management deamon
/usr/sbin/mgmt &

# allow the modem to come into sync.
sleep 20;

# startup pppd
pppd
;;

remove)
killall mgmt
;;
esacFor PPPoE It should be something like:#!/bin/bash

# configuration and startup-script for the Alcatel SpeedTouch USBmodem

case $ACTION in

add)

# start
mesg SpeedTouch Inserting module.
modprobe -k speedtch

mesg SpeedTouch Attempting to start management deamon
/usr/sbin/mgmt &

# allow the modem to come into sync.
sleep 20;

# startup pppd
br2684ctl -b -c 0 -a 0.VP.VC
pppd
;;

remove)
killall mgmt
;;
esacRemark: don't forget to adjust the VP/VC values!

Important: There is a catch here though. The hotpluggingsystem does not yet support remove events. This means you will have tokill your pppd or br2684ctl utility by hand otherwise you have problemswhen plugging the modem in again.

Appendix C: Links

The following links can prove useful:
  • There is a FAQ available.
  • Some other HOWTO's are also available:
  • SuSe has a SpeedTouchwebpage.
  • The SpeedTouchKernel Homepage

Appendix C: Credits

This HOWTO was based on the mini-HOWTO's of Chris Jones and Pedro Ramos Silva.
Words shall not be hid, nor spells be buried; might shall not sink underground,though the mighty go. - The Kalevala
This is the stable version, checked on 18 August 2018.
Accuracy: Spot checked by staff Detail: Needs improvement Readability: Needs improvement

The Thomson Speedtouch USB modem provides a very low cost way of getting a native IPv6 connection running over PPPoA, giving you the full 1500 Byte MTU. They can be bought second hand on eBay for £5 to £10.

My configuration is based on a Linksys NSLU2 running Debian Squeeze (testing). However, any Debian (or Ubuntu) box should work fine, and I am not aware of anything in this configuration that would not work in Debian Lenny (stable).

Debian on the NSLU2

The NSLU2 has the advantage of running on very low power (<5W) and silently. A Sheevaplug or similar would be a good alternative. An excellent guide to installing Debian on the NSLU2 (and Sheevaplug) can be found on Martin Machlmayr's site.

Configuring the Speedtouch modem

Configuring the Speedtouch modem on recent versions of Debian is straightforward. Firstly, you need to obtain the USB firmware for the Modem. I obtained my copy here. Other possible locations and more comprehensive guide to setting up the Speedtouch USB modem on Ubuntu (or Debian) can be found here.

Download the firmware and unpack it:

# wget http://ftp.linux.it/pub/People/md/warez/speedtouch-firmware.tgz
# tar -xvzf speedtouch-firmware.tgz

The files you have just unpacked are driver files for the modem. They are architecture independent, so whether you're using an ARM based system like the NSLU2 or an x86 box doesn't matter. However, the files you use do depend on the version of the modem you have. My modem is the silver v4 variant, and the files ending in '.4' were the versions I needed. So, for example:

# cp firmware/speedtch-1.bin.4 /lib/firmware/speedtch-1.bin
# cp firmware/speedtch-2.bin.4 /lib/firmware/speedtch-2.bin

Next, install the necessary ppp and atm libraries:

# apt-get install ppp libatm1

Configuring the ADSL Connection

Copy the example ADSL configuration file for PPPoA to the /etc/ppp/peers directory and call it aaisp:

# cp /usr/share/doc/ppp/examples/peers-pppoa /etc/ppp/peers/aaisp

Next, edit /etc/ppp/peers/aaisp for the aaisp connection. Change the username near the top of the file to your aaisp username, so the line should read (for example):

user 'myusername@a.1'

The VPI and VCI need to be replaced with the values in use in the UK (0 and 38 respectively), so replace the existing line with:

0.38

The rest of the file worked OK for my configuration.

You'll also need to edit the /etc/ppp/chap-secrets file to include your aaisp username and password. So your file would include something like:

'myusername@a.1' '*' 'mypassword'

IPv6 Configuration

Again in /etc/ppp/peers/aaisp, you need to add a line to the file to tell it to bring up ipv6. The addresses after the ipv6 option are the link local addresses, and are not related to the ipv6 address range for aaisp. So just use something like ::1 and ::2 unless you've reason to do otherwise. Just add a line to the file:

ipv6 ::1,::2

When ppp is started, if ipv6 comes up correctly, any files in the /etc/ppp/ipv6-up.d/ directory will be run. Create a file and call it, say, /etc/ppp/ipv6-up.d/start-ppp0-ipv6. This file holds the ipv6 range given to you by aaisp. You'll also need to tell it that the default route is through the new ppp link as this doesn't seem to happen automatically when ppp is started. Include the following lines in the file:

Replacing xxxx by the appropriate address given to you by Andrews & Arnold. You'll need to chmod 755 the file you just created so that it can be executed when ppp comes up.

This should be everything you need to bring up ADSL and ipv6. Keep your fingers crossed and type:

# pon aaisp

You'll also probably want to execute this command when the system starts. I included it in /etc/rc.local (as /usr/bin/pon aaisp). I'm not entirely happy with this, as there may be an issue with timing and debian reaching rc.local before the modem is fully initialised, but it's always worked fine for me. More elegant suggestions are welcome.

ifconfig should now show a ppp0 connection with the ipv4 address allocated automatically, and the newly configured ipv6 address.

LAN configuration

On the LAN side of your Linux box you want to configure a LAN address. This will usually be a different subnet. In my case, I chose 2001:8b0:xxxx:1::/64. Edit /etc/network/interfaces, and include the following lines (assuming your LAN interface is eth0):

Also, install and configure radvd if you wish to advertise the appropriate ipv6 subnet on the LAN.

Firewall

You'll probably also want to ensure your LAN is protected from the big bad internet by a firewall. I did this by including two files in /etc/network/if-up.d/.

Here's my iptables for ipv4 (/etc/network/if-up.d/iptables):

And here's the slightly simpler ip6tables (/etc/network/if-up.d/ip6tables):

Finally don't forget to chmod +x these two files to ensure they'll execute when the interfaces come up.

Retrieved from 'http://support.aa.net.uk/index.php?title=IPv6_SpeedTouch&oldid=13478'