The Wayback Machine - https://web.archive.org/web/20010108030800/http://www.cs.mu.oz.au:80/appletalk/readmes/ARNS.README.html

A Remote Network Server - ARNS

The University of Melbourne djh@munnari.OZ.AU January, 1992 version 1.13 ARNS is 'A Remote Network Server' package for AppleTalk that allows a remote client to participate in local network services such as printing and file sharing. The ARNS server runs on a UNIX host that is connected to an EtherTalk network. Connectivity between a client and server may be provided by a variety of transport systems. This version of ARNS supports UDP/IP datagrams and TCP/IP streams. ARNS client nodes (which may be anywhere on the IP connected Internet) can be any of the following: * A Macintosh with EtherNet card, MacTCP 1.1 and IPRemote AT adev. * A Macintosh with Async AppleTalk adev 2.0 connected to a serial port on a UNIX machine running the 'async' program. * A Macintosh with Apple Remote Access (vers 1.0 or 2.0) software connected to a serial port on a UNIX machine running 'aarap'. * A Macintosh or PC with PPP software connected to a serial port on a UNIX machine running the 'atppp' program. 'atppp' supports both IP and AppleTalk with AppleTalk-aware PPP clients. IPRemote and Async AppleTalk2 are included with the ARNS distribution, 'aarap' and 'atppp' are available via FTP from munnari.OZ.AU in the directories mac/arns_arap and mac/arns_ppp.

NOTICE


Copyright (c) 1992-1994, The University of Melbourne. All Rights Reserved. ARNS may NOT be publicly redistributed (for example via anonymous FTP), sold, or the source used for any other purpose without the permission of the copyright owner. This software is supplied "as is" without express or implied warranty. djh@munnari.OZ.AU

ARNS SERVER


The ARNS server currently supports Phase 1 and Phase 2 EtherTalk networks on SUN SunOS/Solaris, DEC ULTRIX/Alpha, SGI IRIX, Sony NEWS 4.2, HP-UX 8.07 and IBM RS6000 AIX, Linux 1.1.74, BSDI BSD/386 1.1 and FreeBSD 2.0 workstations, and Phase 1 only on Sony NEWS pre-4.2 and 386BSD/FreeBSD 1.0 workstations. Security for access to the server is provided with an optional server password and/or username & password pair. Access can be restricted to clients that appear on an IP address filter list. The server may only be run by a UNIX superuser. ARNS provides specific services on behalf of its connected clients: * Proxy AARP. ARNS allows a client to obtain an address on the local EtherTalk network by handling AARP (AppleTalk Address Resolution Protocol) lookups for client node numbers. The ARNS server answers with the ARNS host ethernet hardware address. * Routing. EtherTalk packets sent to the server host ethernet address are forwarded to the client node. Client AppleTalk data packets sent to the server are transmitted as EtherTalk packets. * Filtering. ARNS filters RTMP broadcast traffic, minimising the waste of client node bandwidth (speeds can be as low as 1200 baud). * Cacheing. ARNS caches client NBP entities and answers network NBP lookups from internal tables, again minimising client traffic.

IP Networks

An ARNS client may open a UDP/IP connection directly to the server or via a TCP/IP stream to an ARNS/TCP relay daemon (arnsrd) running on the ARNS host. 'arnsrd' is an inetd(8) client and is started only in response to a TCP link connection request. Delivery between arnsrd and the ARNS server is via the loopback interface using UDP/IP. A similar mechanism could be used for other types of data links, eg: X.25. Note: When using ARNS over an Internet, be aware that "idle" connected clients generate a small amount of continuous traffic. This can be minimised by not leaving AppleShare sessions connected unnecessarily and ensuring that the Chooser is closed when not in use. The Macintosh adevs mentioned above are compatible with both System 6.0 and System 7.0 Macintosh Operating Systems.

ARNS SERVER RESTRICTIONS


Under ULTRIX 4.N it may be necessary to run the command 'pfconfig +copyall interface' Additionally, to run on Phase 2 networks, you need the appropriate ULTRIX Packet Filter patches (the same requirements as for CAP Native EtherTalk). It's not currently possible to run ARNS on the same host with CAP in Native EtherTalk mode. The shareware version of UAR (UNIX AppleTalk Router) acts as an ARNS server and allows both ARNS and CAP configured for UAR to operate on a single host. To run ARNS on networks where there are no local AppleTalk routers, the end nodes must be running Phase 1 AppleTalk code. This limitation is expected to be removed in a later release. Please report any problems via email to djh@munnari.OZ.AU

ARNS INSTALLATION


