=============================================================================
PPP-compile guide... (12-2-97)

You can get the latest version of ppp from the home site of ppp.

ftp://cs.anu.edu.au/pub/software/ppp   <-Home site, check here first,)
ppp-2.3.2.tar.gz etc.                    if there's a ppp-2.3.3 etc.,
                                         get it instead of ppp-2.3.2.
					 patched below.)

This is the complete source of ppp-2.3.2 with a patch applied to
support modem speeds higher than 115200 i.e. 230400 and 460800.

Chap_ms.c from ppp-2.3.2 is also fixed in ppp-2.3.2.patched.

ftp://wauug.erols.com/pub/people/kent-robotti
ppp-2.3.2.patched.tar.gz
=============================================================================

~# tar xzvf ppp-2.3.2.patched.tar.gz

ppp-2.3.2.patched# configure
                 # make kernel               <-Then compile the kernel,
                 # make                        see below.)
	         # make install
	         # cp -r scripts /etc/ppp
	   
If your service provider uses (c)all (b)ack (c)onfiguration (p)rotocol,
you have to compile ppp-2.?.? to support cbcp.

Do this in ppp-2.?.? to get cbcp support.

ppp-2.3.2# patch -p1 < README.cbcp

If you want microsoft chap-80 support, put CHAPMS = 1 in pppd/Makefile.linux.

CHAPMS = 1                  
COMPILE_FLAGS = -D_linux=1 

Read: ppp-2.3.2/README.MSCHAP80

You need to have 'libdes.a' on your system to compile ppp-2.?.? with 
chap-80 support, either in /lib/libdes.a or /usr/lib/libdes.a, also 
put 'des.h' from libdes in /usr/include/des.h.

You can get libdes from: 

ftp://ftp.psy.uq.oz.au/pub/Crypto/DES/libdes-4.01.tar.gz

4.01 is the latest as of this writing, there's also a patch
for 4.01 libdes-4.01.patch1.

libdes-4.01# patch -p0 < libdes-4.01.patch1
libdes-4.01# make x86-elf      <-To compile on linux elf system.)

I have no experience with cbcp or ms-chap-80, but a sample options file 
might look like this.

Sample /etc/ppp/options file...

lock
defaultroute
noipdefault
38400
modem
/dev/modem
crtscts
debug
passive
callback "7771818"
name "jerry"              
remotename "foo.boo.com"      

Your "phone number" for the callback, include the quotation marks.

The 'name' option is just required for pap, chap, or ms-chap, it would 
be your username when you login to your service provider.

In addition to the name option, ms-chap-80 requires the remotename option, 
it would be your service providers domain name.

If your service provider is using PAP, your /etc/ppp/pap-secrets file
should look like this.

jerry        foo.boo.com        password-for-jerry

If your service provider is using CHAP, your /etc/ppp/chap-secrets file
should look like this.

jerry        foo.boo.com        password-for-jerry
foo.boo.com       jerry         password-for-jerry

The permissions on /etc/ppp/pap-secrets or chap-secrets should be.
~# chmod 600 /etc/ppp/pap-secrets

If you're having a problem making the ppp connection, look at the
/var/log/messages and or debug file for the output from pppd and
chat.

The output from pppd and chat should also be in the /var/log/pppd.chat
and pppd.debug files if you're using pppsetup.

=============================================================================
Compiling PPP as a module...
=============================================================================

~# dmesg | grep -i ppp
PPP: version 2.?.?    <-You have PPP in the kernel.)

If you have PPP compiled in the kernel, you'll have to compile the
whole kernel for the new ppp.

If you don't have PPP compiled in the kernel, you don't have to compile
the whole kernel, just answer yes to these questions below, and (m)odule 
for ppp.

If your present kernel is 2.0.30, the kernel source in /usr/src/linux
must be from 2.0.30 also etc.

~# uname -r      <-To see your kernel version.)
2.0.30        

Look at /usr/src/linux/Makefile, it should say 2.0.30 also etc.

VERSION = 2
PATCHLEVEL = 0
SUBLEVEL = 30

If your kernel was 2.0.30 and the kernel source in /usr/src/linux was
2.0.31 for example, you could change it to 2.0.30.

VERSION = 2
PATCHLEVEL = 0
SUBLEVEL = 31

VERSION = 2             <-Change it to match 'uname -r' then put it
PATCHLEVEL = 0            back after 'make modules_install' below.
SUBLEVEL = 30

~# cd /usr/src/linux
/usr/src/linux# make config      <-Configure kernel source.)

It doesn't matter how you answer all the other questions, you should just 
press enter and accept the defaults, just be sure that these questions 
below are answered like this.

etc...
Enable loadable module support (CONFIG_MODULES) [Y/n/?] y 
etc...
Networking support (CONFIG_NET) [Y/n/?] y 
etc...
TCP/IP networking (CONFIG_INET) [Y/n/?] y 
etc...
Network device support (CONFIG_NETDEVICES) [Y/n/?] y
etc...
PPP (point-to-point) support (CONFIG_PPP) [N/y/m/?] m   <-Answer (m)odule.)
etc...

/usr/src/linux# make modules              <-Compile ppp module.)
              # make modules_install
 
You should have a /lib/modules/2.0.30/net directory, with these
modules in it.

ppp.o
slhc.o
bsd_comp.o
ppp_deflate.o

~# depmod -a         <-Create /lib/modules/?/modules.dep file.)
 # modprobe ppp      <-To load the module.)
 # lsmod             <-To see what modules are loaded.)
 # rmmod ppp         <-To unload it.)

If you have any linux ppp questions or problems, you can post them 
to these newsgroups.

comp.os.linux.networking
comp.protocols.ppp
 
End... (By Kent Robotti) (12-2-97)
=============================================================================