UNIX, TCP/IP, and Macs
Donald C. Stone
Until recently, I was the system administrator for a
group of UNIX
workstations used mainly for CAD and highway-design
applications.
In that capacity, I was given responsibility for implementing
GIS
as well as taking on some development for Internet applications.
The
UNIX setup consist of 70+ HP/Apollo 3500/425t/700 workstations
running
Aegis/BSD4.3/HP-UX and 15 Intergraph workstations running
CLIX. The
Apollos are connected as a Domain Ring network, with
one workstation
that serves as a gateway hanging on the same ethernet
LAN as the Intergraph
workstations. The LAN exits our office via a Cisco router
to the rest
of the department's statewide network.
Meanwhile, we have 80+ Macintosh's AppleTalking to each
other using
standard phonelines hubbed at a Tribe switch then connected
to Cayman
Systems' GatorBox. The GatorBox serves as a gateway
to other AppleTalk
networks throughout the department. The GatorBox is
physically connected
to the same LAN as the Intergraph workstations and Apollo
gateway;
it also uses the Cisco router to exit the office.
Mac/UNIX Communication
We had a problem, in that our Macs could not talk to
our UNIX workstations.
The Macs were using AppleTalk while the workstations
were using TCP/IP.
After doing some investigating and querying the Internet,
I came across
NCSA/BYU Telnet (& MacTCP), a software packaged
developed by Jim Logan
of BYU and Scott Bulman of NCSA (at UIUC). The NCSA
software was public
domain (and thus was within our budget constraints)
and easy to install,
requiring only the specification of a few parameters.
(The install
process for the NCSA Telnet software minimally requires
only that
the MacTCP driver be configured, a process which is
GUI menu-driven.)
The GatorBox did not require additional software. However,
through
the GatorKeeper software (the administrative software
for the GatorBox)
I had to turn on the TCP/IP option, assign a static
IP address, provide
the IP address for the Cisco router, establish a range
of IP addresses
(64 maximum) to be used for dynamic assignment, and
finally reboot
the GatorBox.
On the Mac side, each machine had to have the MacTCP
driver installed
in the "Control Panels" folder and the NCSA/BYU
Telnet software
installed in a folder of the user's choice. The MacTCP
driver was
configured to obtain its IP address from the GatorBox
by switching
on the server mode and providing the static IP address
of the GatorBox.
NCSA/BYU Telnet includes three files that can be configured,
but configuration
is optional. The first of these,config.tel, is configured
similarly to an /etc/hosts file; it contains IP addresses
and logical names. The second, passwd, is configured
with
usernames and passwords, like the /etc/passwd file.
If this
file is empty or does not exist, anyone can connect
to a Mac running
telnet. The third file is a session file; it can contain
IP addresses
or logical names that the user can access via icons
on the Mac desktop.
For our situation, I decided to use the dynamic IP addressing
feature
on the GatorBox that serves as our AppleTalk gateway.
The GatorBox
required a static IP address, with the next 64 addresses
reserved
for dynamic assignment. I then configured the MacTCP
driver resident
on each Mac to obtain its address from the GatorBox.
Each time a Mac
executes telnet, the Gatorbox assigns it an IP address
which remains
allocated until the Mac is rebooted. Since the GatorBox
allows only
64 connections and we have 80+ Mac's, the dynamic addressing
worked
well. A few spot checks revealed that we rarely had
more than 30+
Macs using telnet simultaneously.
A MacIntosh-Style File Transfer
At this point, the handshaking was complete. Users could
now telnet
or ftp between the Macs and the UNIX workstations. However,
Mac users being what they are, I knew I needed to come
up with a point-and-drag
process for file transferring. To provide this, I set
up one of the
Mac file servers with a static IP address (the GatorBox
allows static
addressing even though the default may be dynamic) and
configured
the server to execute NCSA/BYU Telnet at boot-up. I
then created a
folder named "File Transfer" on the file server.
I then placed
an alias (Mac version of links, sort of) on each Mac
client's desktop
pointing to the folder on the file server. This configuration
allowed
Mac users to simply drag files to the alias, which automatically
placed
a copy on the file server.
UNIX users can then execute a shell script I wrote,
called mcftp
(Listing 1), which ftps a file from the Mac file server.
The
shell script is configured with the server's static
IP address and
folder name. I also entered the Mac's static IP address
in the /etc/hosts
file, so that UNIX users could execute ftp manually
if they
would rather do so.
The reverse transfer process worked the same way. UNIX
users use the
shell script mcftp (or ftp) to transfer the file to
the folder on the file server. Mac users simply double-click
on the
alias on their local desktop and point-and-drag the
file to their
machine. Mac users are happy because they can still
use point-and-drag;
UNIX users are happy because all transferring is centralized
on one
Mac file server; and my boss was happy because the only
cost to the
department was my time.
An Extension
This solution lent itself to another development. The
UNIX worstations
are networked to three B&W/color electrostatic plotters
that are used
for CAD files. Mac users were limited to B&W/color
laser printers,
which are only able to generate tabloid size or smaller.
I determined
that I could use the same concept for plotting as I
used for file
transfer. In this case, each Mac client has aliases
called "Color
Plots" and "B&W Plots," which point
to their respective
folders on the Mac file server. I wrote a shell script
-- mcplot
(Listing 2) -- to run as a daemon on the UNIX workstation
driving
the plotters. The daemon uses ftp to check the folders
on
the Mac file server for postscript files. If it finds
PostScript files,
it copies the files to a local scratch directory on
the UNIX workstation
and then submits them to the plotting environment. Every
three minutes,
the daemon returns a text file containing queue status
information
to the plot folders on the Mac file server. Mac users
can use these
aliases to view the queue status file by double-clicking
on the object.
The mcftp shell script requires simply designating a
static
IP address and a folder on a Mac and then defining two
variables in
the script itself. The mcplot script may require a little
more modification if your plotting software/hardware
is different
from mine. Since there are many plotting products, my
point here was
to illustrate a possible peripheral-sharing scenario.
A Small Problem
As happens with all development, I did run into a snag.
Periodically,
the Mac server running NCSA/BYU Telnet would lock up.
Sometimes it
would run for a week; sometimes, just a couple of days.
I used a product
already installed on the Mac server -- from CE Software,
Inc. -- QuicKeys,
to create a macro that reboots the Mac server at midnight.
Since nobody
ever uses the system at that time of night, this solution
has worked
well.
Conclusion
I would like to thank the folks at Cayman Systems, Inc.
and NCSA who
provided technical expertise along the way via their
helpdesks. I
would also like to thank some co-workers who contributed
greatly to
this effort: Mark Amundsen of Intergraph Corp. (on-site
field engineer),
Juanita Holley (Mac Coordinator), and Brad Miller (CADD
Coordinator).
NCSA/BYU Telnet (& MacTCP) software can be obtained
by sending a request
to mactelnet@ncsa.uiuc.edu or by using snailmail:
NCSA Software Development
152 Computing Applications Building
605 East Springfield Avenue
Champaign, IL 61820
For more information concerning Cayman Systems' GatorBox,
send email
to sales@cayman.com, call their front desk at (617)
932-1100,
or use snailmail:
Cayman Systems, Inc.
400 Unicorn Park Drive
Woburn, MA 01801
You can request the mcftp and mcplot shell scripts
and their accompanying readme file by sending the following
email message:
Send to: ftpmail%t3ew@dot.ca.gov
Subject: <none>
Message: connect
get software/mac/mcftp
get software/mac/mcplot.tar.uuen
get software/mac/readme
quit
The readme file contains configuration requirements.
If you have any questions, you can contact me through
email at cmcis@baste.magibox.net
or by phone at (901) 751-4893.
About the Author
Donald C. Stone is UNIX System Administrator with Corporate
Marketing Concepts, Cordova, Tennessee. You can reach
him via email
at cmcis@baste.magibox.net.
|