HELIOS EtherShare 2.6 User manual

8 The EtherShare System
8.1 General remarks
The EtherShare software can be subdivided into eight functional modules:
The AppleTalk protocol stack forms the central core of the EtherShare system. It provides elementary services for AppleTalk networks and is the backbone for the various EtherShare server programs. The Font Server is implemented as part of the Print Server - see Font including in chapter 11.4 "The Print Server in operation" for information on this feature.
8.2 System configuration
The main configuration file "$ESDIR/conf/atalk.conf" - the most important configuration file within the EtherShare system - contains configuration parameters for all of the EtherShare programs. They all access this file when first starting in order to determine their configuration.
The "install" program automatically sets up this file with default values for the parameters. The values can be changed if necessary by using an editor such as vi, but we strongly recommend that you do this with the EtherShare Admin program and the network configuration option of the "install" program instead.
A valid entry in "atalk.conf" has the following structure:
program:parameter {, parameter}
program is the name of the program, or a special "wild card" section, e.g. "zones" or "if", for which the configuration is destined, and parameter defines various configuration options, which vary from program to program (see later). Note that the parameters for each program can all be specified on a single line. To improve clarity, however, long lines should be split after commas, and continued on the next line, optionally indented with space characters, e.g.:
program: parm1,
parm2, parm3

Do not repeat the program name in multi-line commands (except for "papsrv", all other program names are only allowed to show up once).
The syntax for parameter has two forms:
The first form assigns a value to a parameter variable. The value can be optionally contained in quotation marks (" ") to allow the inclusion of space characters. The second form is called a "switch". It is used to enable or disable specific features of a program. Accordingly, each switch usually exists in both, positive and negative pendants. Negative pendants have the same name, but are preceded by "no". For example, the negative form of the switch "clientmessages" is "noclientmessages" (see clientmessages in chapter 11.6 "Configuring printers manually").
The configuration file can also contain comments by starting an entry line with the "# " character. This can be used to add additional information, e.g. explanatory remarks.
8.3 The AppleTalk protocol stack
EtherShare's AppleTalk protocol stack is either contained in a UNIX loadable module, which is designed to be added to the operating system during runtime, or in a driver which is built into the UNIX kernel during EtherShare installation.

Note: Under Mac OS X Server there is no "atalkd". All parameters are set in the Network panel.

The AppleTalk protocol stack is closely connected to the "atalkd" (AppleTalk Daemon) program. The protocol stack and "atalkd" provide important basic functions for AppleTalk networks. The EtherShare servers (Print Server, Terminal Server, etc.) are constructed around this base system.
The "atalkd" program implements permanent services on the AppleTalk network which are required to operate the EtherShare system. For example, all EtherShare servers are dependent on the functions of this program in order to be able to communicate with the network. None of the servers will start until "atalkd" is running (you will get a "cannot register..." error message). The host is normally configured to start "atalkd" automatically when UNIX is booted.
"atalkd" is also responsible for making known to the AppleTalk network the names of all AppleTalk services which are available on the UNIX host (i.e. the EtherShare File Server, Print Server, Administration Server, Terminal Server, Mail Server, and Time Server).
When an EtherShare server is started, the chosen AppleTalk name for the server (defined in the main configuration file "atalk.conf") is passed to "atalkd", which also receives a corresponding message from the server when it is shut down. "atalkd" automatically checks whether the chosen name is unique to the network zone. If the name is already in use, the server is immediately aborted with the error message "Duplicate name exists already", and it is necessary to change the name in the main configuration file.
"atalkd" is also responsible for ApplTalk routing table maintenance, to allow the kernel modules to route between all active network interfaces.
Another task of "atalkd" is to manage all information about connected AppleTalk networks. Under AppleTalk, different logical networks are grouped into zones. "atalkd" automatically maintains an internal routing table to keep track of changes in the network configuration. The routing table allows services and information to be routed through different segments of the network if required.
Changes in the routing table are also passed on to the AppleTalk protocol modules to allow data packets to be routed between different network segments.
8.4 Parameters of the "atalkd" program
When it starts, the AppleTalk Daemon program "atalkd" first accesses the main configuration file "atalk.conf" to determine its configuration. The "install" program automatically sets up this file with default values. The values can be changed if necessary by using an editor such as vi, but we strongly recommend that you do this with the network configuration option of the "install" program or the "netconf" utility instead.
The parameters described below can be defined for "atalkd" in "atalk.conf" (note that the parameter list is preceded by the program name "atalkd:"):
atalkd: interface=ifname:netno:snode:zonename
If required, interface can be abbreviated here to "if". The parameters after the "=" sign can optionally be surrounded by quotes: "ifname:netno:snode:zonename". This is obligatory if zonename includes space characters.
An entry of this type is required for each hardware interface (e.g. Ethernet). ifname is the name of the interface as known to the kernel. netno is the network number in the AppleTalk network. The network number must be specified as a range with a dash (e.g. 10-15); the interface will then automatically be configured by "atalkd" as a Phase II network with this number range.
snode is the starting node number at which "atalkd" starts to look for a free node for the EtherShare host on the AppleTalk network (dynamic node number allocation). By convention, servers in an AppleTalk network have node numbers greater or equal to 128 (EtherShare usually starts at 140). zonename is the name (or a list of names delimited by colon) of the AppleTalk zone for this interface.
The simplest configuration for "atalkd" contains only one interface entry in the parameter list, which describes the first (here the only) hardware interface between the UNIX host and the AppleTalk network (note: all EtherShare servers will be registered in the zone of the first "atalkd" entry). See appendix A 3.3 "Network automatic configuration option".
Phase II
A typical "atalkd" entry with a parameter list for a Phase II network with three hardware interfaces is as follows:
atalkd: if="le0:30-35:128:EtherTalk",
The "le0" interface has been allocated the network number range 30-35. Compared to an outdated Phase I network, the maximum number of AppleTalk devices allowed on the network here increases from 254 to (35-30+1) * 254. You must not use the same network number range for more than one hardware interface (see example above).
The network configuration option of the "install" program automatically sets up parameter values for "atalkd" in the main configuration file "atalk.conf".
Note that if you see an "atalkd" entry like
nif="le2:20-20:128:Zone2" (instead of if=...)
this indicates that the configuration has been edited by means of the "netconf" program, and that the interface stated here, has been set to inactive.
8.5 AppleTalk stack utility programs
The following programs are created automatically in the "$ESDIR" directory during EtherShare installation:
"start-atalk" is a shell script that contains all the necessary commands to start the entire EtherShare system ("atalkd" and all EtherShare servers). Specifically, it starts all servers listed in the file "$ESDIR/conf/servers". During installation, start-atalk is included in the UNIX file "/etc/rc.local" or "/etc/inittab", in order to automatically start all EtherShare servers (Desktop, File, Print, Mail, Admin, Terminal, and Time) as soon as UNIX is booted.
"servers" file
The file "$ESDIR/conf/servers" contains a list of all EtherShare server modules which should be started when EtherShare is started. It is referenced by the "start-atalk" script as described above.
opisrv (optional)
lpd (optional)
"stop-atalk" is a shell-script which closes down the entire EtherShare system ("atalkd" and all EtherShare servers) after a delay of five minutes, ensuring that all active processes have been correctly terminated. All logged-in users receive a warning message on their workstations before the system is finally closed down.
If the "stop-atalk" command line includes the parameter "now" ("$ESDIR/stop-atalk now"), EtherShare is stopped immediately. Instead of "now", you can specify
"-g grace period" and thereby change the number of seconds to wait before stopping atalk. Additionally, you can specify "-m message" with the "stop-atalk" command.

