DECnet for Linux
A project to provide DECnet phase IV connectivity
forLinux 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.
The latcp commands are based on those used in Compaq Tru64 Unix, so if you are familiar with that then this should all look very familiar to you. However, they are not identical to Tru64 so you should still at least skim this document or the man page for latcp.
The examples here are for latd 1.02. Not all the features are available in earlier versions.
By default (ie if you haven't customised the startup script) latd will advertise a service which is the hostname of your Linux system. This means that any users that have terminals connected to a terminal service will be able to connect to your system by typing the appropriate connect command to the terminal server. On a DECserver 200 this would be "CONNECT LINUX" if your machine's host name is "linux". Of course, if the user does not have a username on the system they will not be able to get past the login prompt. When latcp starts the daemon it runs a startup script called /etc/latd.conf which 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 these commands in the startup script so that they take effect each time the system is rebooted.
By default latd listens on all ethernet interfaces on your system. If you want to restrict this you can specify as many interfaces as you like on the latcp command line eg: latcp -s -i eth1 -i eth2. It is not currently possible to change this in the startup script.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 machines 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
To allow users other than root to connect to reverse-LAT services you must create a group in /etc/groups called "lat" and add reverse-LAT users to that group. See your distribution's documentation for managing groups. Not that this group does not affect normal, "forward" use for LAT for those users.
To send a BREAK character to the remote node press ^@. Normally this is shifted to you actually have to press Ctrl-Shift-' on a British keyboard for example.
Also, there is a documented bug (or a "feature" as they are also known!) in Linux latd such that some (older) terminal servers cannot have more than one connection to the same machine: normally two sessions would share a virtual circuit.The effect is that you cannot have more than one non-queued reverse-LAT port attached to that terminal server - you can see this when the second fails to connect. If you see this problem then you will haveto make the ports queued.
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 inthe 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!).
$ llogin trillianThis command will connect you to the/a machine that advertises the service trillian and prompt you to log in. You can also specify a particular node or port number to connect to using command-line switches (see the man page for more details). One useful feature is the ability to connect to queued services by supplying the -Q switch to the command eg:
$ llogin ds200 -Rport_6 -QWill connect to a queued port on a DECserver. Note that the service name, port name (and node name if supplied) will be converted to uppercase.
The services shown 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:
Node Name: TYKE LAT Protocol Version: 5.2
Node State: On LATD Version: 1.01
Node Ident: A Linux box
Service Responder : Disabled
Interfaces : eth1 eth0
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
TYKE Enabled 12 D
LINUX Enabled 100 D
Port Node Service Remote Port Queued
/dev/lat/marsinta DS200 PORT_8 Yes
/dev/lat/trillian DS200 PORT_7 Yes
/dev/lat/zaphod DS200 PORT_3 Yes
/dev/lat/roosta DS200 PORT_2 Yes
/dev/lat/loginmarsha MARSHA No
/dev/lat/ddcmp DS200 PORT_6 Yes 8
BACON Available Welcome to VAX/VMS V5.5If 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!
BALTI Available Compaq Tru64 UNIX V5.0A LAT SERVICE
DS200 Available
LAT_VT_GTWY Available LAT/VT Gateway
LINUX Available Linux 2.2.18
MARSHA Available VAX node MARSHA
TRISHA Available
TYKE Available Linux 2.2.18
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 networkconnections 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 that sets up the services shown in the above example output:
# /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 queued reverse LAT service to consoles
$LATCP -A -p /dev/lat/marsinta -Vds200 -RPORT_8 -Q
$LATCP -A -p /dev/lat/trillian -Vds200 -RPORT_7 -Q
$LATCP -A -p /dev/lat/zaphod -Vds200 -RPORT_3 -Q
$LATCP -A -p /dev/lat/roosta -Vds200 -RPORT_2 -Q
# LAT to VAX
$LATCP -A -p /dev/lat/loginmarsha -Vmarsha
# DDCMP on Marsha
$LATCP -A -p /dev/lat/ddcmp -Vds200 -RPORT_6 -Q -8
exit