LDP/LDP/retired/BTI-PPP.sgml

883 lines
34 KiB
Plaintext

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
<article>
<artheader>
<title>BTinternet pppd mini-HOWTO</title>
<author>
<firstname>Matt</firstname>
<surname>Wright</surname>
<affiliation>
<orgname><ulink url="http://www.consultmatt.co.uk">Matt Wright Consulting</ulink></orgname>
<address>
<email>matt@consultmatt.co.uk</email>
</address>
</affiliation>
</author>
<othercredit role="converter">
<firstname>Greg</firstname>
<surname>Ferguson</surname>
<contrib>Converted the mini-HOWTO from HTML to Docbook 3.1 (SGML).</contrib>
</othercredit>
<pubdate>2002-03-26</pubdate>
<revhistory>
<revision>
<revnumber>v0.29</revnumber>
<date>2002-03-26</date>
<authorinitials>mww</authorinitials>
<revremark>
Added a small bit of first-hand tech support about
cross-talk. Thanks goto Bill Staehle once again for typing,
technical and grammar points.
</revremark>
</revision>
<revision>
<revnumber>v0.28</revnumber>
<date>2002-01-17</date>
<authorinitials>mww</authorinitials>
<revremark>
New information about PPPoATM involving kernels and
distibutions.
</revremark>
</revision>
<revision>
<revnumber>v0.27</revnumber>
<date>2001-12-20</date>
<authorinitials>mww</authorinitials>
<revremark>
Minor technical problems highlighted by Robert Smith.
</revremark>
</revision>
<revision>
<revnumber>v0.26</revnumber>
<date>2001-11-21</date>
<authorinitials>mww</authorinitials>
<revremark>
Added a point about the Kernel HOWTO.
</revremark>
</revision>
<revision>
<revnumber>v0.25</revnumber>
<date>2001-11-17</date>
<authorinitials>mww</authorinitials>
<revremark>
Added a troubleshooting answer about "_mmx_memcpy". Other minor updates as well.
</revremark>
</revision>
<revision>
<revnumber>v0.24</revnumber>
<date>2001-11-09</date>
<authorinitials>mww</authorinitials>
<revremark>
Technical detail with the chatscript timeout (and found a spelling mistake or two!). Thanks again to Bill Staehle.
</revremark>
</revision>
<revision>
<revnumber>v0.23</revnumber>
<date>2001-11-07</date>
<authorinitials>mww</authorinitials>
<revremark>
Changed the Chatscript dialing method, thanks go to TonyC from btinternet.linux newsgroup.
</revremark>
</revision>
<revision>
<revnumber>v0.22</revnumber>
<date>2001-11-06</date>
<authorinitials>mww</authorinitials>
<revremark>
Changed a couple more little botches. Thanks again go to Bill Staehle.
</revremark>
</revision>
<revision>
<revnumber>v0.21</revnumber>
<date>2001-11-03</date>
<authorinitials>mww</authorinitials>
<revremark>
Changed discrepancies reported by Bill Staehle.
</revremark>
</revision>
<revision>
<revnumber>v0.20</revnumber>
<date>2001-11-01</date>
<authorinitials>mww</authorinitials>
<revremark>
Added Alcatel Speedtouch Information.
</revremark>
</revision>
<revision>
<revnumber>v0.19</revnumber>
<date>2001-10-31</date>
<authorinitials>mww</authorinitials>
<revremark>
Initial public release.
</revremark>
</revision>
</revhistory>
<abstract>
<para>
This document describes how to setup a modem pppd link to
Btinternet in the UK.
</para>
</abstract>
</artheader>
<sect1 id="intro">
<title>Introduction</title>
<para>
This HOWTO exists because a mate of mine needed to easily set up an
Internet connection to BTinternet and here is a quick and concise way
to get a running PPPd to Btinternet. This HOWTO also briefly covers
Howto setup basic IP Masquerading to allow connection sharing.
</para>
<sect2 id="copyright">
<title>Copyright and License</title>
<para>
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
<ulink url="http://www.gnu.org/copyleft/fdl.html">http://www.gnu.org/copyleft/fdl.html</ulink>
</para>
<para>Send feedback to
<ulink url="mailto:matt@consultmatt.co.uk"><citetitle>matt@consultmatt.co.uk</citetitle></ulink>.
</para>
</sect2>
<sect2 id="mailing">
<title>Mailing Lists</title>
<para>Please note: There is a mailing list available for this howto. If you wish to join please email <email>majordomo@consultmatt.co.uk</email> with the body:</para>
<para><filename>subscribe bti-howto</filename></para>
<para>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.</para>
</sect2>
<sect2 id="author">
<title>About the author</title>
<para> 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
<ulink url="http://www.consultmatt.co.uk">http://www.consultmatt.co.uk</ulink>
you will be using. </para>
<para>
You can find me at <ulink url="http://www.consultmatt.co.uk">www.consultmatt.co.uk</ulink>. Or at <ulink url="mailto:matt@consultmatt.co.uk">matt@consultmatt.co.uk</ulink>.
</para>
</sect2>
<sect2 id="greetz">
<title>Acknowledgements</title>
<para>A major thanks of gratitude to the guys at Linuxdoc in particular Greg Ferguson and David Merrill for help with getting this into trusty SGML. Also to Rob Smith the guy behind me writing this :) (As he couldn't sort his own Linux box out :P). A great vote of thanks to Bill Staehle for his input in ironing out some major flaws. Also a thank you goes to TonyC at btinternet.linux and the rest of that newsgroup for originally getting me on my feet with BTi. Finally and most importantly my thanks goto my Lord and Saviour Jesus Christ, without whom I'd be lost.</para>
</sect2>
</sect1>
<sect1 id="req">
<title>Requirements</title>
<para>
The following is needed to use this HOWTO:
</para>
<itemizedlist>
<listitem><para>A working modem, external or internal hardware modems are the easiest to get working, see <ulink url="http://www.linuxdoc.org/HOWTO/Modem-HOWTO.html">Modem-HOWTO</ulink>. If you have a WinModem then see <ulink url="http://www.linuxdoc.org/HOWTO/Winmodems-and-Linux-HOWTO.html">Winmodems and Linux HOWTO</ulink></para></listitem>
<listitem><para>An account with Btinternet, this HOWTO covers
BTi Surftime and Anytime</para></listitem>
<listitem><para>Some basic understanding of the Linux OS and
its layout</para></listitem>
</itemizedlist>
</sect1>
<sect1 id="surf">
<title>Surftime</title>
<sect2>
<title>PPPd Setup</title>
<para> Right, to start off you will need a working installation of
PPPd, I know from experience that Mandrake 8.0 that sometime is
doesn't install pppd so check its installed first. Once it is it
usually resides in <filename>/usr/sbin/pppd</filename> check that any
users you want to access it have setuid access.
</para>
<para>Note: Setuid allows pppd to run as-if root allowing non-superusers to run pppd without less problems. To do this use the command <command>chmod 4750 /usr/sbin/pppd</command>. Beware: Some distributions have a watchdog program that will change the pppd permissions back to normal. I have not tested this but on RedHat derived systems with Linuxconf installed then removing the <filename>/usr/lib/linuxconf/redhat/perm/ppp</filename> should stop this happening.</para>
</sect2>
<sect2>
<title>Chatscript (Dialup)</title>
<para> The Chatscript is a text file, usually residing in
<filename>/etc/ppp</filename> that contains the commands passed to
the modem to make it dial to BTi. If you want to compare this to DUN
in Windows then this is the phone number and init commands. </para>
<para> Below is the chatscript used to dial BTi, I've now opted for putting the \T metacharacter in the script. The means when we run <command>chat</command>, inside the pppd command, we can use a <filename>-T</filename> parameter and supply the needed telephone number.</para>
<para>
<screen>
"" "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
</screen>
</para>
<para> This script will dial BTi providing you put in the \T so we can added the telephone number later. I suggest saving the chatscript as something like <filename>/etc/ppp/chatscript</filename> Once you've saved it we can move onto setting up BTi's CHAP authentication.
</para>
</sect2>
<sect2>
<title>Authentication</title>
<para> With PPP dialup's the most widely used authentication method,
apparently, is PAP (Password Authentication Protocol). However, just
to be a pain in the backside BTi use CHAP (Challenge Handshake
Authentication Protocol). To be fair CHAP is a more secure authentication method than PAP but it's still a pain. Now PPPd does support this but not through
nice easy to use Linuxconf dialogs. </para>
<para>In the
<filename>/etc/ppp</filename> directory should be a
<filename>chap-secrets</filename> that looks roughly like this when
first installed: </para>
<para>
<screen>
# Secrets for authentication using CHAP
# client server secret IP addresses
</screen>
</para>
<para> We can safely ignore the IP Address column but the others me
must worry about. So fill in the gaps like this: </para>
<para>
<screen>
# Secrets for authentication using CHAP
# client server secret IP addresses
"bloggs@btinternet.com" * "mypasswordhere"
</screen>
</para>
<para> These two extra lines will try and authenticate ANY outgoing
PPP connection that responds using CHAP using your BTi details. It
goes without saying that you replace
<emphasis>bloggs@btinternet.com</emphasis> and
<emphasis>mypasswordhere</emphasis> with your details. Also, the second line is not strictly needed but I've found it helps sometimes.</para>
<para><emphasis role="strong">Note</emphasis>: If you're not using BTi at this point you can usually get away with having identical <filename>chap-secrets</filename> and <filename>pap-secrets</filename>. If you the same kind of pattern as above it should work.</para>
<para>I suggest that you do a "<command>chmod 600 /etc/ppp/*secrets</command>". It was pointed out to me that it stops pppd shouting about security.</para>
</sect2>
<sect2>
<title>Setting your global options</title>
<para> In your <filename>/etc/ppp</filename> directory there is a
file called <filename>options</filename>. If your open it with your
favourite text editor you should see:</para>
<para>
<screen>
lock
</screen>
</para>
<para> And thats it, now we need to add some more settings in here so
make it look like: </para>
<para>
<screen>
lock
usepeerdns
defaultroute
noipdefault
noauth
asyncmap 0
crtscts
modem
115200
</screen>
</para>
<para> Don't worry what they do, if you're interested look at the man
page for pppd. As a passing note if you would like PPPd to redial
dropped connections then add <emphasis>persist</emphasis> to the end
of your options file. </para>
</sect2>
<sect2>
<title>Testing your link</title>
<para> Now you've created your Chatscript there are only two steps
left till you should be on the Internet. First is getting a working
link and second is creating a couple of easy dialup scripts to help
you. </para>
<para>
To test your link try this command:
</para>
<para>
<command>pppd ttyS0 connect '/usr/sbin/chat -v -TPHONE_NUM_HERE -f /etc/ppp/chatscript' updetach debug name bloggs@btinternet.com</command></para>
<para> Now obviosuly if your testing at Daytiem rate add the Daytiem number where instead of <filename>PHONE_NUM_HERE</filename> and similar with Surftime.</para>
<para> This will tell PPPd to dial the modem on ttyS0 (COM1) using the chatscript. The <option>updetach</option> tells PPPd to only fork away to the commandline after the connection is established and the <option>debug</option> will show all authentication commands onscreen (providing updetach it set) while it trys to connect. </para>
<para> If that connected then move onto the next section and we can
make a set of scripts to allow easy dialing. </para>
</sect2>
<sect2>
<title>Dialing scripts</title>
<para> Here I'll just set out a set of scripts that will let your
dial BTi from a command line easily. The following should be
self-explanatory, the italic filename is the filename to put the data
into and the proceeding text the file contents: </para>
<para><command>/etc/ppp/peers/bt-surf</command></para>
<para>
<screen>
ttyS0 connect '/usr/sbin/chat -v -TSURFTIME_NUMBER_HERE -f /etc/ppp/chatscript'
updetach name bloggs@btinternet.com
</screen>
</para>
<para><command>/etc/ppp/peers/bt-day</command></para>
<para>
<screen>
ttyS0 connect '/usr/sbin/chat -v -TDAYTIME_NUMBER HERE -f /etc/ppp/chatscript'
updetach name bloggs@btinternet.com
</screen>
</para>
<para> Change any of the filenames to suit what you called them and
the username. Do the same with this: </para>
<para><command>/usr/bin/internet</command></para>
<para>
<screen>
#!/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
</screen>
</para>
<para> Once you've done that run this command at the command prompt:
</para>
<para><command>chmod a+x /usr/bin/internet</command></para>
<para> Now you've done, simply type
<command>internet daytime/surftime/off</command> and it
will connect you to the internet. </para>
</sect2>
</sect1>
<sect1>
<title>BTi Anytime</title>
<para> I'm sorry, for all you Anytime customers its really hard!
NOT! Read all the instructions for Surftime above. They all apply in
most places, the only things to watch out for is you obviously don't
need any of the Surftime/daytime distinctions. So only have one
peers file (using the correct phoen number) and one dialup option in your <filename>/usr/bin/internet</filename> file. (eg. dial and off)</para>
</sect1>
<sect1>
<title>BTOpenworld Home 500 (Alcatel Speedtouch USB)</title>
<sect2>
<title>About this section</title>
<para> There is rather a large amount of credit due here, to
<ulink url="mailto:chris@black-sun.co.uk">Chris Jones</ulink> for writing the
<ulink url="http://www.linuxdoc.org/HOWTO/DSL-HOWTO/speedtouchusb.html">Alcatel
Speedtouch USB ASDL Modem mini-HOWTO</ulink> that is now part of the
<ulink url="http://www.linuxdoc.org/HOWTO/DSL-HOWTO/">DSL HOWTO</ulink>.
This helped me a great deal when trying to get my Speedtouch to work. </para>
</sect2>
<sect2>
<title>Warning</title>
<para>At home I use Linux Mandrake, although the version of the kernel I had was patched with the ATM kernel source I did end up patching a different kernel source to get it working. Please, please inspect your kernel source to see if you have the PPPoATM source patched against your kernel. To do this go into you kernel source directory, usually <filename>/usr/src/linux</filename> and do a <command>make menuconfig</command>. In the Network Device Support section check for:</para>
<itemizedlist>
<listitem><para>Network device support-&gt;PPP over ATM</para></listitem>
</itemizedlist>
<para>If it does exist then make sure it is present it you current kernel and you can skim-read the "Patching you kernel" section to make sure you have the correc toptions compiled in and then carry on.</para>
<para>This was just a minor warning as I orginially had a kernel patched with PPPoATM and without realising managed to trash my kernel tree by trying to force the patch onto it.</para>
</sect2>
<sect2>
<title>Distribution Specific Information</title>
<para>I have had reports about different distros that have varying
PPPoATM support already builtin to the kernel:</para>
<itemizedlist>
<listitem><para>Mandrake 8.0: The default 2.4.3 kernel already has the
PPPoATM patch applied, I cannot remember if it compiled in but ignore
steps refering the "Patching the Kernel" below. PS: You still need to
configure the kernel.</para></listitem>
<listitem><para>Mandrake 8.1: Mandrake 8.1 supports the Speedtouch
automatically, I have no had first hand experience but from what I can
gather you simply have to download the Alcatel binaries and then use
DrakNet to sort it out.</para></listitem>
<listitem><para>Debian: I have had reports that the standard Debian
installtion does not include libpam, this must be installed for the
PPPoATM plugin modules to work.</para></listitem>
</itemizedlist>
<para>NOTE: From roughly kernel 2.4.16 the PPPoATM patch is included in
Linus' main source tree. Therefore you can miss out patching the kernel
and just configure it.</para>
</sect2>
<sect2>
<title>Requirements</title>
<para> To get your Speedtouch USB working in Linux you have a fairly
heavyweight task ahead of you, but hey, if I could do it so can you!
This is what you'll need to get it working: </para>
<itemizedlist>
<listitem><para>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 <ulink url="http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</ulink>.</para></listitem>
<listitem><para>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</para></listitem>
<listitem><para>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.</para></listitem>
<listitem><para>A heap-load of confidence with meddling with
your config. eg: kernel recompiling, program
installation...</para></listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Software Downloads</title>
<para> To get the Speedtouch working under Linux you will need some
software and kernel patches found below: </para>
<itemizedlist>
<listitem><para>The kernel patch for your kernel. They can be found at <ulink url="http://www.kernel.org/pub/linux/kernel/people/axboe/PPPoATM/">http://www.kernel.org/pub/linux/kernel/people/axboe/PPPoATM/</ulink>. Please note not all the kernels have patches.</para></listitem>
<listitem><para>The latest SpeedTouch driver from <ulink url="http://sourceforge.net/project/showfiles.php?group_id=3581">http://sourceforge.net/project/showfiles.php?group_id=3581</ulink></para></listitem>
<listitem><para>The latest SARlib library from <ulink url="http://sourceforge.net/project/showfiles.php?group_id=22221">http://sourceforge.net/project/showfiles.php?group_id=22221</ulink></para></listitem>
<listitem><para>The Alcatel speed management software. You can get it from <ulink url="http://www.alcatel.com/consumer/dsl/dvrreg_lx.htm">http://www.alcatel.com/consumer/dsl/dvrreg_lx.htm</ulink>. I can't distribute this because of Alcatel's licensing scheme so get it from them.</para></listitem>
<listitem><para>Some description of PPPoATM aware PPPd binary:</para>
<itemizedlist>
<listitem><para>Red Hat 7 RPM (glibc 2.2): <ulink url="http://sourceforge.net/project/showfiles.php?group_id=23818">http://sourceforge.net/project/showfiles.php?group_id=23818</ulink></para></listitem>
<listitem><para>Debian (.deb): <ulink url="http://sourceforge.net/project/showfiles.php?group_id=23818">http://sourceforge.net/project/showfiles.php?group_id=23818</ulink></para></listitem>
<listitem><para>Tarball: <ulink url="http://sourceforge.net/project/showfiles.php?group_id=23818">http://sourceforge.net/project/showfiles.php?group_id=23818</ulink></para></listitem>
</itemizedlist>
</listitem>
<listitem><para>The Linux Hotplug software from <ulink url="http://linux-hotplug.sourceforge.net">http://linux-hotplug.sourceforge.net</ulink>. Get it installed as per their instructions. It seemed simple enough so I won't cover it here</para></listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Patching your kernel</title>
<para> Once you have the PPPoATM kernel patch (this assumes you use
the patch against kernel 2.4.7) you need to make sure you have a
working 2.4.7 kernel tree, next unzip the PPPoATM patch by doing:
</para>
<para>NOTE: From rougly kernel 2.4.16 (I haven't tested to see hwo far
back it goes) the PPPoATM patch is included in Linus' main kernel tree,
therefore you may skip the patching below and resume ready to configure
the kernel.</para>
<para><command>gzip -d pppoatm-2.zip</command></para>
<para> Next we will need to test-patch the kernel using the following
commands: </para>
<para><command>patch -p1 -s -E --dry-run &lt; /point/to/pppoatm-2</command></para>
<para> If that ran without failure then patch the kernel by removing
the <option>--dry-run</option> as such: </para>
<para><command>patch -p1 -s -E &lt; /point/to/pppoatm-2</command></para>
<para> That should have patched the kernel good-and-proper so we can
go ahead and configure it, make sure the following options are
selected along with your personal build options: </para>
<itemizedlist>
<listitem><para>Code maturity levels-&gt;Prompt for development and/or incomplete code/drivers</para></listitem>
<listitem><para>Networking options-&gt;Asynchronous Transfer Mode (ATM)</para></listitem>
<listitem><para>Network device support-&gt;PPP (point-to-point protocol) support</para></listitem>
<listitem><para>Network device support-&gt;PPP support for async serial ports</para></listitem>
<listitem><para>Network device support-&gt;PPP Deflate compression</para></listitem>
<listitem><para>Network device support-&gt;PPP BSD-Compress compression</para></listitem>
<listitem><para>Network device support-&gt;PPP over ATM</para></listitem>
<listitem><para>USB support-&gt;Support for USB</para></listitem>
<listitem><para>USB support-&gt;Preliminary USB device filesystem</para>
<para>You have to make a choice here, if your USB controller is
UHCI based then select:</para>
<para>USB support-&gt;UHCI (Intel, PIIX4, VIA, ...) support</para>
<para>Alternatively choose:</para>
<para>USB Support-&gt;OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support</para></listitem>
</itemizedlist>
<para> You could select any of these as modules or compiled-in but as
I followed Chris Jones' HOWTO I compiled the all but UHCI/OHCI as
compiled-in code. Save the kernel config and compile the kernel and
modules as you normally do. </para>
</sect2>
<sect2>
<title>Kernel Drivers and Software</title>
<para> Now that the kernel will support using PPPoATM we can start
compiling the bits to run the modem. Well start with the Kernel mode
driver; first decompress the SARlib sources to a build directory.
(Personally I build all my non-kernel sources
in <filename>~/sources</filename>) and do a
<command>make</command> on it. There is no need to do
a <command>make install</command> with this library.</para>
<para> Next return to your source root and decompress your Speedtouch
drivers (from Sourceforge not Alcatel!), go in there and do a
<command>make</command>, and then a <command>make install</command>.</para>
<para> <emphasis role="strong">Note:</emphasis> If you get an "Error
1" then check the <filename>Makefile</filename> for a line starting
<option>SARLIB:=</option> and check it points to the right directory, the
one where you just compiled SARlib. </para>
<para> Next install the Hotplug software and make sure it works. Once
you've done that decompress Alcatel's binary management software and
do a <command>make</command> on that. Then do a <command>make
install</command>, the clever bit here is their installation
registers the Speedtouch kernel driver and their binary to be run
when the USB device is "hotplugged" (or coldplugged) into the system.
<emphasis>Kiss goodbye to the hours of trying to writing modules
loading scripts that always fail.</emphasis> </para>
<para> Next install the new PPPoATM aware PPPd program, I had no luck
getting it compile from source on my machine so I used the RPM. Sorry
you're on your own there! </para>
</sect2>
<sect2>
<title>PPPd Configuration</title>
<para> <emphasis role="strong">Warning:</emphasis> The action will
remove all the default settings for any previous PPPd connection.
(Not that you want them now you've got shiny new ADSL ;P) </para>
<para> In the <filename>/etc/ppp</filename> directory there is a file called
<filename>options</filename> in that file put the following: </para>
<para>
<screen>
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
</screen>
</para>
<para> Make sure of the following things: </para>
<itemizedlist>
<listitem><para>That you replace both name
<emphasis role="strong">and</emphasis> user variables with your
username.</para></listitem>
<listitem><para>That you get the correct VPI/VCI ATM pair,
these are in the windows information software, from BTi my
VPI:0 and VCI:38 so I use <option>0.38</option>. Make sure
you get this right or it <emphasis role="strong">will not
work</emphasis>.</para></listitem>
</itemizedlist>
<para> Next in your <filename>/etc/ppp/chap-secrets</filename> put:
</para>
<para>
<screen>
# Secrets for authentication using CHAP
# client server secret IP addresses
"bloggs@hg5.btinternet.com" * "mypasswordhere"
</screen>
</para>
</sect2>
<sect2>
<title>Testing your link</title>
<para> Next thing to do is get the link up and test it. If you've got
a nice distro like Mandrake you should find it will auto-init your
USB drivers and filesystem, if not then the following can be used:
</para>
<para><command>/sbin/modprobe usb-uhci</command></para>
<para><command>mount none /proc/bus/usb -tusbdevfs</command></para>
<para> Next load the Speedtouch driver by doing:
<command>/sbin/modprobe speedtch</command>. Next use the speedmgmt
program to get the modem init'ed: <command>/usr/sbin/mgmt</command>.
After a while of the lights flashing on the modem the main console
(and/or the syslog) should report: </para>
<para>
<screen>
Speedmgmt[2074]: Modem initialised at 576 kbit/s downstream and 288 kbit/s upstream
</screen>
</para>
<para> Once the modem has been init'ed now make sure the PPPoATM
module is loaded by doing: </para>
<para><command>modprobe pppoatm</command></para>
<para> Now start the PPP link by typing <command>pppd</command> You
should see something similar to this: </para>
<para>
<screen>
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 &lt;--&gt 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
</screen>
</para>
<para> Once that's done you're in luck, now just configure the pppd
to autodial at startup (beyond the scope of this HOWTO, sorry!).
Hopefully HotPlug will get your device up and going before pppd needs
it! :). </para>
</sect2>
</sect1>
<sect1>
<title>Simple IP Masquerading</title>
<para> 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
<ulink url="http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO.html">IP
Masquerading HOWTO</ulink>. </para>
<para> This part of the HOWTO assumes that your Netfilter software is
modularised, if it isnt then no big deal, either ignore the
<option>modprobe</option> lines or recompile your kernel. </para>
<para> Simple now, just run the commands: </para>
<para><command>modprobe iptable_nat</command></para>
<para><command>iptables -t nat -F POSTROUTING</command></para>
<para><command>iptables -t nat -A POSTROUTING -o ppp0 -s 10.0.0.0/16 -j MASQUERADE</command></para>
<para><command>echo 1 > /proc/sys/net/ipv4/ip_forward</command></para>
<para><emphasis role="strong">Note:</emphasis> The space between 1 and > is vital. It seems not to activate the IP Forwarding if the space is not there.</para>
<para> Change the <option>ppp0</option> and/or the
<option>10.0.0.0/16</option> for your relevant network settings and
put that file either before the <option>case "$1" in</option> in the
<filename>internet</filename> file or somewhere in your startup.
</para>
</sect1>
<sect1>
<title>Troubleshooting</title>
<sect2>
<title>Help! Lynx gives unable to access document</title>
<para><emphasis role="strong">Problem:</emphasis>
Lynx is unable to access document or ping gives "No
route to host" but the link is stable! </para>
<para> <emphasis role="strong">Solution:</emphasis> Have a look at
the output of <command>route -n</command> you should see a
refenence specifing a gateway of either your Remote PPP IP
and using the adapter/dev of ppp0. If not here is how to fix it. In
your <filename>/etc/ppp/ip-up</filename> file above
<option>exit 0</option> on the last line type: </para>
<para>
<screen>
route del default
route add default gw $4 $1
</screen>
</para>
<para> Save the file and redial. The problem should be solved.
</para>
</sect2>
<sect2>
<title>My kernel &lt; 2.4.2 crashes using the Alcatel driver</title>
<para><emphasis role="strong">Problem:</emphasis>
Your kernel below 2.4.2 crashes using the Alcatel driver.
</para>
<para> <emphasis role="strong">Solution:</emphasis>
You're probably using a kernel compiled with SMP support either don't
use SMP or try here:
<ulink url="http://sourceforge.net/project/showfiles.php?group_id=23818">http://sourceforge.net/project/showfiles.php?group_id=23818</ulink>
</para>
</sect2>
<sect2>
<title>PPPd crashes when it loads the PPPoATM module</title>
<para><emphasis role="strong">Problem:</emphasis>
When PPPd attempts to access the ATM device it crashes.
</para>
<para> <emphasis role="strong">Solution:</emphasis> The kernel was
probably compiled on a different type of processor. I tried to get
the kernel compiled quicker by compiling the kernel on my 950Mhz
Duron, even with the processor type to suit the target 266Mhz Cyrix
the ATM module crashes. So dont take short cuts and compile on the
target processor. </para>
</sect2>
<sect2>
<title>insmod speedtch.o gives: "Unresolved symbol: _mmx_memcpy"</title>
<para><emphasis role="strong">Problem:</emphasis>
When you have compiled the Speedtouch Kernel driver (speedtch.o) trying to insmod/modprobe returns: "Unresolved symbol: _mmx_memcpy" or similar.
</para>
<para><emphasis role="strong">Solution:</emphasis>
Right, I haven't got a concrete answer here but I couldn't find it anywhere on the internet so here goes. I found this error come up when I recompiled my kernel once. It did it the first time but I forgot how to fix it. A combination of things fixed it for me:
<itemizedlist>
<listitem><para>Configured the kernel module support to ignore kernel version checking</para></listitem>
<listitem><para>Recompiled SARlib (this is what ultimately fixed it) before recompiling speedtch.o</para></listitem>
<listitem><para>Recompiled speedtch.o and reinstalled. Et voila!</para></listitem>
</itemizedlist>
As I said I can't be sure about this one but it worked for me.
</para>
</sect2>
<sect2>
<title>There are strange noises on the telephone line when I pick up the
phone.</title>
<para><emphasis role="strong">Problem:</emphasis>
When you pick up the phone there are strange noises present, more over
the use of the phone line causes the internet to disconnect.</para>
<para><emphasis role="strong">Solution:</emphasis>
You seem to have something which I think is called cross-talk. The
ADSL modem works by sending data down the unused frequencies of your
copper phone line. If the hardware is set up so the ADSL and phone
ranges overlap the two can "hear" each other. The best advice is to
Ring BTO Customer Support and they should be able to help.
</para>
</sect2>
</sect1>
<sect1>
<title>Further Reading</title>
<para>
For further reading on related topics see this list:
</para>
<itemizedlist>
<listitem><para>The <ulink url="http://www.linuxdoc.org/HOWTO/PPP-HOWTO/index.html">PPP-HOWTO</ulink></para></listitem>
<listitem><para>The <ulink url="http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO.html">IP Masquerading HOWTO</ulink></para></listitem>
<listitem><para>The <ulink url="http://www.linuxdoc.org/HOWTO/DSL-HOWTO/index.html">DSL HOWTO</ulink></para></listitem>
<listitem><para>The <ulink url="http://www.linuxdoc.org/HOWTO/Modem-HOWTO.html">Modem-HOWTO</ulink>.</para></listitem>
<listitem><para>The <ulink url="http://www.linuxdoc.org/HOWTO/Winmodems-and-Linux-HOWTO.html">Winmodems and Linux HOWTO</ulink></para></listitem>
</itemizedlist>
</sect1>
</article>