matt@consultmatt.co.uk
Greg Ferguson - Converted the mini-HOWTO from HTML to Docbook 3.1 (SGML).
2002-03-26
| Revision History | ||
|---|---|---|
| Revision v0.29 | 2002-03-26 | Revised by: mww |
| Added a small bit of first-hand tech support about cross-frequency. | ||
| Revision v0.28 | 2002-01-17 | Revised by: mww |
| New information about PPPoATM involving kernels and distibutions. | ||
| Revision v0.27 | 2001-12-20 | Revised by: mww |
| Minor technical problems highlighted by Robert Smith. | ||
| Revision v0.26 | 2001-11-21 | Revised by: mww |
| Added a point about the Kernel HOWTO. | ||
| Revision v0.25 | 2001-11-17 | Revised by: mww |
| Added a troubleshooting answer about "_mmx_memcpy". Other minor updates as well. | ||
| Revision v0.24 | 2001-11-09 | Revised by: mww |
| Technical detail with the chatscript timeout (and found a spelling mistake or two!). Thanks again to Bill Staehle. | ||
| Revision v0.23 | 2001-11-07 | Revised by: mww |
| Changed the Chatscript dialing method, thanks go to TonyC from btinternet.linux newsgroup. | ||
| Revision v0.22 | 2001-11-06 | Revised by: mww |
| Changed a couple more little botches. Thanks again go to Bill Staehle. | ||
| Revision v0.21 | 2001-11-03 | Revised by: mww |
| Changed discrepancies reported by Bill Staehle. | ||
| Revision v0.20 | 2001-11-01 | Revised by: mww |
| Added Alcatel Speedtouch Information. | ||
| Revision v0.19 | 2001-10-31 | Revised by: mww |
| Initial public release. | ||
This document is Copyright 2001 by Matt Wright. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html
Send feedback to matt@consultmatt.co.uk.
Please note: There is a mailing list available for this howto. If you wish to join please email <majordomo@consultmatt.co.uk> with the body:
subscribe bti-howto
This will then be followed up by the mailing list bot and subsequent emails should arrive confirming your request. The list is intended to be for annoucing changes to this HOWTO and also to dicuss the finer points of getting pppd to work on BTinternet.
My name is Matt Wright. I'm 16 year-old student in Blackburn, Lancashire. I'm a freelance Linux consultant. I am the proud owner of a Duron 950Mhz (all I could easily afford) with 256MB SDRAM, Voodoo 4 Video Card, ATI All-in-Wonder Pro Video Card. I also have a 266Mhz Cyrix that runs my USB ADSL connection, of which if you are reading this from http://www.consultmatt.co.uk you will be using.
You can find me at www.consultmatt.co.uk. Or at matt@consultmatt.co.uk.
The following is needed to use this HOWTO:
A working modem, external or internal hardware modems are the easiest to get working, see Modem-HOWTO. If you have a WinModem then see Winmodems and Linux HOWTO
An account with Btinternet, this HOWTO covers BTi Surftime and Anytime
Some basic understanding of the Linux OS and its layout
"" "ATZ" # The next two lines should be left commented out until # the script works. # "OK" "ATL0" # "OK" "ATM0" SAY "Dialing modem...\n" "OK" "ATDT \T" ABORT BUSY ABORT "NO CARRIER" TIMEOUT 60 CONNECT \c |
# Secrets for authentication using CHAP # client server secret IP addresses |
# Secrets for authentication using CHAP # client server secret IP addresses "bloggs@btinternet.com" * "mypasswordhere" |
lock |
And thats it, now we need to add some more settings in here so make it look like:
lock usepeerdns defaultroute noipdefault noauth asyncmap 0 crtscts modem 115200 |
ttyS0 connect '/usr/sbin/chat -v -TSURFTIME_NUMBER_HERE -f /etc/ppp/chatscript' updetach name bloggs@btinternet.com |
ttyS0 connect '/usr/sbin/chat -v -TDAYTIME_NUMBER HERE -f /etc/ppp/chatscript' updetach name bloggs@btinternet.com |
Change any of the filenames to suit what you called them and the username. Do the same with this:
#!/bin/bash
# a script to dial BTi
case "$1" in
daytime)
/usr/sbin/pppd call bt-day
;;
surftime)
/usr/sbin/pppd call bt-surf
;;
off)
killall pppd
;;
esac |
Once you've done that run this command at the command prompt:
Now you've done, simply type internet daytime/surftime/off and it will connect you to the internet.
There is rather a large amount of credit due here, to Chris Jones for writing the Alcatel Speedtouch USB ASDL Modem mini-HOWTO that is now part of the DSL HOWTO. This helped me a great deal when trying to get my Speedtouch to work.
You must have the kernel source installed and know the procedure for installing and compiling a new kernel. If this is a problem then read the Kernel HOWTO.
You must be running one of the following Kernels: 2.3.39, 2.4.0-test4, 2.4.1-pre7, 2.4.7, 2.4.8-pre5. This is because the PPPoATM patch for the kernel exists patched against specific kernels, some may work with similar kernel versions but I cannot vouch for that
You, obviously, need a USB controller of some description with at least one free plug. It also must be Linux compatible, nowadays this is most USB controllers that are UHCI/OHCI based. If you don't have one your local supplier would probably have a PCI USB Controller.
A heap-load of confidence with meddling with your config. eg: kernel recompiling, program installation...
The kernel patch for your kernel. They can be found at http://www.kernel.org/pub/linux/kernel/people/axboe/PPPoATM/. Please note not all the kernels have patches.
The latest SpeedTouch driver from http://sourceforge.net/project/showfiles.php?group_id=3581
The latest SARlib library from http://sourceforge.net/project/showfiles.php?group_id=22221
The Alcatel speed management software. You can get it from http://www.alcatel.com/consumer/dsl/dvrreg_lx.htm. I can't distribute this because of Alcatel's licensing scheme so get it from them.
Some description of PPPoATM aware PPPd binary:
Red Hat 7 RPM (glibc 2.2): http://sourceforge.net/project/showfiles.php?group_id=23818
Debian (.deb): http://sourceforge.net/project/showfiles.php?group_id=23818
Tarball: http://sourceforge.net/project/showfiles.php?group_id=23818
The Linux Hotplug software from http://linux-hotplug.sourceforge.net. Get it installed as per their instructions. It seemed simple enough so I won't cover it here
Next we will need to test-patch the kernel using the following commands:
patch -p1 -s -E --dry-run < /point/to/pppoatm-2
If that ran without failure then patch the kernel by removing the --dry-run as such:
patch -p1 -s -E < /point/to/pppoatm-2
Code maturity levels->Prompt for development and/or incomplete code/drivers
Network device support->PPP (point-to-point protocol) support
USB support->Preliminary USB device filesystem
You have to make a choice here, if your USB controller is UHCI based then select:
USB support->UHCI (Intel, PIIX4, VIA, ...) support
USB Support->OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support
In the /etc/ppp directory there is a file called options in that file put the following:
lock defaultroute noipdefault noauth passive asyncmap 0 name bloggs@hg5.btinternet.com user bloggs@hg5.btinternet.com plugin /usr/lib/pppd/plugins/pppoatm.so 0.38 |
Make sure of the following things:
Next in your /etc/ppp/chap-secrets put:
# Secrets for authentication using CHAP # client server secret IP addresses "bloggs@hg5.btinternet.com" * "mypasswordhere" |
mount none /proc/bus/usb -tusbdevfs
Speedmgmt[2074]: Modem initialised at 576 kbit/s downstream and 288 kbit/s upstream |
Once the modem has been init'ed now make sure the PPPoATM module is loaded by doing:
Now start the PPP link by typing pppd You should see something similar to this:
Oct 28 14:01:25 ds9 pppd: PPPoATM plugin_init Oct 28 14:01:25 ds9 pppd: PPPoATM setdevname_pppoatm Oct 28 14:01:25 ds9 pppd: PPPoATM setdevname_pppoatm - SUCCESS Oct 28 14:01:26 ds9 pppd: Using interface ppp0 Oct 28 14:01:26 ds9 pppd: Connect: ppp0 <--> 0.38 Oct 28 14:01:28 ds9 pppd: local IP address 255.255.255.255 Oct 28 14:01:28 ds9 pppd: remote IP address 255.255.255.255 Oct 28 14:01:28 ds9 pppd: primary DNS address 213.120.62.100 |
To allow sharing of your internet conenction you can eitehr use a proxy server or IP Masquerading. I'll cover IP Masquerding as it's simple to set up on the other client machines. I use a 2.4.x generation kernel and in effect I use IPTables. If you use a 2.2.x or 2.0.x kernel then you need the IP Masquerading HOWTO.
This part of the HOWTO assumes that your Netfilter software is modularised, if it isnt then no big deal, either ignore the modprobe lines or recompile your kernel.
Simple now, just run the commands:
modprobe iptable_nat
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o ppp0 -s 10.0.0.0/16 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
Note: The space between 1 and > is vital. It seems not to activate the IP Forwarding if the space is not there.
Change the ppp0 and/or the 10.0.0.0/16 for your relevant network settings and put that file either before the case "$1" in in the internet file or somewhere in your startup.
Problem: Lynx is unable to access document or ping gives "No route to host" but the link is stable!
route del default route add default gw $4 $1 |
Problem: Your kernel below 2.4.2 crashes using the Alcatel driver.
Solution: You're probably using a kernel compiled with SMP support either don't use SMP or try here: http://sourceforge.net/project/showfiles.php?group_id=23818
Problem: When PPPd attempts to access the ATM device it crashes.
Configured the kernel module support to ignore kernel version checking
Recompiled SARlib (this is what ultimately fixed it) before recompiling speedtch.o