ARNS uses an IANA assigned "well known port". Add the following lines to /etc/services or the NIS database arns 384/udp # AppleTalk Network Server arns 384/tcp # AppleTalk Network Server To install the ARNS server, 'make arns' and install it in /usr/local/etc. The ARNS server should normally be started from /etc/rc.local or the CAP startup file start-cap-servers. The arguments to arns are as follows: -d number bit positions in [number] print debugging messages for various subsystems. For details see arns.h. -l logfile use "logfile" for logging output. -f filter use "filter" as the IP filter list, sample below. -P password use "password" to control access to the server. -p password as above but also permit a username/password pair. -i interface use the listed ethernet interface, ie "le0". -n number [number] represents the maximum users permitted. -z zone use "zone" as the default Phase 2 zone. -1 | -2 use either Phase 1 (default) or Phase 2. EG: arns -l logfile -f filter -i ie0 -2 -p yoicks The filter list file contains IP network masks that are applied to incoming connections and a */+/- indicator to describe the permission. The filter list file may be edited at any time, a SIGHUP signal sent to the arns process causes the list to be reread when the next connection is attempted. IE: # # A Remote Network Server for AppleTalk # IP Address Access Filter List # # The filter list consists of a single character mode, an IP # mask and optional IP address. If the latter is included, # the mask is applied to the incoming IP address and tested # against the provided address. Otherwise the incoming IP # address must be unchanged by the mask. # # Modes: # # * IP_MASK [ IP_ADDR ] permit access, no password required # + IP_MASK [ IP_ADDR ] permit access, demand password # - IP_MASK [ IP_ADDR ] deny access # # signal SIGHUP causes list to be reread # # arnsrd relay daemon or localhost + 127.0.0.1 # any mac on a specific subnet + 255.255.255.0 192.43.207.0 # no password required for connections from ariel * 128.250.255.255 128.250.20.3 # anybody else on campus, they need a password + 128.250.255.255 # nobody else - 255.255.255.255 Note: The filter code currently grants permission for addresses not explicitly listed. It would be prudent to always include a line of the form - 255.255.255.255 at the end of the filter file. To install the TCP/IP relay daemon, 'make arnsrd' and install it in /usr/local/etc. Add the following line to /etc/inetd.conf arns stream tcp nowait root /usr/local/etc/arnsrd arnsrd or, if using the IP filter list (eg: in file "filt"), add the -f option: arns stream tcp nowait root /usr/local/etc/arnsrd arnsrd -f filt As root, send a SIGHUP to the inetd process. On BSD-type systems, the status of the arnsrd process can be obtained from a ps(1) listing (ala sendmail). The format is of the output is -arns hostname (X/Y T) (arnsrd) where 'hostname' is the name or IP address of the client making the TCP connection, X is the number of TCP packets input, Y is the number of packets output and T is the time in hours, minutes and seconds that the link has been up. Since the space available for this status string is limited, the time field may be truncated. If this is a problem, change the inetd.conf entry to contain extra arnsrd argument space, for example, to get an extra 40 characters, the inetd.conf entry would look like the (single) line: arns stream tcp nowait root /usr/local/etc/arnsrd arnsrd ........................................

ARNS ASYNC CLIENT


The UNIX end of the async appletalk connection is "async". 'make async' and install in /usr/local/bin (or /usr/local/cap) for use by any user. The source requires no special installation or host services and can therefore be transported to and compiled on any BSD UNIX host to provide AppleTalk connectivity for travellers. NB: async is currently incompatible with the connection methods used by the original async package, you may wish to call this binary async2. Usage is async [-ltu] [ servername ] if no servername is given, async expects to be able to contact an ARNS server on the local host. If async determines that "servername" is a distant connection (by measuring the turnaround time for an ARNS tickle packet) it tries to contact the ARNS/TCP relay daemon (arnsrd) at the same address, if this fails, UDP/IP will be used. If the ARNS server requires a password, async prints Password: If the connection is granted, the async appletalk adev login window disappears and normal AppleTalk use should be possible from the Chooser. Any error in the connection (invalid password, illegal IP address or too many users) causes an error message to be printed and async to exit. The -l option causes async to check the serial line for 8-bit transparency. The -t option initiates a TCP connection independent of the link delay. The -u option prompts for a login name and user password for validation on the remote ARNS server (if using the -p option). For installation and usage instructions for the IPRemote adev and the Async AppleTalk adev, see the README file in the clients directory.

Notes


