DiP-NetWorking-mini-HowTo [FINAL 4-10-96]

DiP-NetWorking-mini-HowTo [FINAL 4-10-96]

Post by Kent Robot » Mon, 08 Apr 1996 05:00:00



DiP-NetWorking-mini-HowTo "Trust this, and get connected." (Kent Robotti)

Unknown server error, Network in unreachable, = Network not configured
correctly.

(Contents...) (1)... Important Network Files...
              (2)... DiP...
              (3)... PppD...
              (4)... Software Recomendations...

(1)...Files to be concerned with, /etc/HOSTNAME, hosts, resolv.conf...)

There,s a shell script, called netconfig.
~/# netconfig      <-If you installed it..?)

If not...
~/# vi /etc/HOSTNAME

darkstar.ios.com         <-Just one line, the name you give
                           your network, your computer, (darkstar)
                           and your ISP, service providers name, (ios.com)>

darkstar~/# vi /etc/hosts      

127.0.0.1       localhost
0.0.0.0         darkstar.ios.com darkstar    <-0.0.0.0 = I have a Dynamic IP
                                               address. Your sevice provider
                                               assigns you one, either static-
                                               ly, it's the same everytime, or
                                               dynamicly, it,s different every-
                                               time...)                                              

darkstar~/# vi /etc/resolv.conf                    

domain ios.com                   <-Your service providers domain name.)
nameserver 198.4.75.45           <-Your service providers IP address,
nameserver 198.4.75.46             if more than one, include them all...)
nameserver 198.4.75.44

(2)...(Manual login, useing  DiP...)

darkstar~/# dip -t
DIP> port /dev/cua1       <-cua1=com2, cua0=com1 or /dev/modem)
DIP> speed 38400
DIP> term
ATZ            <-Enter>
AT&F%C0W2    
ATDT2956700    <-The phone number.)

Login: Password: Your IP address is 1?.2?.3?.4? - My IP address is 198.4.75.45

(To exit, dip term mode, press the keys, Ctrl ]

DIP> get $locip 1?.2?.3?.4?      <-Your IP address...)
DIP> get $rmtip 198.4.75.45      <-Your service providers IP address...)  
DIP> default
DIP> mode ppp      <or slip, cslip>

darkstar~/# ping 198.4.75.45     <-To see if your connected...)
(Press the keys...) Ctrl z or Ctrl c to exit ping, or anything...)
If connected, then... darkstar~/# lynx, ftp, telnet, etc...
darkstar~/# dip -k   <-To kill dip...)          
                                               /var/spool/uucp/LCK..cua1
Every time dip, is run, it creates lock files, /usr/spool/uucp/LCK..cua1,
/etc/dip.pid, if you kill dip properly, or reboot, these should be
removed, otherwise you can't use dip, until you remove them.

(Sample dip script...)
~/# vi ppp.dip

main:
port /dev/cua1            
speed 38400                      
reset                                   <-Reset = ATZ)      
send AT&F%C0W2MO\r                      <-M0=no sound ?)
wait OK 2                               <-Wait for OK response, from the modem.)
if $errlvl != 0 goto OK                 <-If not found, say so.)
send ATDT 295-6700\r                    <-Phone number.)
wait BUSY 10                            <-Wait 10 sec, if line is busy, say so.)
if $errlvl != 3 goto LINE_BUSY          <-No comment...)
wait CONNECT 35                         <-35 sec. to connect.)
if $errlvl != 0 goto CAN'T_CONNECT
login:
wait annex: 5                  <-Some logins, require the annex: step, as well
if $errlvl != 0 goto annex:      as others, if not, skip to, wait login: 15.)
send 3\r                       <-annex: number, and <Enter>
wait login: 15                 <-Wait for login: prompt, for 15 seconds.)
if $errlvl != 0 goto login:    <-If login: prompt, is not found in 15, say so.)
send jerry\r                   <-Login name, (jerry) and \r = <Enter>)
wait Password: 10              <-P or p ?, <assword: if not sure.)
if $errlvl != 0 goto Password:
send secret\r                        <-Password and <Enter>)
sleep 5                              <-Pause 5 seconds ?)
get $remote remote 3                 <-Get your service providers IP address.)
if $errlvl != 0 REMOTE_IP_?
get $local remote 3                       <-Get my IP address, from my service
if $errlvl != 0 goto LOCAL_IP_?             provider...)
get $mtu 1500                             <-Set maximum, transmit and receive
get $mru 1500                               units, standard stuff...)
default
print PPP CONNECTED $locip -> $rmtip   <-Print to screen Local IP:Remote IP.)
mode ppp                               <-Or slip, cslip...)
exit
done:

~/# chmod u+x ppp.dip    <-Make ppp.dip executable...)
~/# dip ppp.dip          <-Execute ppp.dip...)
(Look for this and that... not found) This will pinpoint the problem,
not enought time, misspellings, etc...)
~/# dip -v ppp.dip       <-To run the script in verbose mode...)

(Putting it all together...)
~/# vi ppp      

rm /usr/spool/uucp/LCK..cua1     <-cua1=com2 cua0=com1 ?)
rm /var/spool/uucp/LCK..cua1
rm /etc/dip.pid
dip ppp.dip                  

~/# chmod u+x ppp
~/# ppp    <-Removes lock files, and starts dip, to execute script...)

(3)...(Compileing ppp-2.2.0e...) ~/ppp-2.2.0e# configure
                                             # make kernel
                                             # make
                                             # make install

(If ppp does,nt install the scripts...) ~/ppp-2.2.0e# mv scripts /etc/ppp

(If your getting errors, trying to compile ppp-2.2.0e, take a look at...)
~/#ppp-2.2.0e/pppd/pppd.h   <-About 30 lines, from the top...)

#include <sys/types.h>      <-Change this line...)
#include <sys/bitypes.h>    <-To this...)

?/# find / -name if_arp.h
(If your still getting errors, take a look at /usr/include/linux/if_arp.h)
(About 8 lines, from the end...)

    unsigned char   ha[MAX_ADDR_LEN];   <-Change this line...)  
    unsigned char   ha[4];              <-To this...)    

(PPP scripts, to be concered with, (ppp-on) defines some parameters, and
calls the program /usr/sbin/chat, to execute the chat script (ppp-on-dialer)
(ppp-off) exits ppp...)

(Your /etc/ppp/options file, should look something like this, if not exactly...)

lock
/dev/cua1
38400
modem
defaultroute
crtscts
mru 1500
mtu 1500
passive
bsdcomp 15,15   <-Add this line for bsd compression, if the module (bsd_comp.o)  
                  is installed, and it can be loaded, otherwise Not...)

(4)...Software Recomendations...)

(1). [ncftp...] (Has -C -R Options, so you can resume a download, that was
                interrupted, and retrieve entire directories...)
                (ftp.cc.gatech.edu)
                (/pub/Linux/system/Network/file-transfer
                (ncftp-2.3.0?.tgz)

(2). [slrn...] (Fast Newsreader, Perfect for a slip/ppp connection...)
               (ftp.space.mit.edu (/pub/davis/slrn)
     [slang...] (Required by slrn, to compile...)
                (/pub/davis/slang)

(3). [lynx...] (Fast Non-Graphical, WWW Browser...Compile with slang...color...
                more stable...make linux-slang...Or...make linux-ncurses..?)
               (http://www.wfbr.edu/dir/lynx)
               (lynx2-4-fm.zip)

(4-10-1996-FINAL)