| ★ wanayoo — archive 1999 http://linux-decnet.sourceforge.net/lat.html | Nouvelle recherche | Portail wanayoo |
![]() |
DECnet for Linux
A project to provide DECnet phase IV connectivity for
Linux
LAT
|
In this document I refer to latd as the daemon that is running in the background accepting incoming connections and marshalling outgoing ones, latcp is the LAT control program which is the user interface to latd.
When latcp starts the daemon it runs a startup script called /etc/latd.conf and is a conventional shell script. If you want to customise the way LAT works then this is the place to do it. The rest of this document explains the latcp commands that you can use to customise LAT and it is normal to put theses commands in the startup script so that they take effect each time the system is rebooted.
When you stop latd all users are instantly disconnected. They will get no warning and work will not be saved.
To add such a service use the command latcp -A -a LINUX. This tells latd to advertise the new service along with the default one using the same rating.
To remove this service use the command latcp -D -a LINUX.
Services have an optional description associated with them which can show up on
some terminal servers if the user issues a SHOW SERVICE command. The description is
added to the service with the -i switch. eg:
latcp -A -a LINUX -i "Linux login service"
Note that the description must be enclosed in quotes if it contains spaces. To change the
description of an existing service use the following command:
latcp -i "Linux is wonderful" -a LINUX
So, if you create a service with rating of 100 using the following command:
latcp -A -a LINUX -r 100
and the load average is 1.00, then the advertised rating will be 50. If you have several
machine advertising the the same service then, to achieve effective load balancing, the
rating specified on the command-line should reflect the relative power of the machines offering
that service.
In addition, ratings can be static. A static rating does not vary with the system load
average. If you create a service with the following command:
latcp -A -a LINUX -r 100 -s
Then the rating will always be 100 regardless of how busy the system is.
In the case of a printer that is shared by several machines you may want to make it a queued connection.
This means that if the printer is busy, any other machine that tries to connect to it will be forced
to wait until it is ready. To do this set the port to be queued on the terminal server and specify the
reverse-lat port to be queued by adding -Q to the command line as follows:
latcp -A -p /dev/lat/printer -Hds200 -Vprinter -Q
When a service is advertised on the LAN it can have any number of groups associated with it. A group is a number from 0 to 255. By default all services are in group 0. On the terminal server you can restrict the group numbers that it will listen for services on. So, for example, a terminal server in the sales department could have only group 10 enabled, a terminal service in the production department could have only group 20 enabled. The host machines providing these services would advertise sales service in group 10 and production services in group 20. The computer department servers would probably have all the groups enabled so that they could connect to all the services.
Because latd is both a client and a server it has two sets of group codes. One set (that manipulated
by the -G and -g switches) determines the group numbers that the advertised services use. So, if we
execute the following latcp commands:
latcp -G 10
latcp -A -a LINUX -i "Linux login service"
Then the service LINUX will be advertised in groups 0 and 10 (group 0 is always on by default). You could
remove it from group 0 with the following command:
latcp -g 0
Set up like this, only terminal services listening for services in group 10 would see the LINUX service.
The other group set (that manipulated by the -U and -u switches) determines which services can be used
by the reverse-LAT ports. So, if you issue the following commands:
latcp -u 0
latcp -U 20
Then you would only be able to connect reverse LAT ports to services that were advertised in group 20 (ie
you could not connect to the LINUX service!).
Node Name: DOUGHNUT LAT Protocol Version: 5.2 Node State: On LATD Version: 0.8 Node Ident: A Linux box Service Responder : Disabled Circuit Timer (msec): 80 Keepalive Timer (sec): 20 Retransmit Limit: 20 Multicast Timer (sec): 30 User Groups: 0 Service Groups: 0 Service Name Status Rating Identification DONUT Enabled 12 D LINUX Enabled 100 D Port Node Service Remote Port Queued /dev/lat/bacon BACON BACON No /dev/lat/lta1 DS200 DECSERVER PORT_1 YesThe services show are the services advertised by this machine. If you want to see a list of services that are on the network that have been seen by this machine (remember groups!) then use the command latcp -d -l which gives output like this:
BACON Available Welcome to VAX/VMS V5.5 BALTI Available Compaq Tru64 UNIX V5.0A LAT SERVICE DONUT Available Linux 2.2.16 LINUX Available Linux 2.2.16If you really want the full lowdown on the services that latd has seen then the command latcp -d -l -v will tell you everything you wanted to know!
Put your commands into a file called /etc/latd.conf and it will be run every time you start LAT. The only change you should make is to replace the latcp command with the string $LATCP so that the script can find the latcp program regardless of whether it is on the PATH or not.
The reason you should use /etc/latd.conf rather than writing your own script to start LAT and then set the parameters is that latd does not actually advertise any services or accept any network connections until the startup script has completed. This means you can configure all the parameters and make sure that nothing happens with the defaults in place. Here is an example startup script:
# /etc/latd.conf # This is a sample configuration file for latd # it is run as s shell script from latcp -s with a minimal # environment and PATH (though latcp will be available as $LATCP) # # You can fiddle with all the latd parameters you like in here, the first # service announcement will not be made until this script completes. # # # Set the multicast timeout to 30 seconds $LATCP -m 30 # Add another login service $LATCP -A -a LINUX -r 100 # Add a reverse LAT service to BACON $LATCP -A -p /dev/lat/bacon -Hbacon -Vbacon # Set up a general purpose port $LATCP -A -p /dev/lat/lta1 -Hdecserver -Vds200 -RPORT_1 -Q exit