Using the Telstra-supplied USB Ethernet Adaptor

Update 27/04/02

Nothing major to say, just minor updates. I know this page is linked from all sorts of places, so I thought I'd at least update it a bit to make things a bit more accurate.

As you may have guessed, I've now got Optus@Home, and as such am no longer active in the bigpond newsgroups, and couldn't be even if I wanted to. Use e-mail for any questions - many do, and I'm still quite happy to help out where I can.

Update 24/05/01

Many thanks to Jason Holt (jason[at]lunkwill[dot]org) for providing an update to this page while I haven't had the time to do it myself. He's added some information about his experiences with the 2.2 kernel, basically saying "don't bother".

I don't have access to cable at the moment, so anyone willing to donate bandwidth would be my friend for ever :) Also, my machines and environment have moved on quite a bit from when this was originially written, but I'm sure you get the gist of it.

What?

The little box I have calls itself a SMC EZ Connect USB Fast Ethernet Adapter 2202USB/ETH, and linux identifies it as a SMC 202 USB Ethernet.

Why?

For the many poor souls who signed up for Telstra's cable 'service', you may have decided to do a clever thing. This clever thing is noting that on the sign-up page, Telstra values all of their provided adaptors (PCI, ISA, USB) at the same, highly-ridiculous price of $100 (or at least they did when I signed up in April 2000). The clever person then proceeds to realise that a PCI 100MB adaptor is worth about $20, while the USB adaptor closer to $80 or so.

Being the economist that I am, I decided to get the USB one, even though it was intended for a Linux box, which, by definition has little or no USB support. I had plenty of PCI ones around, so I'd just keep the USB as a spare.

After getting Bigpond, I started been spending more time on the newsgroup bigpond.broadband.tech.linux, and a very common question was 'How do I get the USB network adaptor to work with Linux?'. The answer, in round terms, I had posted several times, and since decided to make it into this web page. Last I knew, it was listed in the Meta-FAQ that gets posted now and again.

Note that what I describe here was on my internal network, NOT to talk to the cable modem. This is primarily because my OpenBSD firewall machine was too old to have USB ports, even though OpenBSD supports it. This document refers to my linux workstation, trane:

System

Here's the box that this worked on last time I tested it (note that I haven't tested it for quite a while and my system has moved on):

First and Foremost

Are you a linux newbie? Are you scared of re-compiling kernels? Don't know how to make lilo do what you want it to do? STOP RIGHT NOW. Go and buy a PCI network card for the aforementioned cheap price, and save yourself a LOT of hassle. Even though I have worked all this out, I don't use my USB adaptor for several reasons:

If you're still determined to make the most of what you have, read on.

Kernel re-compile

The standard kernel that you have which you got on day one on your distro's CD isn't going to cut it here. For example, RedHat 7.0's USB support is only support for Human Interface Devices - ie. Mouses and Keyboards, so you're going to be up for a re-compile no matter what. You should get the latest 2.4 release. It has the latest code and it's what I've tried.

As of kernel release 2.2.18, the full 2.4 USB backport was applied as a permanent part of the kernel. The driver for the SMC adapter is included with the sources, just as with the 2.4 kernels, but at least one person tried to get it to work without success. It worked up to the point of receiving broadcast ethernet packets and sending normal packets, but woulnd't receive packets addressed to it. Switching to a 2.4 kernel made it work.

Do a 'make menuconfig' (or equivalent), and select the following options (from 2.4.1):

And of course enough other TCP/IP, etc. to make things all good. If you can't work this out, mail me, but perhaps you should quit while you still can :)

Now, to 'make dep; make clean', then 'make bzImage; make modules; make modules_install'. Then, get lilo to talk to the new kernel and reboot.

Setup

Here, I have to get a bit RedHat specific, because that's what I initially set this up with.

As root, fire up 'netconf', and under 'basic host information', disable any existing adaptors, and then go to the first empty slot (in my case, adaptor 2). Enter the requred information, putting your allocated IP address, etc., the net device (eth0 or eth1), and importantly, 'pegasus' under 'kernel module'.

Before you exit, check under 'Routing and Gateways' that all is well, as my machine had problems trying to understand where to send packets when it had 2 NICs in the machine

Then click 'Accept', 'Quit', 'Activate the Changes'

Next, do 'ifconfig' and use 'ifdown' on any currently active interfaces, followed by an 'ifup' on the name which you chose for the pegasus device just a minute ago (eth1, for example).

Run a 'lsmod' to make sure that the pegasus module got loaded correctly, assuming that you compiled it as a module.

Try pinging things by IP Address. I found that this worked first, then only after re-checking my routes in netconf did I get the DNS to work properly. If you have this problem, use 'route' to tell if you have a default route available, which should point to your firewall. You do have a firewall, don't you? :)

What it should look like

Well, things do look a little weird, but it works. Your numbers will differ, of course.

[root@trane /root]# dmesg | grep pegasus pegasus.c: pegasus.c: v0.4.17 2000/11/13 (C) 1999-2000 Petko Manolov (petkan@dce.bg) usb.c: registered new driver pegasus pegasus.c: eth1: SMC 202 USB Ethernet pegasus.c: eth1: link NOT established (0x7849) - check the cable. pegasus.c: eth1: set Rx mode pegasus.c: eth1: set Rx mode pegasus.c: eth1: set Rx mode pegasus.c: eth1: set Rx mode [root@trane /root]# ifconfig eth1 eth1 Link encap:Ethernet HWaddr 00:E0:29:XX:XX:XX inet addr:192.168.16.5 Bcast:192.168.16.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:413 errors:0 dropped:0 overruns:0 frame:0 TX packets:474 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 [root@trane /root]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.0 * 255.255.255.0 U 0 0 0 eth1 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default sonny.reverb.co 0.0.0.0 UG 0 0 0 eth1

That's it!

That summarises what I had to do to get my adaptor working, and it's humming along nicely as I type this. I'll shortly be reverting to my standard PCI nic, for the reasons discussed above.

Do let me know how you got on with this, if you have better ideas, or I made a glaring error.

But umm.... errr.... It doesn't work

Firstly - relax. This isn't supposed to be an easy task - remember I suggested the PCI version is a much better idea, you're working with development code, on a non-Telstra supported operating system. Life wasn't supposed to be easy - get a mac if you want that :).



Back to my hardware page.