[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

step by step PPP over ATM instructions

Hey everyone, since a few folks out there seem to have a similar DSL
configuration to mine (Ameritech uses Speedstream 3010 -> Alcatel 1000 ADSL),
I decided to write up this little walkthru of *all* of the steps 
I took to get it working. This is intended as a guide so you will have 
to modify it for your specific configuration. Some of this is not 
specific to atm, but I figured it might be helpful for those folks who haven't
played around with linux features that are still under development before.

Hope this helps,

Get free email and a permanent address at http://www.netaddress.com/?N=1

Part I: Get a working 2.3.x kernel.
I think the pppoatm patch wants at least a 2.3.29 kernel. And I found that 
the pppoatm kernel patch worked just fine on the 2.3.42 kernel, so why not 
get an up to date version?
1) Get a recent development kernel (2.3.42).
If you don't have any 2.3.x kernels grab the whole thing and extract it:
	% cd /usr/src
	# remove symlink to old source since kernel tarball extract to "linux".
	% rm linux
	% gzip -dc < /tmp/linux-2.3.42.tar.gz | tar xvf -
	% mv linux linux-2.3.42
	# now make the symlink point to the new source.
	$ ln -s linux-2.3.42 linux
If you already have a 2.3.x kernel, just get the patches and bring yours 
up to the version you want.

2) Verify that your system is up to date for using a 2.3.x kernel by perusing 
the "/usr/src/linux/Documention/Changes" file. Don't worry about your PPP
version because we will be patching the latest 2.3.11 to work over ATM.

3) Build the kernel and make sure everything that you use on a regular basis 
works (except PPP of course).
	% cd /usr/src/linux
	% make config
	% make dep
	% make bzImage  # or your favor build target (bzdisk, bzlilo, etc)
	% make modules
	% make modules_install
	% shutdown -r now

Part II: Get a working patched kernel.
1) Get all the pieces you need:

2) Patch the kernel. I haven't tried patching the kernel with the patch 
included in the atm-0.67 distribution yet. So for now, I just used the 
atmppp patch. I will update this later once I gone that route.
	% cd /usr/src/linux
	% gzip -dc < /tmp/atmppp-2.3.29-2.diff.gz | patch -p1

	Don't worry about the patches Mitch posted since they are already 
	incorporated in the stuff from Jens. Thanks!

3) Build the new kernel. I had some undefines when I built ppp and 
ppp over atm as modules, so I had to build these pieces into the kernel. 
You should still build the Lanai driver as a module though. The relevant 
configuration options are: CONFIG_ATM=y, CONFIG_PPP=y, CONFIG_PPP_ATM=y, 
	% make clean
	% make config
	% make dep
	% make bzImage  # or your favorite build target (bzdisk, bzlilo, etc)
	% make modules
	% make modules_install

4) Edit your /etc/conf.modules so depmod & modprobe will find the lanai
driver. The relevent part of mine looks like this:
	# location of modules
	depfile=/lib/modules/`uname -r`/modules.dep
	path=/lib/modules/`uname -r`
	path[fs]=/lib/modules/`uname -r`
	path[misc]=/lib/modules/`uname -r`
	path[net]=/lib/modules/`uname -r`
	path[scsi]=/lib/modules/`uname -r`
	path[cdrom]=/lib/modules/`uname -r`
	path[ipv4]=/lib/modules/`uname -r`
	path[ipv5]=/lib/modules/`uname -r`
	path[sound]=/lib/modules/`uname -r`
	path[atm]=/lib/modules/`uname -r`

5) Reboot and verify the lanai driver works.
	% shutdown -r now

	% modprobe lanai
	% dmesg  # you will see some messages of form "lanai:". 
	% tail -25 /var/log/messages  # another source of messages

It would also be a good idea to compile and run the pppoa program to make 
sure all is well. Don't forget to set the proper vci in the ATM_VCI macro in 
pppoa.c before building!

Part III: Build patched ppp tools.
1) Unpack the ppp distribution.
	% cd /usr/src
	% gzip -dc < /tmp/ppp-2.3.11.tar.gz | tar xvf -

2) Apply pppoatm-pppd patch.
	% cd /usr/src/ppp-2.3.11
	% gzip -dc < pppoatm-pppd-2.3.11-2.diff.gz | patch -p1

3) Unpack the atm tools.
	% cd /usr/src
	% gzip -dc < atm-0.67.tar.gz | tar xvf -
	% mv atm atm-0.67  # cause I like to know versions at a glance

4) The ppp stuff will need a couple headers from atm-0.67 so I made symbolic 
links to them.  If you applied the kernel patch from atm-0.67 before you built 
your kernel and installed the headers you will not need to do this.
	% cd /usr/src/ppp-2.3.11
	% cd include
	% ln -s ../../atm-0.67/lib/atm.h .
	% ln -s ../../atm-0.67/lib/stdint.h .

5) OK, now build and install the ppp stuff.
	% cd /usr/src/ppp-2.3.11
	% ./configure
	% make
	% make install

Part IV: Configure PPP for your connection.
1) Edit the /etc/ppp/options file. This is going to be very dependant on 
your DSL provider. I started with the settings in the README.txt with the 
pppoatm that Jens wrote (thanks again!), and got mine working with Ameritech 
with the following settings (once it was working I didn't go back an remove 
anything unnecessary so some of these probably don't matter):
	# *your* email address goes in here
	name "your_login@ameritech.net"
	# I couldn't get it work without this
	# in my case the VCI was 105.
	vci 105
	noaccomp -am

This is different from what worked for Jens in that I had to use my email 
address for the name.

2) Next, edit "/etc/ppp/chap-secrets" and "/etc/ppp/pap-secrets". Once again 
I'm not sure if this was necessary, but once I got it working, I ceased 
looking into it. My secrets files both look like:
	# client                  server  secret         IP addresses
	your_login@ameritech.net    *     "your-passwd"      *

3) Give it a go.
	% pppd atm0

Keep checking your system messages (i.e. "tail -25 /var/log/messages") 
and if you lucky you will see something like:
	pppd[490]: Remote message: CHAP authentication success, unit nnn
	pppd[490]: local  IP address xxx.xxx.xxx.xxx 
	pppd[490]: remote IP address xxx.xxx.xxx.xxx 

If not you will have to play with the options/secrets files until you get 
it right for your config.