Sunday, January 20, 2008

DSL on Linux

I've been using QualityNet's silver Speedtouch 330 modem for the past 4 years on Linux, and it wasn't an easy task setting it up back then.

I don't like using routers because I don't have much control over them and limited to their restrictive functionality. I have a computer at home running as a gateway, on which I share my Internet connection with the rest of computers on the network.

[i] Internet provided over telephone lines (DSL) use PPP over ATM (PPPoA), where Internet over Fiber use PPP over Ethernet (PPPoE). Even if your ISP tells you to get a PPPoA router, and you have a fiber connection to your house, get a PPPoE and put your fingers in the technicians eyes!!!

Today, I wanted to run my HP ThinClient as gateway at home, instead of my old noisy & power-hungry Pentium4 box. I have Slax as my Linux distribution, using kernel 2.6.16, which according to Linux's Speedtouch FAQs, has built-in features to run the USB ADSL modem! This saves me the pain I had to go through last time on kernel 2.4!

On this page, you'll find the instructions, which I skipped to the part: "The Firmware" -- This is where all the fun begins!

[i] I had to download the firmware & its extractor on my current P4 box, because Slax doesn't have gcc, which means, you can't compile!

[i] If you don't have an existing Linux machine which has gcc, I suggest you download Knoppix, compile on the CD, then copy the 2 .BIN and the file "Makefile" to a USB flash disk. Open the Makefile file in a text editor and see where & how the files are supposed to go.

Create a file, in /etc/ppp, called "pap-secrets" and put the following inside it (including the double quotes!):
"username" "*" "password"

Moving to the next section: "Secrets" -- use the same settings as shown in the green field in the guide, but make sure to replace 2 things:
0) User should be in the form: "user" without the @isp part
1) Replace 0.00 with 8.35; these are the VPI.VCI values used in Kuwait, by the ISP.
Your "/etc/ppp/peers/speedtch" should contain the following:
user "username"

Almost done! What's left now, is to set the thing to automatically dial when it boots; for that, edit the file "/etc/rc.d/rc.local" and add this line:
`which pppd` call speedtch

Note: The characters surrounding "which pppd" are grave accents, not single quotes.

[i] On kernels 2.4.x & pre 2.6.10, the modem needed to be initialized, which took 37 seconds. Now, the modem starts the handshaking process with the ISP immediately.

No comments: