Newsgroups: comp.os.coherent
Path: edefix!emedix!idgie.ix.de!news.asys-h.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!scipio.cyberstore.ca!vanbc.wimsey.com!rwsys!rw
From: rw@rwsys.wimsey.bc.ca (RW)
Subject: cohulip - SLIP usage
Message-ID: <1994Jul17.180124.457@rwsys.wimsey.bc.ca>
Organization: RW development
Date: Sun, 17 Jul 1994 18:01:24 GMT
X-Newsreader: TIN [version 1.2 PL2]
Lines: 163

If you are having trouble with SLIP under cohulip,
it may not be your fault. My documentation is likely
to be the problem. I seem to have a difficult time
telling what I have left out of docs for programming
I've done... even if I proofread it :-(

The README file says that you need to use minicom.
This is not true. You may use minicom (or other
term program), but there is a dialer built into
the slip attach command. You can use that dialer
instead.

When the installation routine for cohulip is run,
it creates a file called startup.new. The idea
is that you can use this file when you run net.
The syntax for starting net is:
	net <startupfile>

If you do not specify the name of a startupfile, net
will look for one called /usr/net/startup.net. It
will run the startup file before giving you the
net > prompt.

The slip attach command should be in your startup file.
It can be entered from the net commandline, but
it is such a long and arcane command to enter from a
command line. Here is an example:
attach asy 0 /dev/com1l slip sl0 0 1500 2400 - ATDT9517857\r gin: rw\r ord: x\r

The syntax for slip is:
attach <hwtype> <ignored> <devicefile> <type> <interface_label>  
              <ignored> <mtu> <baud> <chat_script>

Note** the entire attach command, including chat_script, 
must be all on a single line.

The chat_script can begin with a hyphen or it can begin with the
first string to send. If the script begins with a hyphen, the chat
dialogue will be displayed. Each string to send is followed by
a string for the local computer to wait for. After sending a send
string, net will wait 30 seconds to the receive the expected string.
If the expected string doesn't arrive within 30 seconds, net gives
up on the attach command. As you may notice, this dialer is very similar
to older style uucp chat script dialers. It differs in that it does not
support an alternate send string in the event of a time out.

The builtin dialer supports the following escape characters:
  
----------------------------------------------------
seq.	meaning			octal
----------------------------------------------------
\r	carriage return		015
\t	tab			011
\s	space			040
\n	newline			012
\E	end of file		004	* same as cntl-D
\b	backspace		010	* same as cntl-H
\N	Nul			000
\\	\			134	to put in an actual '\' character
---------------------------------------------------


WHAT YOU NEED TO KNOW:
In order to setup slip service with a service provider, you need
to know:
	1. The IP address of the nameserver provided by the provider.
	2. You own IP address, if it is fixed.
	3. How to invoke SLIP service when you log in.

All of these items will vary from one site to another and you must create 
your chat script in such a way that works in your specific situation. 

#1 nameserver:
Once you know the nameserver address, you can enter it into your startup
file as part of a domain add command. For example, if your nameserver
is at 192.197.249.1, include the net command:
	domain addserver 192.197.249.1

You can also enter this from the net commandline.

If your nameserver address is not correct, you will get
messages that indicate that hosts and networks are unreachable
unless the hosts and networks are manually entered by you into
your local routing tables (host.net and domain.txt). If you
do not have access to any nameserver, you can still use SLIP,
but you cannot use the internet's domain name services. This
means that you'll need to know and use the dotted decimal IP
addresses of hosts that are not manually entered into your
routing files.

#2 The local IP address:
There is no 'standard' way to obtain your local IP address. There
are several usual methods.
 
	fixed IP address:
You may have a fixed address assigned to you by a domain authority. 
Your IP service provider will need to put that IP address into his/her 
routing tables and have his/her SLIP software configured to activate that
route when you log in and deactivate it when you hang up. Clearly,
this means that you and your provider must agree on the IP address,
and set things up in advance. Some IP service providers are constrained
by their software or by politcal barriers so that they cannot route
to you with a fixed IP address. 

	floating IP address:
Some situations mandate the use of floating IP addresses. In this
case, you will probably get a different IP address each time that
you call the service provider. It will be displayed as part of the
login sequence or when you invoke the remote machine's SLIP software.
In this case, you will need to actively watch the login dialogue
and obtain the ip address from the displayed chat. Then, you'll
need to manually enter a net commandline command to tell the local
software what the local IP address is. The slip session will not
work without a correct local IP address. The syntax for entering
the local IP address is:
	ip address <newaddress>

If your local IP address is not the same as what the remote machine
expects, you will not receive incoming data packets. You can send
packets, but no site will know how to reach you with reply data.
You will not even be able to receive routing error messages. 

	bootp:
It is also possible to use the bootp protocol to obtain your
IP address. However, I have not been able to use the bootp
software to do this and I cannot tell you how it is done. If
you wish to use bootp, email me.

#3 Invoking slip on the remote machine:
Your provider may provide you with a user name and password set
that automatically runs the remote SLIP software when you login.
Or you may need to login and invoke some sort of slip login command
from a remote shell's commandline.

In any event, it may be wise to call the service provider and login
by using a terminal program such as minicom or ckermit. Do this
in order to learn the syntax of the login procedures so that you
can write your chat script correctly. Remember that if you must
obtain your IP address from the chat dialogue, you'll need to
include, as the final expect element in your chat script, a string
that causes the chat script to wait until after the remote site
displays your IP address. In addition, you'll need to make the
first element in your chat script a hyphen so you can see the
dialogue.

Note*** once your slip connection is started, you'll need to enter
a route add command. Normally, this will be in your startup file.
It will probably be:
	route add default sl0

A discussion of routing of a more complex nature than this is
the subject of a different article at a different time.

I hope this improves your ability to use cohulip's slip. Thanks
to Fred Butzen of Mark Williams Co. for bringing the omitted 
information to my attention.
  
--Randy

--------- rw@rwsys.wimsey.bc.ca ---------------------
Coherent Support  -   Programming  -  Administration
(604) 581-0518                   Surrey , BC  Canada
-----------------------------------------------------