Important: Only the superuser ("root") can run "stop-atalk". Use the "swho" command (or choose Active Users in the Lists menu of EtherShare Admin) to make sure that no other users are using the File Server before running this script (use "afpmsg" to inform connected users). Additionally, make sure that there are no active print jobs and/or OPI layout generation processes. "stop-atalk" will interrupt all of them.

Note: "stop-atalk" does not unload the AppleTalk kernel modules.

The "swho" command can be used to list all currently active EtherShare and PCShare child server processes, together with the process ID (PID), the network address (EtherShare: AppleTalk/IP address; PCShare: internet address or client name), user name and process starting time:
$ swho
Server PID Address User When
PCShare 15984 deskjetpc.helios nobody Thu 8:35
AFPServer 56438 0029.062.249 support Thu 8:37
MailServer 26744 0029.062.248 support Thu 8:37
AFPServer 16812 dyn-3-234.helios sam Thu 8:47
AFPServer 27866 dyn-3-233.helios paul Thu 8:50
AFPServer 46534 dyn-3-227.helios michael Thu 13:12
UNIXTerminal 24730 0026.072.249 michael Thu 12:56
UNIXTerminal 23084 0029.216.249 <unknown> Thu 15:26
PCShare 29610 dyn-3-248.helios nobody Thu 10:31
PCShare is another networking product from HELIOS. It is described briefly in the glossary.
Use the "-c" switch to include an optional comment field, which shows more information on the session. EtherShare file servers ("AFPServer") show the names of the currently mounted Macintosh volumes, PCShare servers show the name of the corresponding mounted UNIX directory or print command:
$ swho
Server PID Address User When Comment
AdminServer 9692 ... root Wed...
AFPServer 9715 ... sam Wed... EtherShare Appl

"swho" gets its information from the file "$ESDIR/stmp", which is updated by each of the EtherShare servers. The EtherShare environment variable "$ESDIR" needs to be set correctly for the "swho" command to work.
Use the "-f" switch to specify an alternative input file for the "swho" command. The default file is "$ESDIR/stmp".
Related information is available from the host's process list. In the following example, we have used "grep" to limit the otherwise extensive list to "/es" only:
ramses$ ps ax | grep /es
410 ? S 0:52 /usr/local/es/atalkd
418 ? S 0:00 /usr/local/es/admsrv
421 ? S 0:00 /usr/local/es/afpsrv
424 ? S 0:00 /usr/local/es/desksrv
427 ? S 0:00 /usr/local/es/mailsrv
437 ? S 0:00 /usr/local/es/papsrv
442 ? S 0:00 /usr/local/es/papsrv
443 ? S 0:00 /usr/local/es/papsrv
444 ? S 0:00 /usr/local/es/papsrv
445 ? S 0:00 /usr/local/es/termsrv
448 ? S 0:00 /usr/local/es/timesrv
461 ? S 0:00 /usr/local/es/lpd
5555 ? S 0:00 /usr/local/es/termsrv
5615 p1 S 0:00 grep /es
The EtherShare File Server ("afpsrv"), Administration Server ("admsrv"), Mail Server ("mailsrv"), Terminal Server ("termsrv"), and Time Server ("timesrv") each spawn a child process for each user login, so you may see these entries more than once if someone is using them. The master processes are always allocated to user "root" and the child processes show the name of the corresponding user. You will see a Print Server entry ("papsrv") for each configured printer queue, and an additional "papsrv" child process for each active print job currently being spooled. All "papsrv" processes are allocated to user "root".
PCShare file server, terminal server and print server functionality is all implemented in a single "pcshare" master process, which spawns a child for each mounted DOS virtual drive, terminal session, and active print job. All children are also called "pcshare".

© 2002 HELIOS Software GmbH