It is possible to add a number of external USB Ethernet adapters to the slug and make it act like a router. This is a brief HowTo on connecting one directly to the slug, but via a hub one can connect many.
If you do want to connect a USB ethernet adapter, there are various chipsets available:
- Pegasus based (e.g. Philips CPWUE01/00) (kernel-module-pegasus)
- AX8817X based (e.g. Netgear FA120, LINKSYS USB200M-DE (Version 1 only)) (kernel-module-usbnet)
- (July 2006 - D-Link DUB-E100 upto rev A4 also use this chipset the newer Rev B1 is not working due to chipset changes - see details here http://www.uwsg.iu.edu/hypermail/linux/kernel/0607.0/0738.html)
- (February 2008 - D-Link DUB-E100 rev B1 confirmed working in Debian/lenny with kernel version: 2.6.22-3. Rev B1 is based on AX8877X chipset. The modules "asix.ko" and "usbnet.ko" have to be built from the kernel-source. (manually build module, see below). E-mail: gamanakis_at_hotmail.com)
- (January 2010 - Linksys USB200M? has been revised, version 2.0 and 2.1 (version number appears on the back of the device) use the AX88772? chipset, for which no Linux 2.4 drivers are available (a backport from 2.6 exists for the TiVo? but doesn't compile for Unslung on my setup). Got myself an old Sitecom LN-013 using RTL8150? instead, works fine.)
- kaweth based (e.g. 3Com 3C19250 USB) (kernel-module-kaweth)
- RTL8150 based (e.g. Sitecom LN-013, Linksys USB100M?) (kernel-module-rtl8150)
- MCS7830 based (e.g. delock) (manually build module, see below)
Instructions for most chipsets are similar to the pegasus example below.
specific chipset instructions
Basic example: Pegasus chipset
- Getting the software:
ipkg install kernel-module-pegasus
- Hook up you USB Ethernet adapter to your slug
- Go to /opt/lib/modules (Unslung) or /lib/modules (other OSes) (exact: /lib/modules/2.4.22-xfs/kernel/drivers/usb/pegasus.o)
- find pegasus.o or pegasus.ko in this directory; Do "
insmod pegasus.o" or "
insmod pegasus.ko" (as appropriate)
- Now the device eth1 should be created. Do "
ifconfig -a" to verify the presence of an inactive network adapter. (eth0 is the built-in network controller)
- Now you can do things like "
ifconfig eth1 up 10.0.1.114" and so on - it is an active Ethernet device.
- update your routing tables as you see fit
- Unslung: add a line in /opt/etc/modules :
pegasus alias eth1
- SlugOS: add a line in /etc/modutils/modules (creating the file if needed:
pegasus alias eth1; then run
for debianslug and AX8817X based devices you might also need the "asix" module.
ipkg install kernel-module-ax8817x
Also some of the above modules may complain re mii errors on loading.
ipkg install kernel-module-mii
On a Debian system do the following as root on the nslu2 (be patient, it has a slow processor):
The "linux-source" has to be in accordance with "uname -r".
Getting the linux kernel source:
apt-get install linux-source
tar xjvf /usr/src/linux-source
Configuring the kernel to match the one currently installed:
cp /boot/config-$(uname -r) .config
cp /lib/modules/$(uname -r)/build/Module.symvers /usr/src/linux
Compiling the asix.ko and usbnet.ko modules:
make -C /usr/src/linux SUBDIRS=$PWD modules
Installing the modules and loading them:
cp asix.ko /lib/modules/$(uname -r)/kernel/drivers/net/usb/asix.ko
delock usb 2.0 ethernet adapter: MCS7830
I got a "delock usb 2.0 ethernet adapter" working on debianslug (http://delock.de/produkte/gruppen/USB+Adapter/USB_20_Ethernet_Adapter_61147.html)
I thought it used the asix chipset when I bought it. But it turns out it doesn't.
lsusb shows "
ID 9710:7830 MosChip Semiconductor".
The chip is a mcs7830 (see http://www.moschip.com/html/MCS7830.html).
The moschip site has linux drivers. You need to compile or crosscompile them yourself.
- You need to have "gcc" and "glibc6-dev" installed on debianslug, as well as the kernel source.
- Extract the driver downloaded from the moschip site
- Edit the Makefile that comes with it: change "
KDIR := /lib/modules/$(shell uname -r)/build" to "
KDIR := /usr/src/<your kernel tree>"
- Compile the driver:
- Load it:
ifconfig -a" should show your device appears as "usb0"
Davcom DM9601? USB to Ethernet bridge
This chipset is used in some Chinese "USB LAN" adapters. On Debian etch, I did apt-get install linux-headers-2.6.18-4-ixp4xx and then downloaded www.silencio.ro/DM9601?.GZ (which is actually a .tar.gz file), typed make, and then typed insmod dm9601.ko (while the dm9601.ko file was in the current directory) and it worked.