@c Unix Networking @section Lambda-Plus Unix Networking Architecture The Lambda-Plus System 5 Unix software includes an implementation of Chaosnet that normally uses a connected LISP processor as a front-end server. It is possible for Unix to control the 3COM hardware interface, and thus access the physical network directly; however, this is not recommended, since it prevents the LISP processor(s) from using the 3COM. The Unix utilities @l(hostat) and @l(cftp) (Chaosnet File Transfer Program) provide functionality similar to their LISP program counterparts; see below for details. Note that Lambda-Plus Unix does not support the Excelan interface, and does not provide any TCP/IP access. However, there is a way for Lambda-Plus Unix hosts to access TCP/IP indirectly, using the front-end service of a Lambda LISP host. A user can run @l(cftp) to issue file transfer requests to a remote Chaosnet host, specifying a remote TCP pathname, and the remote Chaosnet host will forward the file via Chaosnet. See below for an example. @section Unix Chaosnet Configuration @b[steal from 3.0 Operations Manual] @subsection Unix Chaosnet Startup The @l(init) table file @l(/etc/inittab) distributed with System 5 defines multi-user initializations for Chaosnet, as follows: @display chi1::sysinit:/etc/chinit >/dev/syscon 2>&1 chi2::sysinit:/etc/chserver >/dev/null 2>&1 @end(display) The startup script @l(/etc/rc2) distributed with System 5 also makes a provision for initializing Chaosnet. It includes the following commands: @display # start the CHAOSnet server, if it's not already running... if grep " chserver$" <$ps >/dev/null 2>&1; then :; else /etc/chserver >/dev/null 2>&1; echo "chserver \c" fi @end(display) Thus when Unix is booted multi-user, the @l(chserver) server program should be running enabling file transfer, inter-processor communications, and other Chaosnet services. It is possible to reset Chaosnet and re-initialize the server programs. This would be necessary if, for example, the host table has been modified. The following script is not provided with System 5, but it can be created and run to reset Chaosnet: @display #!/bin/sh ## /etc/chreset ### Reset Chaosnet # Read in process status info ps=/tmp/chreset-ps ps -e | grep " chserver$" >$ps # kill the Chaosnet server, if it's running... if grep " chserver$" <$ps >/dev/null 2>&1; then (awk '{print "kill ",$1}' <$ps ) | tee | sh else echo "Chaos servers not running." fi sleep 5 ps -e | grep " chserver$" >$ps if grep " chserver$" <$ps >/dev/null 2>&1; then echo "Chaos servers refused to die." else /etc/chinit; echo "chinit \c" /etc/chserver >/dev/null 2>&1; echo "chserver \c" echo "\n Chaosnet reset `date` \n" fi rm $ps @end(display) @subsection Allocating the Ethernet Interface As noted previously, normal Chaosnet operations involve a connected LISP processor acting as an intermediary or front-end server. However, should it become necessary -- for example, if the LISP processor is shut down for an extended time -- it is possible for Unix to allocate directly a 3COM Ethernet board (if available). This is done with the utility program @l(/etc/ck), which displays or modifies the status of devices which are shared between LISP and Unix processors. For example, the command ``@l(etc/ck -a)'' displays the status of each shared device. The device ``Ethernet'' refers to the 3COM board, and it is normally listed as ``owned by lambda in slot 0''. The command ``@l(etc/ck -t ethernet)'' @i(steals) the 3COM board away from LISP. Resetting the Chaosnet software (see above) will cause Chaosnet to use the hardware directly, thus accessing remote Chaosnet hosts on the physical network. @b(Warning:) this should never be done when a LISP processor is operating with the 3COM interface! The command ``@l(etc/ck -f ethernet)'' @i(frees) the 3COM board for use by another processor. @section Unix Networking Operations The information in this section is based on the pertinent manual pages from the Unix documentation set. @subsection Hostat @label[section-hostat] Synopsis: @lisp hostat [ hosts ] @end(lisp) Description Hostat reports on the status of Chaosnet hosts. Zero or more host names may be supplied on the command line. If no host names are supplied, all hosts present in the binary host-table /etc/hostbin are polled for status. The following items are reported (numbers are reported in decimal unless indicated otherwise): hostname, octal host address, octal subnet number, number of packets received and transmitted, number of packets aborted and lost, number of packets having invalid checksums, number of packets having an invalid length, and number of packets rejected for lack of system buffer space. If a host does not respond within a timeout period (about 15 seconds), hostat skips it and goes on to the next host. The user may cause a host to be skipped before the timeout period expires by typing the interrupt character on the terminal. Two interrupt characters typed in rapid succession will abort hostat entirely. Example: @example % hostat it LMI-COUSIN-IT (03741): Cousin It subnet rcvd xmtd abrt lost crc1 crc2 leng rej 7 224615 228555 33 0 0 0 0 0 % @end(example) @subsection CFTP - Chaosnet File Transfer Program @label[section-cftp] The Unix @l(cftp) program provides functionality analogous to the TCP/FTP command @see[ftp:ftp][fun]. This is the only standard method in Unix for copying, for example, files from a Lambda LISP system into a Unix file system. @footnote[Note that @i(in LISP) many methods for copying LISP files over to a Unix system are available: @l(fs:copy-file), ZMacs, etc.] The procedure for using @l(cftp) involves opening a connection to a remote Chaosnet host and sending it requests, e.g., for file transfers to and from the remote host. The remote host normally parses the pathnames it receives with respect to its own parsing schemes. This provides one useful feature: a Unix user can transfer files from remote TCP hosts via a Chaosnet host. For example, if the connected LISP machine host is @l(MASTER-HOST), and there is a remote TCP/IP VAX host @b(MY-VAX), the following procedure could be used to transfer a file from the VAX to the local Unix host: @lisp % @i(cftp master-host) cftp>@i(get my-vax:[keith]login.com) Login ID: @i(keith) Password: To local file: @i(/tmp/login.com) OPEN 25 05/07/87 11:52:00 1536 NIL VAX:USER_DISK:[USERS.KEITH]LOGIN.COM;25 1213 bytes in 1 seconds = 1.18457 Kbits per second cftp>@i(quit) % @end(lisp) To review the documentation on each command, execute @l(man cftp). @c end unix