tramp DECnet for Linux

A project to provide DECnet phase IV connectivity forLinux
 

LAT
 

LAT

This is a quick guide to using LAT on Linux systems. I am assuming that you already have the latd package installed and that the latcp command is on root's PATH. I'm sorry all the terminal server examples are for the (very obsolete) DECserver 200 but that's all I have!

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. 

Starting and stopping it

latcp -s starts the lat daemon.
latcp -h stops the daemon.

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.

Service names

latd can advertise many services, not just one for the host name. So (for example) you could add a new service called LINUX on all linux machines running latd and then users can connect to LINUX and they will be attached to the server with the lowest load average.

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

Service ratings

Every advertised service has a rating associated with it. This rating is used in the terminal servers' load balancing algorithm to determine which node to connect to when more than one system advertises the same service name. By default, services advertised by latd have dynamic ratings, that is they vary according to the load on the system. The value you specify on the latcp command line is a maximum, this value is divided by the current load average plus one each time the service is advertised on the LAN.

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.

Reverse LAT

The "normal" use of LAT is to allow a terminal, connected to a terminal server to log into a computer. "Reverse-LAT" goes the other way, the computer makes a connection to a port on the terminal server. This has a number of uses: the most popular are
To do this you first need to create a service on the terminal server. How to do this varies on the model of terminal server you have so consult the documentation for your device. The command for a DECserver 200 is as follows:
DEFINE SERVICE MYVAX PORT 4
This creates a service called MYVAX which is associated with port 4 on the terminal server. Note,you may also have to set the port characteristics to match those of the printer and set the access type to "Remote". Now, assuming you have connected the serial console of your VAX to port 4 of the terminal server and the server is called DS200, you can issue the following command on the linux machine:
latcp -A -p /dev/lat/myvax -Hds200 -Vmyvax
If you now connect a terminal emulator program (say minicom, seyon or microcom) to /dev/lat/myvax you can log in to the console of the VAX and issue commands as if the terminal was local. If it doesn't work then there are a few things to check:

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.

Groups

Groups on LAT are a method of restricting the visible services to a manageable subset. They arenot a security feature, merely a method of making a large number of services more manageable.

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!).

Other things you can fiddle with

Most of the operational parameters of latd can be configured with latcp. I recommend you leave these alone unless you know what you are doing though.

llogin

Starting with lat 1.02 a user program llogin is included. Like latcp this is based on the command of the same name from Tru64 Unix but with a few extras. It's purpose is to allow users to log into remote LAT services. These services must be made available to latd using the groups feature mentioned above. In its most basic form you can connect to an advertised LAT service with the command:
$ llogin trillian
This 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 -Q
Will 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.

Unlike using reverse-LAT ports you don't need to press enter (or any other key) to activate the connection. If the service is a login service then you will see the login prompt quite soon after entering the command.


What's happening with the server?

You can show the status of the server with the latcp -d command which produces output something 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
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:
BACON             Available     Welcome to VAX/VMS V5.5    
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

If 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!

The startup script

The above commands show you how to configure LAT, these commands will very likely be the same every time you boot the system or restart LAT so it makes sense to have some system of executing a series of commands every time you issue the latcp -s command and so there is.

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




Compaq and Tru64 Unix are trademarks of Compaq Computers Inc and DECserver probably is too.

Go back to the DECnet for Linux Home Page