HP TCP/IP Services for OpenVMS
Management


Previous Contents Index

24.4 LPD Server Startup and Shutdown

The LPD server can be shut down and started independently of TCP/IP Services. This is useful when you change parameters or configuration options that require the service to be restarted.

The following files are provided:

To preserve site-specific parameter settings and commands, create the following files. These files are not overwritten when you reinstall TCP/IP Services:

24.5 Configuring Printers

This section describes how use the printer setup program, SYS$SYSTEM:TCPIP$LPRSETUP.EXE, to configure a printer directly connected to your computer. Similar to the UNIX /usr/sbin/lprsetup utility, you can also use this program to modify a printer's configuration or to remove a printer.

Before running the printer setup program, you need the following information for each printer you want to configure:

Note

Inbound execution queues do not have printcap entries; rather, they take on the characteristics of the local queues to which they submit print jobs.

The printer setup program performs the following:

Table 24-2 describes the LPRSETUP commands.

Table 24-2 LPRSETUP Commands
Command Description
add Adds a printer name. The printer name is the name of a LPD client print queue that users can specify in the /QUEUE qualifier to the PRINT command.
delete Removes an existing printer from your configuration.
view Displays the contents of the current printcap database.
help Displays online help about the LPRSETUP program.
exit Exits from the LPRSETUP program.

You can abbreviate any command option with its initial letter. Enter information at each prompt, or press Return (or Enter) to accept the default. Enter a question mark (?) to obtain a description of the information requested at each prompt.

The following example shows how to use the printer setup program to configure a printer named LOCAL1:


$ RUN SYS$SYSTEM:TCPIP$LPRSETUP 
 
TCPIP Printer Setup Program 
 
Command  < add delete view help exit >: add 
Adding printer entry, type '?' for help. 
 
Enter printer name to add : LOCAL1 
Enter the FULL name of one of the following printer types: 
remote local : local 
Enter printer synonym: 
 
Enter full file specification for spool directory 
SPOOLER DIRECTORY 'sd' :  [SYS$SPECIFIC:[TCPIP$LPD.LOCAL1]] ? 
Enter full file specification for printer log file. 
printer error log file 'lf' [SYS$SPECIFIC:[TCPIP$LPD]LOCAL1.LOG] ? 
Enter the name of the printcap symbol you want to modify.  Other 
valid entry is : 
        'q'     to quit (no more changes) 
 
The names of the printcap symbols are: 
 
 sd for the printer spool directory 
 lf for the printer error log file 
 lp for the name of the local printer 
 ps for the LPD PrintServer extensions flag 
 rm for the name of the remote host 
 rp for the name of the remote printer 
 fm for the printer form field 
 pa for the /PASSALL flag 
 nd for the /NODELETE flag 
 cr for the cr flag 
 sn for the setup NoLF flag 
 p1-p8 for the /PARAMETER=(p1,...,p8) field 
 
Enter symbol name: q 
 
                    Symbol  type  value 
                    ------  ----  ----- 
Error log file    :  lf     STR   /SYS$SPECIFIC/TCPIP$LPD/LOCAL1.LOG 
Printer Queue     :  lp     STR   LOCAL1 
Spool Directory   :  sd     STR   /SYS$SPECIFIC/TCPIP$LPD/LOCAL1 
 
Are these the final values for printer LOCAL1 ? [y] 
 
Adding comments to printcap file for new printer, type '?' for help. 
Do you want to add comments to the printcap file [n] ? : 
 
 
        *********************************************** 
        * TCPIP$LPD_SYSTARTUP.COM   TCPIP$LPD_PRINTCAP* 
        *    and TCPIP$LPD_SYSHUTDOWN.COM             * 
 
        *  have been updated for this printer         * 
        *                                             * 
        * Set up activity is complete for this printer* 
        *********************************************** 
 
 
Command  < add delete view help exit >: exit 
 
 

The following example shows how to use the printer setup program to remove a printer from the printcap database:


$ RUN SYS$SYSTEM:TCPIP$LPRSETUP 
 
