The Local Area Transport (LAT) protocol supports communications between host computer systems and terminal servers with terminals, PCs, printers, modems and other devices over local area networks (LANs). The Digital UNIX LAT implementation is a STREAMS-based driver.
This chapter describes the LAT implementation on Digital
UNIX systems, and provides information for setting up and maintaining
LAT. In addition, this chapter provides information on the LAT startup
file,
latstartup.conf
,
the system
inittab
file, and the different LAT configurations.
For additional introductory information on LAT, see
lat_intro
(7).
For information on solving LAT problems, see
Chapter 13.
In the Digital UNIX LAT environment, systems can have the following roles:
Figure 5-1 shows a sample LAN with LAT server nodes and LAT service nodes.
The LAT software also permits host applications to initiate connections to server ports, designated as application ports, to access remote devices. This section describes the types of LAT connections, controlling access in a LAT network, specifying passwords for remote services, and load balancing.
The following types of LAT connections are permitted:
llogin
command; for example, a user on host B connecting to a LAT service on host A
in
Figure 5-1.
Because LAT networks are local in nature, you have a high degree of control over the LAT environment and who has physical access to LAT devices. In addition to controlling physical access, the following features enable you to control LAT access:
You can require users to enter a password to gain access to terminal servers. (Refer to your terminal server documentation.)
You can establish LAT groups and restrict host communication to
particular groups by designating those groups on a LAT service node (by issuing
a
latcp -g -a
command), on a LAT server node (by issuing
a
latcp -u
command), and on a terminal server (refer to your terminal server
documentation).
In general, groups are set up by the network manager, system manager, and server managers are used to partition the LAT network into logical subdivisions and to restrict message traffic between servers and service nodes. In addition, groups help manage the size of the servers' LAT databases by limiting the number of service nodes for which the server keeps information.
Note
Although groups restrict access, they are not intended as a security mechanism.
In order to establish a LAT connection, the group enabled on a terminal server port or outgoing port group enabled on a LAT server node requesting a connection to a LAT service node must match at least one group with the service node. Similarly, in order for a terminal server or server node to process messages from service nodes, the group enabled on the terminal server port or outgoing port group enabled on the server node must match at least one group from the service node. Otherwise, the messages from the service nodes are ignored.
For more information on enabling LAT service node groups and outgoing port
groups, refer to
latcp
(8).
LAT enables you to specify a password for access to remote services that are
protected by a password. When password checking is enabled on a
terminal server that offers a service that is password protected, you must
specify the password when you map the application port;
if you do not, all attempts to connect to the service from
the terminal server are rejected. See
latcp
(8)
for more information.
When more than one node on a LAN offers the same service, the terminal server connects to the node with the highest rating for the service desired. The rating is based on the current loading on the nodes that offer the service. This process is called load balancing.
Load balancing works in a heterogeneous environment. Therefore, service nodes with the same names may be running different operating systems.
This section describes those tasks you need to do before configuring LAT.
Verify that the LAT subset is installed by entering the following command:
#
setld -i | grep LAT
If it is not installed, install it by using the
setld
command. For more information on installing subsets, see
setld
(8),
the
Installation Guide,
or the
System Administration.
After the LAT subset is installed, your system is configured to load the LAT module into the running kernel dynamically when the system is booted.
After you install the the LAT subset, verify that Data Link Bridge (DLB) support is in the kernel by issuing the following command:
#
sysconfig -q dlb
If
dlb:
is not displayed, log in as superuser and complete the following steps:
options DLB
The default configuration file is
/sys/conf/HOSTNAME
.
(HOSTNAME
is the name of your host processor, in uppercase letters.)
doconfig
command. If you are unfamiliar with rebuilding the kernel, see the
System Administration
manual.
#
shutdown -r now
This command immediately shuts down and automatically reboots the system.
After you verify DLB support in the kernel, you configure LAT by
using the
latsetup
utility.
Appendix A
contains
a worksheet that you can use to record the information that you need to provide
to configure LAT.
If you are viewing this manual online, you can use the print feature to
print part of the worksheet.
Figure 5-2 shows Part 4 of the Configuration Worksheet. The following sections explain the information you need to record in Part 4 of the worksheet.
/sbin/init.d/lat
startup and shutdown script
automatically starts LAT upon reaching run level 3 and stops LAT when exiting
run level 3. If you do not want LAT to be started automatically, check NO;
otherwise, check YES.
SVR4 device special files have the following format:
/dev/lat/n
The value
n
is a number starting at 620 and having
no upper limit. For example,
/dev/lat/620
,
/dev/lat/777
,
and
/dev/lat/9999
specify SVR4 devices. The SVR4 format allows you to create an
unlimited number of devices.
BSD device special files have the following format:
/dev/ttyWX
The value of
W
is a number from 0 to 9 and
X
is an alphanumeric from 0 to 9, a lowercase a to
z, or an uppercase A to Z. For example,
/dev/tty00
,
/dev/tty0e
,
and
/dev/tty9f
specify BSD LAT terminal devices. However, all BSD terminal device names are
not case sensitive. Both
/dev/tty9f
and
/dev/tty9F
are converted to
TTY9F
.
This format enables you to specify up to 620 BSD terminal devices which are available to any serial devices (such as UUCP) running on the system. Therefore, fewer than 620 BSD devices may be available for LAT.
getty
entries to be added to the
/etc/inittab
file. This is the number of simultaneous incoming
LAT connections desired.
You use the
latsetup
utility to configure and administer LAT on your system. To use
latsetup
,
LAT and Data Link Bridge must be configured into the running kernel, your
system must be at run level 3 or 4, and you must be logged in as superuser.
See
latsetup
(8)
for more information.
The
latsetup
utility allows you to do the following:
getty
entries to or from the
/etc/inittab
file.
init q
command.
To invoke the
latsetup
utility choose the Local Area Transport
(LAT) option from the Setup Menu or enter the following command:
#
/usr/sbin/latsetup
If your terminal does not support curses, you must specify the
-nocurses
flag. This flag allows you to run
latsetup
in noncurses and nonmenu-driven mode.
Note
Running multiple
latsetup
processes concurrently on the same machine can cause erroneous information to be presented to thelatsetup
user and can corrupt the/etc/inittab
file.
To manually start LAT, enter the following command:
#
/sbin/init.d/lat start
To manually stop LAT, enter the following command:
#
/sbin/init.d/lat stop
If you stop LAT from within a LAT session, the session will hang. You will have to reboot your system to clear up the problem.
If you have LAT automatic startup and shutdown enabled, when the system reaches
run level 3, it loads LAT into the kernel and executes the
/sbin/init.d/lat
script. This script reads and executes the
latcp
commands in the
/etc/latstartup.conf
file (if this file exists), then starts
LAT. See
latcp
(8)
for more information on the
latcp
command.
If you do not have a
/etc/latstartup.conf
file, LAT is started with the default values for its parameters.
Table 5-1
contains LAT parameters and their default values.
Parameter | Default Value | |
Node name | Host name | |
Multicast timer | 60 seconds | |
Network adapter | All network adapters connected to broadcast media. | |
Service name | From the LAT node name parameter. Each service has the following parameters: | |
Parameter | ||
Service
description |
"Digital UNIX Version X.X LAT SERVICE" | |
Rating | ||
Group code | 0 | |
Agent status | Disabled | |
Outgoing port groups | Group 0 | |
Maximum number
of learned services |
100 |
If you want to customize LAT on your system, you can create and modify the
/etc/latstartup.conf
file to include
latcp
commands. For example, you can define a particular node name or add service
names.
Example 5-1
provides a sample
/etc/latstartup.conf
file.
/usr/sbin/latcp -n testnode [1] /usr/sbin/latcp -A -a lattelnet14 -i "LAT/telnet" -o [2] /usr/sbin/latcp -A -a testservice [3] /usr/sbin/latcp -g 0,21,52 -a testservice [4] /usr/sbin/latcp -A -a boundservice -p 620,621 [5] /usr/sbin/latcp -c200 [6] /usr/sbin/latcp -A -p 630 -O -V finance [7] /usr/sbin/latcp -u 0,1,41,97 [8] /usr/sbin/latcp -e ln0 [9]
testservice
.
[Return to example]
testservice
.
[Return to example]
620
and
621
,
which are SVR4-style LAT devices.
[Return to example]
finance
.
[Return to example]
ln0
adapter.
[Return to example]
Note
A
latcp
command that adds a service must occur in thelatstartup.conf
file before alatcp
command requiring the service name. Steps[3]
and[4]
in Example 5-1 illustrate this point.
You can modify the
/etc/inittab
file to use a program other than
getty
.
For example, you can add the following entry to
/etc/inittab
to configure LAT device
620
to use
the user-defined program
myownprogram
:
lat620:34:respawn:/usr/sbin/myownprogram /dev/lat/620
The previous example uses an absolute pathname for the device
/dev/lat/620
.
For more information on using user-defined programs with LAT, see
Section 5.12.
For more information on
/etc/inittab
and
getty
,
see
inittab
(4)
and
getty
(8).
You can also modify the
/etc/inittab
file to add LAT devices
created manually after the initial configuration by adding an entry similar to
the following:
lat621:34:respawn:/usr/sbin/getty lat/621 console vt100
The second field
(34
)
specifies the run level in which the
entries are to be processed. In this example, the
getty
process
is spawned at either run level 3 or 4. In addition, this example uses a
relative pathname
lat/621
.
If your system is configured with multiple network adapters, by default the
latcp
program attempts to start the LAT protocol on all adapters
that can support it. For adapters connected to different logical networks,
this is probably desirable. However, for adapters connected to a single
logical network, you should specify that the LAT protocol run over only one
adapter. To do this, add the
latcp -e
command and the adapter name to the
/etc/latstartup.conf
file. (See
latcp
(8)
for more information.)
Use the
netstat -i
command to determine the adapters defined on your system.
Before you set up a printer to print through LAT you should be familiar with
setting up printers. See the
System Administration
manual, the
PrinterConfiguration System Administration utility (if using CDE), and
lprsetup
(8)
(if not using CDE) for information on setting up
printers. In addition, you need the following information:
This section provides information on how to set up a printer to print through LAT, using host-initiated connections.
Note
The examples in this section use the DECserver 700 server. Please refer to the documentation supplied for your terminal server. In addition, the examples use information from preceding steps.
To set up a printer, do the following:
Local>
SHOW PORT 7 CHARACTERISTICS
This command displays the characteristics for port 7. At a minimum, the terminal server should have settings for the port similar to the following:
Character Size: | Printer's character size |
Flow Control: | XON (or -CTS/RTS, for some printers) |
Speed: | Printer's speed |
Access: | Remote |
Autobaud: | Disabled |
Autoconnect: | Disabled |
If the terminal server's port settings do not match the printer's
characteristics, define the terminal server's port settings by using
the
DEFINE
command. For example:
Local>
DEFINE PORT 7 SPEED 9600
Local>
LOGOUT PORT 7
To verify that the printer characteristics match in the printer and in the
terminal server port, use the
TEST PORT
command on the terminal server. For example, if the configuration is correct,
the following command run on a DECserver 700 prints a test pattern of
characters on a printer attached to port 7:
Local>
TEST PORT 7
The printer prints 24 lines of test data unless you press the Break key at the terminal server console. If data does not print or if it appears to be incorrect, the port or the printer is incorrectly set, or there is a hardware problem.
On the the Digital UNIX service node (local LAT host), use the
latcp
command to map an unused application port
with the remote port or remote service on the terminal server. Use the
terminal server name and either the name of the port
or the name of the service for the printer from
Section 5.8.1.
For example, the following command maps the local application port
621
for the server
LOCSER
to the remote printer port
port07
.
#
latcp -A -p 621 -H LOCSER -R port07
The following command does the same thing, but specifies the remote printer service name instead of the remote print port:
#
latcp -A -p 621 -H LOCSER -V REMprinter07
For more information, see
latcp
(8).
To set up the print spooler for the remote printer, use the
lprsetup
command. The following symbols must be set in the
printcap
file for the Digital UNIX service node (local LAT host)
to access the remote printer through host-initiated connections:
ct
-- Connection type
lp
-- Device name to open for output
The following example shows an
/etc/printcap
entry for a LAT printer:
lp25|lp0:\ :af=/usr/adm/lpacct:\ :ct=LAT:\ [1] :lf=/usr/adm/lperr:\ :lp=/dev/lat/621:\ [2] :mx#0:\ :of=/usr/lbin/lpf:\ :sd=/usr/spool/lpd:
LAT
for the
ct
symbol.
[Return to example]
latcp
command to set up the service node.
For example, the
/dev/lat/621
defined previously. You must
specify the full path name for the
lp
symbol.
[Return to example]
After you set up the printer, print a file to ensure everything works
properly. For example, if the printer name is
lp25
and
test
is a text file, you can test the printer by issuing the
following command:
#
lpr -Plp25 test
If the printer does not work, verify that all the settings are
correct. If the
printcap
entry has an
lf
entry defined, you can check the corresponding file for information on
errors that could have occurred.
A host-initiated connection is one in which any bit-serial, asynchronous device connected to a terminal server can communicate with user-developed applications on an appropriately configured Digital UNIX system. Examples of such devices are terminals, modems, communications ports on other host computer systems, and printers. The printer connections are discussed in Section 5.8.
This section describes how you set up a Digital UNIX system for host-initiated connections and guidelines for developing applications to take advantage of these connections.
To set up your system for LAT host-initiated connections, do the following:
latcp -A -p
command to map an application
port (tty device) on the system with a remote port or service on a terminal
server. In the following example,
623
is the application port,
T1301A
is the terminal server name, and
PORT_6
is the terminal port name.
#
/usr/sbin/latcp -A -p 623 -HT1301A -R PORT_6
Alternatively, you could specify a service name instead of a port name in the preceding example.
Applications developed to employ host-initiated connections are much like applications for any tty device, with the following exceptions:
open
call on the
LAT tty device, the LAT driver attempts to establish a connection to the target
port or service on the target server. The driver reports success and failure
codes in the variable
errno
.
open
call is successful, the user program issues
read
and
write
system calls to handle data transfers, and normal
ioctl
processing for the device control information.
close
system call on the device terminates the LAT connection.
Digital provides the
dial.c
application program in the
/usr/examples/lat
directory as an example of a program
that can be used with host-initiated connections. To gain access to
this example, you must install the
OSFEXAMPLES400
optional subset.
The Digital UNIX LAT implementation is a STREAMS-based tty design.
When a LAT tty device is successfully opened, the POSIX line discipline
module
ldterm
is pushed onto the stream above the LAT driver.
If your application does not need the additional processing provided by
ldterm
,
it must remove the module from the stream.
Digital provides the
lined.c
application program in the
/usr/examples/lat
directory that demonstrates how terminal (tty)
line disciplines are changed in a Clist-based tty and a STREAMS tty
environment. To gain access to this example, you must install the
OSFEXAMPLES400
optional subset. Additionally, you can use the
strchg
command to change the STREAMS configuration of the user's standard input.
For more information, see
autopush
(8)
and
strchg
(1).
An outgoing connection is one in which a local user can connect to a service on
a remote host by using the
llogin
command. To
accomplish this, a named service on the remote host is associated with a
terminal device special file on the local host. See
llogin
(1)
and
Command and Shell User's Guide
for information on the
llogin
command.
To set up your system for LAT outgoing connections, do the following:
latcp -A -p
command. In the following example,
621
is the outgoing port and
REMOTE_SERVICE
is the service name on the remote node.
#
/usr/sbin/latcp -A -p 621 -O -V REMOTE_SERVICE
Alternatively, you could specify a remote node name and a port name in the preceding example.
#
/usr/sbin/latcp -d -l
If the service does not appear, this might mean that the maximum number of learned services has been reached; the service might still be available. When an outgoing connection is attempted, the local host will determine whether the remote service is available. If it is available, the outgoing LAT connection is made.
To increase the maximum number of learned services, use the
latcp -c
command. See
latcp
8
and
lat_intro
(7)
for more information on learned services.
Applications developed to employ outgoing connections adhere to the same guidelines as applications developed for host-initiated connections. See Section 5.9.2 for more information.
Digital provides the
getdate.c
application program in the
/usr/examples/lat
directory. To gain access to this example, you must install the
OSFEXAMPLES400
optional subset.
The LAT/Telnet gateway service enables a user on a LAT terminal server to
connect to remote hosts running the Telnet protocol through an intermediate
Digital UNIX host. The user does not have to log in to the local
Digital UNIX system first. Optionally, if configured, you can use the
rlogin
command to connect directly to remote hosts.
To set up the LAT/Telnet gateway, perform the following steps:
latcp
command. For example:
#
/usr/sbin/latcp -A -a lattelnet -i "LAT/telnet gateway" -o
The
-o
flag specifies that this is an optional service.
Optional services are used with specialized applications that are written
especially for LAT. These services are bound to LAT tty devices for the
exclusive use of the specialized applications.
/etc/inittab
file and modify the LAT device entries that you want to spawn
lattelnet
.
The LAT terminals you select are dedicated to the gateway. The number of
terminals selected determines the maximum number of simultaneous
LAT/Telnet gateway sessions the system can deliver. For example, the
following example shows LAT/Telnet gateway entries for devices
624
,
625
,
and
626
.
The last field in each line
lattelnet
is the name of the optional service defined in step 1.
lat624:34:respawn:/usr/sbin/lattelnet lat/624 lattelnet lat625:34:respawn:/usr/sbin/lattelnet lat/625 lattelnet lat626:34:respawn:/usr/sbin/lattelnet lat/626 lattelnet
If you want to use the
rlogin
command instead of Telnet, specify
/usr/bin/rlogin
as the third argument to the
lattelnet
program in the
/etc/inittab
entry. For example:
lat624:34:respawn:/usr/sbin/lattelnet lat/624 lattelnet /usr/bin/rlogin
init
to read the
inittab
file and start the gateway, as follows:
#
init q
lattelnet
process has started by using the
ps
command.
The
lattelnet
program uses the
syslog
function to log messages to the
/var/adm/syslog.dated/daemon.log
file. Check this file to verify that no error messages have been
generated.
CONNECT
command. For example, to connect to a remote node named
REMOTE
by using a local node named
LOCAL
as a gateway, enter:
Local>
CONNECT LATTELNET NODE LOCAL DEST REMOTE
You can use the preceding command line for either Telnet or
rlogin
.
Alternatively, if connecting for Telnet, you can enter the service name
LATTELNET
and wait to be prompted for the remote node desired.
The following example shows what occurs when a user on a terminal server
connects to the service
LATTELNET
and waits for a login prompt from remote node
MYTRIX
:
Local>
CONNECT LATTELNET
LAT to TELNET gateway on printf
telnet>
OPEN MYTRIX
Trying... Connected to mytrix. Escape character is '^]'. mytrix login:
A Digital UNIX host can offer the following types of services:
These services are described in
lat_intro
(7).
For more information on the commands used to create these services, see
latcp
(8).
Dedicated services can be used in combination with your own specialized
applications. Digital provides the following specialized application programs
in the
/usr/examples/lat
directory:
latdate.c
-- Provides a user with the date and time
latdlogin.c
-- Provides a LAT/DECnet gateway for logging in over DECnet
Setting up a dedicated service is similar to setting up the LAT/Telnet gateway. (See Section 5.11.) To set up a dedicated optional service, complete the following steps:
latcp -A -a
command. For example:
#
/usr/sbin/latcp -A -a showdate -i "LAT/date service" -o
The
-o
specifies that this is a dedicated, or optional, service.
/etc/inittab
file and add the dedicated tty device entries.
For example:
lat630:3:respawn:/usr/sbin/latdate lat/630 showdate
Note
You need an
/etc/inittab
entry for every simultaneous service you want to run. The previous example only allows for one user of thelatdate
service at any one time.
init
to read the
inittab
file and start the service by using the
init q
command.
To use the service at a LAT terminal, issue the
CONNECT
command. For example:
Local>
CONNECT SHOWDATE
A terminal connected to a terminal server port can offer a dedicated tty device on a given Digital UNIX LAT host. The terminal will always be connected to the specified tty device on the LAT host. The terminal's user cannot switch sessions or connect to different hosts or different tty devices on that host.
To set up a dedicated tty device on a terminal, perform the following steps:
Local>
SHOW SERVER
Local>
SHOW PORT number
number
is the number of the port on the terminal server.
latcp -A -p
command.
For example, the following command maps an SVR4 device (application port
630
to port 2 on the terminal server
LATTERM
:
#
latcp -A -p630 -H LATTERM -R PORT_2
For more information, see
latcp
(8).
getty
entry to the
/etc/inittab
file for the tty device that was
mapped as an application port. For example:
lat630:34:respawn:/usr/sbin/getty lat/630 console vt100
REMOTE
and log out from the port. For example:
Local>
DEFINE PORT 2 ACCESS REMOTE
Local>
LOGOUT PORT 2
If you need to repeat the procedure, remove the
getty
entry from the
/etc/inittab
file, issue the
init q
command, and start the procedure from the beginning.
To remove a dedicated tty device from a terminal port and and allow the terminal connected to the port to connect to any host, do the following:
LOCAL
and log out from the port; for example:
Local>
DEFINE PORT 2 ACCESS LOCAL
Local>
LOGOUT PORT 2
getty
entry from the
/etc/inittab
file.