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

UAR - UNIX AppleTalk Router

The University of Melbourne
djh@munnari.OZ.AU
October, 1993
version 1.0.16


UAR is a 'UNIX AppleTalk Router' supporting Phase 1 or Phase
2 AppleTalk routing between multiple ethernet interfaces on a
UNIX workstation.  UAR also supports CAP (Columbia AppleTalk
Package) services and simple AppleTalk packet tunneling over
an IP internet.

	Note: CAP with UAR provides a similar functionality
	to CAP in Native EtherTalk mode, but on a wider
	variety of host types.

UAR currently supports Phase 1 and Phase 2 EtherTalk networks
connected to SUN SunOS/Solaris, DEC ULTRIX/Alpha, SGI IRIX,
Sony NEWS 4.2, HP-UX 8.07, IBM RS6000 AIX, Linux 1.1.74,
BSDI BSD/386 1.1, NetBSD 1.0 and Free BSD 2.0 workstations,
and Phase 1 only on Sony NEWS pre-4.2 and 386BSD/FreeBSD 1.0
workstations.

	Note: UAR also supports AppleTalk over FDDI for ULTRIX
	and Digital UNIX. Refer to the "Notes for DEC FDDI"
	section below.


NOTICE


Copyright (c) 1993-1995, The University of Melbourne. All Rights Reserved. UAR 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.

Freeware


UAR version 1.0 is "freeware", it may be used to route AppleTalk packets on a small number of UNIX hosts within a single organisation at no cost (please note the distribution and reuse restrictions listed above).

Shareware