Command  < add delete view help exit >: delete 
Deleting a printer entry, type '?' for help. 
 
Enter printer name to delete (or view to view printcap file): LOCAL1 
 
                    Symbol  type  value 
                    ------  ----  ----- 
Error log file    :  lf     STR   /SYS$SPECIFIC/TCPIP$LPD/LOCAL1.LOG 
Printer Queue     :  lp     STR   LOCAL1 
Spool Directory   :  sd     STR   /SYS$SPECIFIC/TCPIP$LPD/LOCAL1 
 
Delete LOCAL1, are you sure? [n]  y 
 
Deleted file: /SYS$SPECIFIC/TCPIP$LPD/LOCAL1.LOG 
Deleted files from spooling directory: /SYS$SPECIFIC/TCPIP$LPD/LOCAL1 
Removed spooling directory: /SYS$SPECIFIC/TCPIP$LPD/LOCAL1.DIR 
 
Command  < add delete view help exit >: exit 
 

24.5.1 Printer Characteristics

You can modify the printer configuration by specifying two-character printcap symbols and associated values. Table 24-3 describes the printcap symbols.

Table 24-3 Printcap Symbols
Symbol Description
sd Printer spool directory, specified as a UNIX path name.
lf Error log file, specified as a UNIX path name. This is optional. If you do not specify an error log file, errors are logged to the operator console.

An error log can be shared by all local printers if you specify the same file in each printcap printer entry.

lp Name of the local printer.
ps LPD PrintServer extensions flag.
rm Name or IP address of the remote host. You can enter an IPv6 IP address by entering a backslash (\) character before each colon in the IPv6 address. For example:
:rm=3ffe\:1200\:4120\:1000\:a00\:2bff\:fee1\:4499:\

Note that it is preferable to specify the host name instead of the IP address.

rp Name of the remote printer. The printer name is case sensitive. If you are configuring an LPD print queue to print ASCII text files to an HP LaserJet printer with a JetDirect network card, set the value of the rp printcap field to text. For example:
:rp = text\

To configure this type of printer for printing PostScript or binary files, set this field to raw.

fm Printer form field. This is equivalent to the OpenVMS command PRINT/FORM. For example, :fm=CENTER:\ allows the job to print as if the following command were entered:
$ PRINT
file-name/FORM=CENTER

Forms have attributes like print image width and length, or paper stock, which are associated with the print queue when it starts up. To see which forms have been defined for your system, use the DCL command SHOW QUEUE/FORM. To see which form is currently the default for the print queue, enter SHOW QUEUE/FULL.

pa /PASSALL flag. Tells the print symbiont to ignore any formatting and to send the file to the printer with its format suppressed.
nd /NODELETE flag. Specifies that the temporary file created in TCPIP$LPD for an inbound print job will not be deleted after printing. By default, these temporary files are deleted after printing.
cr Not supported by TCP/IP Services.
sn Prevents the LPD server from inserting a line feed into the byte stream after the SETUP module and before the actual print file.

Including this sn symbol prevents LPD from inserting the line feed character on a per-queue basis, overriding the definition of the Setup-NoLF configuration option in the TCPIP$LPD.CONF file (described in Table 24-1).

p1-p8 Equivalent to the PRINT/PARAMETER qualifier on the DCL command line. You can specify up to eight optional parameters that are unique to the print symbiont. If the DECprint Supervisor software is running on the system, enter HELP PRINT_PARAMETER for information about the available parameters.

To make the printcap entries easier to read, use one symbol per line, placing a colon (:) at the start of each line and a colon and backslash (:\) at the end of the line to separate the symbols. The last printcap entry ends with a colon (:).

The following sample is an entry from the printcap database that identifies a local printer.


# 
LOCAL1|local1:\
:lf=/SYS$SPECIFIC/TCPIP$LPD/LOCAL1.LOG:\
:lp=LOCAL1:\
:sd=/SYS$SPECIFIC/TCPIP$LPD/LOCAL1:\
:nd: 
 

The following sample is a printcap entry that identifies a remote printer:


# 
REMOTE1|remote1:\
:lf=/SYS$SPECIFIC/TCPIP$LPD/REMOTE1.LOG:\
:rp=REMOTE1:\
:rm=hermes:\
:sd=/SYS$SPECIFIC/TCPIP$LPD/: 
 

24.5.1.1 Setting Up Print Spool Directories

Each printer must have its own spool directory located under the SYS$SPECIFIC:[TCPIP$LPD] directory. The spool directory acts as a printer's spooling queue; it contains the files that are queued for printing on that particular printer. A printer spool directory should have the same name as the printer reference name and must be located on the machine to which the printer is attached. Specify the directory using a UNIX-style path name.

Each printer should specify a spool directory even if the printer is connected to another machine or is on another network. You specify a spooling directory in the printcap database using the sd symbol. For example:


:sd=/SYS$SPECIFIC/TCPIP$LPD/LOCAL1:\

24.5.1.2 Setting Up Error Logging

The LPD records printer errors in a log file located in the SYS$SPECIFIC:[TCPIP$LPD] directory. You can set up a separate log file for each printer, or you can set up one to be shared by all local printers.

To specify the log file in the printcap database, use the symbol lf and specify the directory as a UNIX path. For example, to specify a log file for the print queue named LOCAL1, the printcap entry would be as follows:


 
:lf=/SYS$SPECIFIC/TCPIP$LPD/LOCAL1.LOG:\
 

To specify a log file that can be shared by all printers, specify the same file for each printer entry. For example:


 
:lp=LOCAL1:\
:lf=/SYS$SPECIFIC/TCPIP$LPD/TCPIP$LPD_LOGFILE.LOG:\
 
. 
. 
. 
 
:lp=LOCAL2"\
:lf=/SYS$SPECIFIC/TCPIP$LPD/TCPIP$LPD_LOGFILE.LOG: 
 

24.5.1.3 Support for PrintServer Extensions

You can configure LPD to support remote printing on a system that does not implement the PrintServer extensions. You do this for individual queues by adding a ps field in the queue's printcap entry with a value of non_PS . The printcap entry looks as follows:


:rm=Remote1 
:ps=non_PS 
Q 

If you do not define a ps entry, LPD assumes the printer supports the PrintServer extensions.

Note that you can also configure this option systemwide with the PS-extensions configuration option. Values for this option are non_PS and LPS . For more information about the LPD configuration options, see Table 24-1.

If a printcap entry does not have a ps field defined, LPD uses the value of the configuration option. By default, LPD uses PrintServer extensions.

24.6 LPD Server Cluster Support

When you start LPD, the following print queues are automatically created:

24.6.1 Creating LPD Utility Queues

LPD utility queues are outbound execution queues for printers on remote LPD hosts. The generic queue TCPIP$LPD_OUT can point to one or more outbound execution queues for each node in the OpenVMS Cluster, named TCPIP$LPD_OUT_nodename_nn, where nodename is the SCS node name of the cluster node, and nn is the number of the queue on that node.

By default, outbound execution queues are not created automatically when TCP/IP Services starts up.

The printcap attributes of the utility queues are defined by default as follows:


TCPIP$LPD_OUT_nodename_nn:\
:lf=/TCPIP$LPD_ROOT/000000/TCPIP$LPD_OUt_nodename_nn.LOG:\
:lp=TCPIP$LPD_OUT_nodename_nn:\
:rm=localhost:\
:sd=/TCPIP$LPD_ROOT/TCPIP$LPD_OUT_nodename_nn:\

Entries in the printcap file are required only if you want to change one of these default settings.

24.6.2 Using Clusterwide Print Queues

Print jobs are queued to the TCPIP$LPD_OUT print queue. To specify the printer on the PRINT command line, include the following qualifiers.

For example, to print your LOGIN.COM file on the printer named XYZPRINT on the host LPDSVR.XYZ.ORG, enter the following command:


$ PRINT/QUEUE=TCPIP$LPD_OUT/PARAMETER=(HOST=LPDSVR.XYZ.ORG,PRINTER=XYZPRINT)- 
_$ SYS$LOGIN:LOGIN.COM 

You might want to associate DCL symbols with the destination printers, creating command names that are easy to remember. The new command names can be made available systemwide by including them in the system SYLOGIN.COM file.

The printer specified in the preceding example can be defined with the following command:


$ XYZPRINT :== $ PRINT/QUEUE=TCPIP$LPD_OUT - 
_$ /PARAMETER=(HOST=LPDSVR.XYZ.ORG,PRINTER=XYZPRINT) 

If the logical name is defined systemwide, the XYZPRINT command always prints to the specified printer on the specified host.

24.6.3 Configuring a High-Availability LPD Server

You can use the LPD server cluster features to provide a high-availability, load-balanced LPD server. To configure this, create a cluster alias for all of the IP interfaces of your LPD server nodes. On your LPD clients, specify the cluster alias as the LPD server to which to send LPD jobs. For more information about load balancing and the load broker, see Chapter 7.

24.7 Managing LPD Server Queues

To start the LPD server queues, enter the following command:


$ @SYS$STARTUP:TCPIP$LPD_STARTUP 

To stop the LPD server queues, enter the following command:


$ @SYS$STARTUP:TCPIP$LPD_SHUTDOWN 

To display the status of a remote queue, enter the LPQ command at the DCL prompt. To remove jobs from a remote printer queue, enter the LPRM command at the DCL prompt. For more information about these commands, refer to the HP TCP/IP Services for OpenVMS User's Guide.

The following example deletes all the jobs on remote print queue EIDER_DOWN_Q:


$ LPRM EIDER_DOWN_Q /ALL 

24.8 Defining the LPD Spooler Directory

The TCPIP$LPD_ROOT logical name defines the LPD root directory, which is SYS$SPECIFIC:[TCPIP$LPD], by default.

You can redefine the LPD root directory by defining the TCPIP$LPD_ROOT logical name as follows:


$ DEFINE/SYSTEM/EXECUTIVE_MODE/TRANSLATION_ATTRIBUTES=(CONCEALED,TERMINAL) - 
_$ TCPIP$LPD_ROOT dev:[directory]) 

You do not have to change the printcap file when you define the LPD root directory. The root directory is defined in the printcap file using the following entry:


:sd= /TCPIP$LPD_ROOT/000000/MYQUEUE:\

24.9 Controlling Access to Local Queues

You can grant or deny remote users access to the LPD server by entering the command SET SERVICE LPD /FLAGS=APPLICATION_PROXY. This causes LPD to authenticate remote users through the TCP/IP Services proxy database. You identify the remote users by adding communication proxy entries in the proxy database, TCPIP$PROXY.DAT. Each remote user allowed to access your local queues must have an entry.

To add a proxy entry, enter:


TCPIP> ADD PROXY user_name /HOST=host_name /REMOTE_USER=user_name

For each host, define both its host name and alias name. If you need to use lowercase letters to specify a remote user name, enclose it in quotation marks. For example:


/REMOTE_USER="unixuser" 

You use wildcard characters when adding proxy entries for users on remote systems. For example, the following command allows any user on the remote host REMOTE1 to submit print jobs to the print queues on your system.


TCPIP> ADD PROXY R_USERS /HOST=REMOTE1 /REMOTE_USER="*" 

To disable authentication, use the /FLAG=NOAPPLICATION_PROXY option to the SET SERVICE LPD command. Use the /REJECT option to deny access from certain hosts. For example:


TCPIP> SET SERVICE LPD /REJECT=HOSTS=(loon,ibis,tern) 

Proxy records must exist for both the LPD client remote host's canonical name and for its IPv6-specific host name if all the following are true:

If proxy records do not exist for both the LPD client remote host's canoncical name and for its IPv6 specific hostname, then LPRM commands will fail with a "no privilege" error.


Previous Next Contents Index