Return-Path: <Jonathan_Hardwick@gs69.sp.cs.cmu.edu>
Received: from gs69.sp.cs.cmu.edu by K.GP.CS.CMU.EDU id aa16083;
          21 Jul 92 18:52:36 EDT
Received: from gs69.sp.cs.cmu.edu by GS69.SP.CS.CMU.EDU id aa05682;
          21 Jul 92 18:52:10 EDT
To: bovik@CS.CMU.EDU
Subject: Setting Up SLIP On A Sun-3
Cc: elf@CS.CMU.EDU, gripe@CS.CMU.EDU
Date: Tue, 21 Jul 92 18:52:03 -0400
Message-ID: <5680.711759123@GS69.SP.CS.CMU.EDU>
From: Jonathan_Hardwick@GS69.SP.CS.CMU.EDU

A few months back I asked cmu.cs.unix-forum for advice on how to set up
a Sun-3 at home and hook it into the net via SLIP over an MCN
connection.  Here is the distilled wisdom resulting from that question.
I'm cc-ing gripe because Paul Parker reckoned they might want to keep a
copy of this for future reference, and/or take bits of it to incorporate
into the current slip.help file.

------------------------------ cut here ------------------------------

		       Setting Up SLIP On A Sun-3
		       --------------------------

		       Jonathan Hardwick, jch@cs


INTRODUCTION:

This file details my experiences setting up a Sun-3/50 workstation to
use from home as a glorified X terminal.  It is intended to help those
wishing to pursue the same (or similar) route in the future, and to take
some of the load off all the people who had to answer my dumb questions.


WHY DO YOU WANT X11 AT HOME?:

I assume that you are fed up with 80x24 dumb terminals.  This is a
personal thing; I know that I can write better code, and faster, if I
have lots of big windows open at once, with full mouse support.  Some
applications (ie previewing .dvi or .ps output) are impossible to do
without X.  But be warned that graphics-intensive stuff will run slowly
over a phone line.  X was built with 10Mbps ethernets in mind, and it
doesn't take too kindly to being throttled back to just 2% of this.  


PREREQUISITES:

1) 19.2kbps MCN connection and DOV modem, *or* a standard high-speed (eg
V.32bis) modem.  The second option saves $25/month in MCN charges, but
means that you have to compete with everyone else for the high-speed SCS
modems, as opposed to keeping SLIP up indefinitely over MCN.  This
document assumes the use of MCN.

2) Sun-3 workstation with SunOS, X11 and a hard disk.


GETTING A NAME:

Tell gripe what you want to do.  They'll tell you to run the netregister
program, which adds your chosen machine name to the database.  In a
couple of days, hostq will recognize your machine name.  You're in
business.


GETTING THE SOFTWARE:

Next, you want to hook your machine up to the Ethernet at school to get
the software you need.  Ask gripe's permission first.  You'll probably
need to do something like
	ifconfig le0 <your IP address> up
to configure your ethernet interface once you're plugged in

Now you have two choices:

Solution 1: Facilities has built a Sun-3 MACH kernel with SLIP support.
Talk to Paul Parker; he'll point you in the direction of the kernel and
other goodies.  Install-and-go, using the slip.help file.

Solution 2: If you're short of memory (ie a standard 4 Meg Sun-3/50) the
MACH kernel may be too big -- you'd spend all your time swapping between
MACH, X11, and whichever xterm you were in at the time.  Instead, you
can get the standard SLIP distribution and build it into your SunOS
kernel.  The prime archive site is ftp.cs.toronto.edu.  There are
different versions for SunOS 3.5 and SunOS 4.0.  Doug DeJulio has built
the 3.5 version; I built the 4.0 version.  They are significantly
different, and the rest of this text is oriented towards the 4.0
version.  Note: you *still* want to talk to Paul Parker and get a copy
of the slip.help file.


INSTALLATION:

Just follow the instructions for your SLIP software.  Even building a
kernel for the first time is easy on a SunOS system, since they supply a
hand-holding README file.  Things can get a little more tricky if you
are anal-retentive about building the smallest kernel possible.  For
people wanting to build sub-500k-size kernels, I recommend the nutshell
book "System Performance Tuning", by Mike Loukides, published by
O'Reilly & Associates.  ISBN 0-937175-60-9, $24.95, or I have a copy you
can borrow.  I can also give you the config file I used.


BOOTING:

When you have a SLIP-capable kernel, and have verified (whilst still
within easy reach of an ethernet tap) that you haven't broken anything,
disable the ethernet stuff, take the machine home, and hook everything
up, connecting the serial line from the modem to eg serial port A.
First priority is to check that you can make a normal connection, using
either tip or kermit.  Kermit is less intimidating and needs no startup
file, but doesn't want to go above 9600 bps.  This is only important for
the SunOS 4.0 SLIP software, which can't change the line speed of the
SLIP connection by itself.  Tip needs more effort, but handles 19200 bps
and is available in a SLIP-specific version (see later).  The slip.help
file explains the use of kermit, so I'll concentrate on explaining tip.

Add an entry to /etc/remote that looks something like this:
	annex:\
		:dv=/dev/ttya:br=#19200:nt:
Then type eg:
	tip annex
and you should be connected.  If tip complains that you don't have
permission to access /dev/ttya, check two things:
	1) any lock files in /usr/spool/uucp?  Remove them.
	2) the owner of tip; mine was setuid uucp.  Make a root-owned
           copy of it, and try again.
See tip(1) for more information about tip's commands -- the three
important things to remember are that ~ at the start of a line is the
escape character, and you can then hit Ctrl-D to quit tip, or ! to
escape to a subshell.

From inside tip, hit RETURN until you're at an "annex:" prompt.  Type
the command "slip".  The annex box should tell you its server IP address
and the local IP address which you have been assigned.  It will then
wait for you to start up SLIP.  Get back to a root prompt without
leaving tip (the easiest way to do this is to escape to a subshell).
Start up SLIP.  With the SunOS 4.0 version, I type:
	sliplogin <server IP address> <local IP address> < /dev/ttya &
The MACH and SunOS 3.5 versions need:
	slattach ttya 19200

sliplogin/slipattach should now take over the /dev/ttya connection, so
you can quit out of tip/kermit.  MACH/SunOS 3.5 versions also require:
	ifconfig sl0 <local IP address> <server IP address> -trailers up

After all this, you should be able to ping the server IP address.  To do
anything more useful, you need to tell your machine to forward all IP
traffic through the server, ie:
	route add 0 <server IP address> 1

Now you should be in business, and able to telnet/ftp/xhost/etc to any
internet-connected machine.  One problem is that each time you connect
up to annex, you'll get a different server and local IP address.  To get
something more permanent, type "slip" at the "SERVICE?" prompt of MCN,
then enter eg your andrew id and password when prompted.  After you
answer a series of questions about what machine you're using, who you
are, etc, Data Communications (dc0m+@andrew) should get back to you the
next day with an assigned local IP address.


FINE-TUNING:

You probably want to start up an xterm with the -C option, which
redirects all console output to that xterm.  Otherwise the console
messages produced whenever SLIP goes up or down get splatted across your
X display.

The SLIP for SunOS 4.0 occasionally produces "sz0: silo overflow" errors
on the console, presumably because the Sun's serial interface chip is
overflowing.  These can be reduced by configuring the straight-line path
in tty_slip.c to be as short as possible (#undef SLIP_FASTECHO, #define
SLIP_UCACHE, #undef SLIP_STATS).

In the slipware.tar.Z file (from the archive site) is a version of tip
with SLIP support.  This tip can start up SLIP as soon as the connection
goes through, and adds limited scripting support, so that you can
automate the whole process.  However, since it expects to find the
server and local IP addresses in /etc/remote, you really need an
assigned local IP address before you start playing.


THANKS TO:

Paul Parker, Karl Kleinpaste, Doug DeJulio, Tom Holodnik, Bennet Yee,
Randy Dean, and David Eckhardt.