Sites may, however, elect to pay a nominal/negotiable shareware or site license fee. Payment of this fee entitles the site to inclusion on a mailing list for notification of updates and bugfixes, higher priority attention for problem reports and, most importantly, encourages further development on this and other packages. In addition to the freeware features, UAR shareware version 1.1 supports * ARNS services for Async ATalk2 and IPRemote clients * Tunneling of AppleTalk packets via TCP streams * NBP filtering of Objects, Types or Zones The academic shareware fee is $25 per host, or $100 for a site license (Note: $=AUD for Australian sites, $=NZD for New Zealand sites, elsewhere $=US). Rates for non-academic sites can be negotiated using the addresses given below. The regular mail address for corresponence or payments is UNIX AppleTalk Router Department of Computer Science The University of Melbourne 221 Bouverie Street Carlton 3053 Victoria Australia Cheques (please don't send cash) should be payable to "The University of Melbourne, Department of Computer Science" (Note: due to the high fees imposed by the local banking system, we are unable to accept payment by EuroCheque). Please include both your regular and email addresses in any correspondence. UAR version 1.0 is available via FTP from munnari.OZ.AU as the file mac/uar.tar.Z Please report any problems via email to uar@munnari.OZ.AU

Configuration


The router is configured from a configuration file, if no file is provided the router will glean the necessary information from other routers on the network (ie: it acts as a non-seed router). You can also run UAR with one or more non-seed interfaces by simply leaving the interface configuration data out of the configuration file. The default configuration file name is /usr/local/lib/cap/uar.conf. An example file: # configuration file for UAR # interface le0 node 244 network 83.5 networklo 83.5 networkhi 83.6 zone unimelb-CompSci zonelist unimelb-CompSci zonelist unimelb-Maths zonelist unimelb-Stats zonename unimelb-Maths phase 2 cap on interface le1 network 83.4 zone "unimelb-CompSci" zonelist "unimelb-CompSci" timesrvr mulga phase 2 cap off There should be a "zonelist" entry for each of the zones on a Phase 2 network (including the default zone). Note: this is not the same as the full zone list for the entire network. The "zone" entry should contain the default zone name for the cable. CAP services will appear in the default zone unless explicitly set to one of the local cable zones with a "zonename" entry. The "node" entry is optional. If not supplied, node numbers are assigned starting from 253 (for Phase 2 networks and 254 on Phase 1 networks). On EtherTalk interfaces the node numbers are dynamically assigned using the "node" entry as a hint. Multinode services, ie: CAP are assigned starting from the interface node number downwards. For this reason it is suggested that the node hint be chosen from the high end of the valid range (1-253). The "timesrvr" entry enables an AppleTalk time server on the designated interface. The client Macintosh uses the 'tardis' extension from within the Chooser. The configuration information in uar.conf *MUST* be identical to that configured into other routers for the local network. If the network range or default zone information in the usr.conf file does not match that of other routers on the network, UAR will write a PANIC message to a log file (by default /usr/tmp/uar.log) and exit.

UAR Installation


To install the UAR router, run 'make uar' and 'make install' (which copies the UAR binary to /usr/local/cap). The arguments to uar are as follows: -d number bit positions in [number] print debugging messages for various subsystems. For details see uar.h. -l logfile use "logfile" for logging output. -1 | -2 use either Phase 1 or Phase 2 (default is 2). -c don't use DDP checksums (default is on). -C attach CAP to the first interface. Normally CAP services are specified in the configuration file. Use -C only for non-seed routers (no config file). -t server attach a timeserver to the first interface. Use -t only for non-seed routers (no config file). -v print the UAR version number and exit. [interfaces] one or more ethernet interface names as listed by 'netstat -i' or the special interface name "tnnl". Interface names that match those listed in uar.conf are 'seed' interfaces, others are 'non-seed'. EG: uar -d 3967 -l logfile -2 ie0 ie1 tnnl Refer to the UAR manual entry for more information. ('nroff -man uar.1l | more')

Time Server


UAR can provide a current time service to Macintoshes using the 'tardis' Chooser extension. You can enable timeserving on one or more interfaces (but only one is necessary) by adding a uar.conf entry of the form timesrvr "timeServer" to the selected interface. "timeServer" is the name to appear in the Chooser of the client Macintosh. Macintosh time is set from the selected server when the Mac is booted, by the user from the Chooser or daily at a specified time.

CAP


If your CAP distribution is at patch level 144 or greater, run the Configure script and choose the UAR (and, if appropriate, Phase 2) options. Run 'gen.makes' and rebuild CAP. Start UAR first in the start-cap-servers script with a 'sleep 20' prior to starting 'atis' CAP=/usr/local/cap ${CAP}/uar ie0 ie1 arns sleep 20 # aarpd is not necessary with UAR ${CAP}/atis sleep 5 ... If CAP is at a patch level less than 144, Configure CAP for use with UAB. On hosts where UAB support is not available in the "Configure" script, or CAP is to be used with Phase 2, compile CAP for IPTalk (select the default answers for all "Configure" questions) and edit the m4.features file to include the lines # + PHASE2 add support for AppleTalk Phase 2 define(`specialcflags',concat(specialcflags,` -DPHASE2')) # Then run 'gen.makes' to create the makefiles. cd to cap60/lib/cap and edit the file 'makefile'. Change the line LAPOBJ=abkip.o abddp.o abnbp.o atalkdbm.o to LAPOBJ=abmkip.o abddp.o abnbp.o atalkdbm.o ^ The abmkip.o library handles the modified KIP delivery used with UAR and UAB. Compile CAP as usual, 'make include', 'make programs' etc ... Don't run 'uab', run 'uar' then 'atis', 'atlook', 'getzones'. Refer to CAP installation documentation for more information.

TUNNELING


UAR supports a simple method for tunneling AppleTalk packets over an IP internet. That is, EtherTalk networks separated by IP-only routers may be joined seamlessly by running UAR on UNIX hosts connected to each net. By default, packets are carried via UDP/IP. The shareware version of UAR supports tunneling via TCP/IP data streams. The only restriction is that network numbers at each location must be unique across the extended EtherTalk network. ie: network number remapping is not supported. IP tunneling is specified as an additional interface in each uar.conf file as follows interface tnnl node 253 network 83.3 zone unimelb-CompSci peer "253 @ 128.250.97.86" peer "252 @ 128.250.73.40" phase 2 A Macintosh using the IPTnnl adev (a Network Control Panel client) can also be connected to a UAR tunnel, or used to connect to other IPTnnl equipped Macintoshes. For more details, refer to the 'IPTnnl userDoc' file which is available via FTP from munnari.OZ.AU in the file mac/iptnnladev.1.0.sit.hqx.Z Each UAR host or IPTnnl Macintosh participating in IP tunneling must contain identical network, zone, peer and phase entries and each must have a unique node number. A UAR tunnel, since it is effectively a separate network/cable, must be assigned a unique network number. The peer entries are used to map node numbers to IP addresses. For security reasons, remote UAR/IPTnnl hosts are not permitted to participate in tunneling unless their IP address is explicitly listed as a peer in the local uar.conf file or IPTnnl configuration. On UNIX hosts that have multiple ethernet interfaces (and thus multiple IP addresses), a peer entry for the local node number (253 in the above example) is used to specify which interface address is to be used for outgoing traffic. The default UDP port used for tunneling is 9115. To change this, add an entry to /etc/services for all participating hosts: tnnl 9115/udp # UAR tunneling port

Statistics


UAR versions 1.0.15 and below can be requested to dump the AARP, RTMP, ZONE and statistics tables by sending signals to the UAR process. The signals are HUP dump the RTMP table to /usr/tmp/uar.rtmp QUIT dump the AARP table to /usr/tmp/uar.aarp USR1 dump the ZONE table to /usr/tmp/uar.zone USR2 dump the stats table to /usr/tmp/uar.stats eg: kill -QUIT [pid] IMPORTANT: The function of signals changed in UAR versions 1.0.16 and 1.1. The signal QUIT dumps the AARP, RTMP, NBP, ZONE and statistics tables. In version 1.1, HUP causes the ARNS IP filter file to be re-read. USR1 and USR2 are currently ignored. The location of the dump and log files may be changed by editing the file uar.h or defining a new path in the Makefile. ie: -DLOGFILE="/var/log/uar.log"

ForceDDPCheckSum


The Macintosh AppleTalk code does not normally send DDP packets with DDP checksums enabled. In some situations, this can result in corrupted AppleShare files or print jobs. ForceDDPCheckSum patches the PWriteDDP control call to the AppleTalk driver to set the "Compute Checksum" bit for all packets the Mac sends into the network. This will allow the receiver of a corrupted packet to detect the error and discard the packet. You can also use the following URLs to get the file via FTP: ftp://munnari.OZ.AU/mac/ForceDDPCheckSum.hqx ftp://ftp.dartmouth.edu/pub/mac/ForceDDPCheckSum.bin To use ForceDDPChecksum, simply drag it to your system folder (it's an extension) and restart.

Notes


UAR runs as a UNIX user process, it's not designed for continuous, high-throughput situations. For this purpose you should consider an external dedicated hardware gateway, for example, a Cisco. Some hosts only support a "small" number of multicast addresses per ethernet interface. Under SunOS, this is 64, under AIX (maybe) 10. If your local Phase 2 network range contains more than this number of different zones, you will have problems using UAR. Note that this is not the total number of zones on your network but the number of zones defined for the single network number range on the attached cable. At present the zone multicast limits are not known for other machines that UAR runs on. Although Apple supports up to 255 zone names per network, you should perhaps consider that your network is not well partitioned if you are using anywhere near this number ... djh ------------------------ Notes for IBM AIX users: You MUST manually set the define "AIX" in 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 UAR 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 UAR directory. ------------------- Notes for DEC FDDI: UAR supports FDDI interfaces under DEC ULTRIX and Digital UNIX (tested with the "fta" interface under OSF/1 3.2). You must define UPFILT_FDDI in the Makefile to enable the FDDI code. When used in this mode, you may mix FDDI and ethernet interfaces in the UAR interface argument list. ---------------------- 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 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. -------------------------- (edited ARNS version, as of July '93 UAR is untested on Sony NEWS) 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. UAR runs on both NEWS-OS4.2 and pre-4.2 NEWS-OS that supports /dev/ether0 device. This note describes how to use UAR 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 UAR and AppleTalk facility provided by OS4.2 at the same time if you want UAR to speak phase 2. Don't run UAR 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 UAR in phase 1 mode (use -1 option) and AppleTalk facility without any problem. 4. General Restrictions Because UAR 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: UAR 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 uar.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 UAR: % uar -l logfile -1 /dev/ether0 The -1 and -i options with /dev/ether0 argument are necessary. On OS4.2, use the following instead: % uar -l logfile -2 -i /dev/ether0 Then uar will speak phase 2.