                 Setting up dip for Linux SLIP/PPP


This script file written for a Slackware system but should work for 
all versions of Linux.

The rest of the information in this README may or may not work
for other Linux distributions. Although I'm betting it will.

I won't go into the niceties of building the kernel, for that read the
kernel howto. But here's some generalities For slip/ppp

############################# KERNEL stuff #########################

back up your current kernel like "cp zImage zImage.bak "


cd to /usr/src/linux
make config
make dep
make zImage or whatever you use.
make install
make modules
make modules-install
move the kernel to wherever you boot from, usually /zImage
edit lilo.conf so you can boot either the new zImage or the zImage.bak
run lilo 
reboot
if it won't reboot to the new zImage properly then boot to zImage.bak

Again these are generalities. READ THE KERNEL HOWTO!!!!!

First off make sure you have slip, Cslip and ppp configured into 
your kernel. They may be compiled as modules or directly into the kernel
itself. They don't create a lot of overhead for the kernel so I just put
them directly into the kernel on my system. YMMV!  (your mileage may vary)
My kernel is only 383K which is fairly small, if yours is large you may want
to use the modules.

You can tell if you have ppp/slip configured in by the messages you get when
you boot up. If you get two lines that say: PPP..Line allocation...
And PPP version...2.2.0...
Then PPP is configured in and running. The same with slip and cslip.
DON'T configure in slip 6 bit encapsulation. Just slip, cslip, and ppp
and maybe the keepalive option. 

For kernel info read the /usr/doc/faq/howto/Kernel-HOWTO.gz (Slackware)




################### INTERNET, HOSTS, and other necessarys ##############

If your computer is shmoe and your host is host.net
then your host name is shmoe.host.net



in /etc/hosts
you should have: 

#
# hosts		This file describes a number of hostname-to-address
#		mappings for the TCP/IP subsystem.  It is mostly
#		used at boot time, when no name servers are running.
#		On small systems, this file can be used instead of a
#		"named" name server.  Just add the names, addresses
#		and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine.  It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#

# For loopbacking.  If you are joe@shmoe.host.net
127.0.0.1	localhost
127.0.0.1	 	shmoe.host.net shmoe 

# End of hosts.



in /etc/HOSTNAME
you should have:

shmoe.host.net



in /etc/resolv.conf
you should have your host name and your nameserver addresses

host.net

nameserver 123.456.789.000
nameserver ...............


in /etc/host.conf
you should have:

order hosts, bind
multi on

####################################################################


You should be able to telnet and ping yourself after all this.
like: telnet shmoe.host.net or  ping shmoe.host.net  while you are 
off line.

If not, something is wrong with the above. If you can ping yourself 
when offline but not your host when you are online and ping host.net 
then something is wrong with your /etc/resolv.conf file. or ppp/slip 
isn't configured into your kernel.

####################################################################

Now about DIP and ppp and the setup for that..

After you have rebuilt your kernel, install pppd if it isn't already.
You can get it at ftp://sunsite.unc.edu/pub/Linux you'll have to search
around under that directory to find it, I don't recall witch directory it's
in under the Linux directory. 

I didn't have to do anything with pppd but install it. I believe dip takes
care of running it when necessary. No ppp-up or ppp-down or whatever all
that bull shit is.

If you don't have dip installed then look in the same place for that.
Both have the instructions within the tar file for installing the
package. 

IMPORTANT - - IMPORTANT - - IMPORTANT - - IMPORTANT - - and so on.

This is the part you need to really be aware of. Setting up a dip script
isn't all that hard if you follow these instructions! Most example dip
scripts you find on the net SUCK-SUCK-SUCK because they are usually about
5 years old and most ISP's have upgraded to a simpler login over the past
few years.

The next step is the most important you will take in setting up your script.
I can't express this enough. 

BEFORE YOU TRY WRITING YOUR SCRIPT PRINT OUT THE ONE IN THIS EXAMPLE
THEN DIAL YOUR ISP USING A COMM PROGRAM SUCH AS MINICOM OR ANOTHER DOS TYPE
COMM PROGRAM, THEN LOGIN WITH THE COMM PROGRAM AND RECORD ON PAPER EVERY
ACTION YOU HAD TO TAKE TO GET LOGGED INTO YOUR ISP ALL THE WAY UNTIL YOU ARE
SENT THE IP ADDRESS NUMBERS. 

With slip you will generally get the IP numbers back, with some ppp
protocols you may just get a string of garbage back. This still means your
ppp address is sent and running 

There is a command that you will have to put in the script for every one of
these actions you just recorded on paper.

The included script example is the one I use. It is very simple because 
my isp doesn't require a hell of a lot to get logged in.

I don't have to send which protocol I use to my isp because you are setup
with the protocol on thier server and you don't have a choice. Therefore you
are either ppp or slip, you don't get a prompt for choice on dialup.
If you do, then you will have to put the following in the script:
send ppp\r    or     send slip\r
this generally happens right after the password prompt and send.
see the script example for more info on this.

more - - IMPORTANT - -IMPORTANT - and so on...

Use the command: dip -t at the command line to manually walk through the dip
operation. This way you will get to see exactly what the server is sending
you.

Also after you have the script setup you can use the command:
dip -v script.dip  (script.dip being the name of your dip script file)
and it will show you  exactly every step it is taking while it is going
through the script file. This will help a lot if it stops with an error.
Then you will be able to see where the problem occured. 


If you run into problems you just can't figure out the answer to
drop me an email at:

larrywyb@larry.dhis.org

I will only answer dip script questions, no kernel or installation 
problems. Also I don't guarantee that I know all the answers to dip. (: