Tru64 UNIX - how to set up a TCP/IP telnet printer
Description
The TCP/IP (telnet) printer was introduced in Tru64 UNIX (formerly Digital UNIX) Version 4.0A. With TCP/IP printing, the local host manages print jobs in the same manner as it would manage print jobs for a local printer. The only difference is that with TCP/IP printing, the local print daemon (lpd) communicates with the remote printer over TCP/IP (similar to LAT printing). Each printer listens for connection requests on a socket number. The telnet printer handles each host request on a first-come first-served basis. This is unlike remote printing, in which the remote printer manages a print queue on the remote site and listens for network connections on socket 515 (as specified in the entry for printer in /etc/services).
Step-by-step guide
Setting up TCP/IP Printing
The following steps describe how to set up TCP/IP printing on a local host.
1. Set up the printer.
Assign a TCP/IP address and node name to each printer with a network card. Also, determine the TCP/IP socket number on which the printer will listen for connection requests. You will need the socket number in Step 2.2 when you edit the /etc/services file.
Table 1 lists the socket numbers for three printers made by Digital and one made by Hewlett Packard.
Table 1: TCP/IP Socket Numbers
Printer | Socket Number |
---|---|
DEClaser 3500 (LN14) | 10001 |
DEClaser 5100 (LN09) | 10001 |
HP Laserjet 4m+ | 9100 |
LN17 | 2501 |
To obtain the socket number for other printers, see your printer documentation. Some printers may allow you to specify this number yourself.
2. Configure the local host as superuser "root"
2.1. Configure the printer using lprsetup
Execute the /usr/bin/lprsetup command and answer the questions to create an entry in the /etc/printcap file for your printer. When it prompts you to enter values for printcap control variables, assign the following values to the ct and lp variables:
ct=tcp | connection type is "tcp" |
---|---|
lp=@nodename/servicename | example: |
Replace nodename with the name of the printer's node as registered for use on your network & replace servicename with the name you will choose to enter in the /etc/services database in the next step.
Also, an existing /etc/printcap printer entry can be manually modified to use TCP/IP printing using a text editor, such as vi. Just modify the values for the ct and lp variables. You can also remove the values for the xs, xc, fs, and fc control variables which establish settings that are relevant to the serial to the serial port driver. These are ignored by the network socket driver.
2.2 Configure the services database.
Register a service name and tcp port number (socket number) in the /etc/services database file. Enter the socket number determined in step 1 and associate it with a service name of your choice. For example, to configure the services database for a DEClaser 3500, you would add the following line to the /etc/services file:
declaser3500 10001/tcp |
Note that the user-defined declaser3500 string represents the service; it is the same string entered as the "servicename" in the /etc/printcap file in step 2.1 After saving the changes to the /etc/services file, restart the inetd daemon to reload the /etc/services file:
# rcinet restart |
3. Configure the remote hosts database
Enter the printer's nodename specified as part of the lp variable value in the /etc/printcap file with its network address in the /etc/hosts database file.
If you are running a BIND server for remote host names, you do not necessarily need to add the printer's node name to the /etc/hosts file, though if there is ever
a problem with the BIND server, an entry in /etc/hosts would be a useful fallback.
10.0.0.52 sales_laser1 #telnet printer "1" for sales |
4. Example telnet printer printcap entry :
|
You can also test to see if the printer answers using telnet :
|
Example to print to the printer:
# lpr -Plp7 /etc/motd
|
TCP/IP printing, also called telnet printing, is a new feature in the print daemon introduced in Tru64 UNIX (Digital UNIX) Version 4.0A.
Reference for Tru64 UNIX 5.1B can be found here:
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_ACRO_DUX/ARH9FETE.PDF
8.2.1 Network and Direct Printer Connections
8.3.1.1 Using printconfig for TCP/IP Printer Configuration
8.3.1.2 Additional Manual Steps Required for Setting Up TCP/IP
Related articles
© Stromasys, 1999-2024 - All the information is provided on the best effort basis, and might be changed anytime without notice. Information provided does not mean Stromasys commitment to any features described.