------------------------ Notes for IBM AIX users: You MUST manually set the define "AIX" in Makefile and clients/Makefile. If you use the interfaces named in 'netstat -i' you may receive the message "en1: A file or directory in the path name does not exist." Instead, use the network interfaces named "ent0" or "ent1" etc. If "netstat -i" shows interfaces called en0 and et0, then your RS6000 system is configured to run with 802.3 Ethernet (the "et0" adapter) and you will not be able to run ARNS with EtherTalk Phase 2. Unless you really need 802.3 Ethernet support, it is safe to turn off the "et0" interface. This is done using smit tcpip Select the following menu items Further Configuration Network Interfaces Network Interface Selection Remove a Network Interface et0 IEEE 802.3 Ethernet Network Interface You may have to reboot the machine afterwards. -------------------------------------------- Notes for DEC Alpha OSF/1 release 1.3 users: You MUST manually set the define for LIBS=pfopen.o in the Makefile and copy /usr/lib/examples/packetfilter/pfopen.c to the ARNS directory. ---------------------- Notes for HP-UX users: If you receive the message "/dev/lan0: device busy" then you may need to upgrade your operating system to HP-UX 9.04 or greater. ----------------------- Notes for 386BSD and FreeBSD 1.0 users: You must install the Berkeley Packet Filter on your system and define -D__386BSD__ in the CFLAGS= line in the Makefile. At this stage, 386BSD supports only Phase 1 EtherTalk due to limitations in multicast support in the 386BSD ethernet driver. --------------------------- Notes for FreeBSD 2.0 users: You must define -DFreeBSD in the CFLAGS= line in the Makefile. There appears to be an error in the ethernet driver (at least in the ed0 version) which causes the IEEE 802.3 length bytes to be reversed. You may also need to define -DFreeBSD_SWAP_BUG in the Makefile. -------------------------- Notes for Sony NEWS users: Yasuaki Honda Sony Computer Science Laboratory Inc. honda@csl.sony.co.jp You may know that recently Sony Corp. released NEWS-OS4.2 which supports AppleTalk protocols. ARNS runs on both NEWS-OS4.2 and pre-4.2 NEWS-OS that supports /dev/ether0 device. This note describes how to use ARNS on SONY NEWS. 1. /dev/ether0 Please make sure that /dev/ether0 exists. If not, you can make this device file by issuing the following command in the directory /dev: % sh MAKEDEV ether0 2. Restrictions on pre-4.2 users You cannot use phase 2 option (-2 option) on this OS version. This is because multicast address cannot be set on /dev/ether0. The only way to use phase 2 is to upgrade to NEWS-OS4.2. 3. Restrictions on 4.2 users You cannot use ARNS and AppleTalk facility provided by OS4.2 at the same time if you want ARNS to speak phase 2. Don't run ARNS in phase 2 mode if atconfig is up. To make sure that atconfig is down, issue the following command: % atconfig en0 down On the other hand, you can run ARNS in phase 1 mode (use -1 option) and AppleTalk facility without any problem. 4. General Restrictions Because ARNS uses /dev/ether0 and the device file cannot be opened at the same time by more than one processes, you can run only one of the following programs on the same host: ARNS uab for CAP6.0 rarpd (on pre-4.2 NEWS-OS) Rarpd on NEWS OS4.2 now uses BPF and can run simultaneously with processes using /dev/ether0. 5. Compiling on pre-4.2 Just invoke make command. 6. Compiling on OS4.2 You must put -Dsony_phaseII option on compiling arns.c and pf.c files. Edit Makefile for these lines. Then make it. 7. Usage On pre-4.2 OS, the following is the typical way to invoke ARNS: % arns -l logfile -f filter -1 -i /dev/ether0 The -1 and -i options with /dev/ether0 argument are necessary. On OS4.2, use the following instead: % arns -l logfile -f filter -2 -i /dev/ether0 Then arns will speak phase 2. 8. Known problem I sometimes experienced strange behavior about SONY NEWS OS4.2. Suppose there is an ethernet segment on which two SONY NEWS (OS4.2) and a mac is connected. Also a GatorBox is connected to the same ethernet segment. On news1, afsd (which is a daemon for apple file sharing) is running, and on news2, ARNS is running in phase 2 mode. The mac is installed MacTCP and IP Remote AT client for ARNS, which is selected as link access method and connected to ARNS. The problem I encountered is that I cannot see afsd in chooser!!! However, if select ethertalk phase 2 as link access method, then it is there. I can connect to afsd and everything works fine. In addtion if I connect to ARNS from my mac at home using async and AsyncAtalk2, then I can see everything as if I used ethertalk phase 2. I have tracked down the reason of this behavior. It seems that there is a bug in managing AARP table on SONY NEWS OS4.2. The only workaround I know is that if you encounter this phenomenon, then kill afsd and issue: % atconfig en0 down then % atconfig en0 up on the host whose afsd is invisible. This will initialize AARP table and everything will be visible.