The text of a manual · part 6 of 13
HP Jetdirect Print Servers (300X/510X) Administrator's Guide: Configuring for LPD Printing
Pages 41 to 52 of 102, from HP Jetdirect Print Servers (300X/510X) Administrator's Guide
The original document is the PDF (1.9 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the HP J3263A JetDirect 300X
Page 41
4 Configuring for LPD Printing Introduction The HP Jetdirect print server contains an LPD (Line Printer Daemon) Server module to support LPD printing. This chapter describes how to configure the HP Jetdirect print server for use with various systems that support LPD printing. These instructions include: ●
LPD on UNIX Systems ■ Configuring BSD-based UNIX systems using LPD ■ Configuring print queues using the SAM utility (HP-UX systems) ● LPD on Windows Systems
About LPD Line Printer Daemon (LPD) refers to the protocol and programs associated with line-printer spooling services that may be installed on various TCP/IP systems. Some of the widely used systems in which the HP Jetdirect print server functionality supports LPD include: ●
Berkeley-based (BSD) UNIX systems HP-UX ● Solaris ● IBM AIX ● Linux ● Microsoft Windows ● Apple Mac OS ●
The UNIX configuration examples in this section show the syntax for BSD-based UNIX systems. The syntax for your system may vary. See your system documentation for the correct syntax.
ENWW
41
Page 42
The LPD functionality can be used with any host implementation of LPD that complies with the RFC 1179 document. The process for configuring printer spoolers, however, may differ. See your system documentation for information on configuring these systems.
Note
The LPD programs and protocol include the following: Table 4.1
LPD Programs and Protocols
Program Name
Purpose of Program lpr
Queues jobs for printing lpq
Displays print queues lprm
Removes jobs from print queues lpc
Controls print queues lpd
Scans and prints the files if the specified printer is connected to the system. If the specified printer is connected to another system, this process forwards the files to an lpd process on the remote system where the files are to be printed.
Requirements for Configuring LPD Before you can use LPD printing, your printer must be properly connected to the network through the HP Jetdirect print server, and you must have print server status information. This information is listed on the HP Jetdirect printer configuration page. If you have not printed a configuration page from your printer, see the hardware installation guide for your print server or your printer’s getting started guide for instructions. You must also have the following: ●
An operating system that supports LPD printing.
●
Superuser (root) or Administrator access to your system.
42 Configuring for LPD Printing
ENWW
Page 43
●
The LAN hardware address (or station address) of the print server. This address is printed with print server status information on the HP Jetdirect configuration page and is of the form: LAN HW ADDRESS: xxxxxxxxxxxx where x is a hexadecimal digit (for example, 001083123ABC).
●
An IP address configured on the HP Jetdirect print server.
LPD Setup Overview The following steps are necessary to configure the HP Jetdirect print server for LPD printing: 1. Setting up IP parameters. 2. Setting up print queues. 3. Printing a test file. The following sections provide detailed descriptions for each step.
Step 1. Setting Up IP Parameters To set up IP parameters on the HP Jetdirect print server, refer to chapter 3. For more information on TCP/IP networks, refer to appendix A.
Step 2. Setting Up Print Queues You must set up a print queue for each printer or printer personality (PCL or PostScript) you use on your system. Also, different queues are required for formatted and unformatted files. The queue names text and raw in the following examples (see rp tag) have special meanings. Table 4.2
Supported Queue Names raw, raw1, raw2, raw3 no processing text, text1, text2, text3 carriage return added auto, auto1, auto2, auto3 automatic
ENWW
Configuring for LPD Printing 43
Page 44
The line printer daemon on the HP Jetdirect print server treats data in the text queue as unformatted text or ASCII, and adds a carriage return to each line before sending it to the printer. (Note that the actual observed behavior is that a PCL line termination command (value of 2) is issued at the beginning of the job.) The line printer daemon treats data in the raw queue as formatted files in PCL, PostScript, or HP-GL/2 languages and sends the data without change to the printer. Data in the auto queue will be automatically processed as text or raw, as appropriate. If the queue name is not one of the above, the HP Jetdirect print server assumes it to be raw1.
Step 3. Printing a Test File Print a test file using the LPD commands. For instructions, see the information provided for your system.
44 Configuring for LPD Printing
ENWW
Page 45
LPD on UNIX Systems Configuring Print Queues for BSD-based Systems Edit the /etc/printcap file to include the following entries: printer_name|short_printer_name:\ :lp=:\ :rm=node_name:\ :rp=remote_printer_name_argument:\ (this should be text, raw, or auto) :lf=/usr/spool/lpd/error_log_filename:\ :sd=/usr/spool/lpd/printer_name: where printer_name identifies the printer to the user, node_name identifies the printer on the network, and remote_printer_name_argument is the print queue designation. For more information on printcap see the printcap man page. Example 1 (suggested name for an ASCII or text printer): lj1_text|text1:\ :lp=:\ :rm=laserjet1:\ :rp=text:\ :lf=/usr/spool/lpd/lj1_text.log:\ :sd=/usr/spool/lpd/lj1_text: Example 2 (suggested name for PostScript, PCL, or HP-GL/2 printers): lj1_raw|raw1:\ :lp=:\ :rm=laserjet1:\ :rp=raw:\ :lf=/usr/spool/lpd/lj1_raw.log:\ :sd=/usr/spool/lpd/lj1_raw:
ENWW
Configuring for LPD Printing 45
Page 46
If your printer does not support automatic switching between PostScript, PCL, and HP-GL/2 languages, use the printer's control panel (if the printer has one) to select the printer language or rely on the application to select the printer language via commands embedded in the print data. Make sure your users know the printer names for the printers, since they must type those names on the command line for printing. Create the spooling directory by making the following entries. At the root directory, type: mkdir /usr/spool/lpd cd /usr/spool/lpd mkdir printer_name_1 printer_name_2 chown daemon printer_name_1 printer_name_2 chgrp daemon printer_name_1 printer_name_2 chmod g+w printer_name_1 printer_name_2 where printer_name_1 and printer_name_2 refer to the printers to be spooled. You may spool several printers. The following example shows the command to create the spooling directories for printers used for text (or ASCII) printing and for PCL or PostScript printing. Example: mkdir /usr/spool/lpd cd /usr/spool/lpd mkdir lj1_text lj1_raw chown daemon lj1_text lj1_raw chgrp daemon lj1_text lj1_raw chmod g+w lj1_text lj1_raw
46 Configuring for LPD Printing
ENWW
Page 47
Configuring Print Queues Using SAM (HP-UX systems) On HP-UX systems you can use the SAM utility to configure remote print queues for printing “text” (ASCII) files or “raw” (PCL, PostScript, or other printer language) files. Before you execute the SAM program, select an IP address for the HP Jetdirect print server and set up an entry for it in the /etc/hosts file on your system running HP-UX. 1. Start the SAM utility as a superuser. 2. Select Peripheral Devices from the Main menu. 3. Select Printers/Plotters from the Peripheral Devices menu. 4. Select Printers/Plotters from the Printers/Plotters menu. 5. Select Add a Remote Printer from the Actions list, then select a printer name. Examples: my_printer or printer1 6. Select a remote system name. Example: jetdirect1 (node name of the HP Jetdirect print server) 7. Select a remote printer name. Type text for ASCII or raw for PostScript, PCL, or HP-GL/2. 8. Check for a remote printer on a BSD system. You must type Y. 9. Click OK at the bottom of the menu. If the configuration is successful, the program prints the message: The printer has been added and is ready to accept print requests. 10. Click OK and select Exit from the List menu. 11. Select Exit Sam. Note
ENWW
By default, the lpsched is not running. Make sure you turn the scheduler on when you set up your print queues.
Configuring for LPD Printing 47
Page 48
Printing a Test File To verify that the printer and print server connections are correct, print a test file. 1. At the UNIX system prompt type: lpr -Pprinter_name file_name where printer_name is the designated printer and file_name refers to the file to be printed. Examples (for BSD-based systems): Text File: lpr -Ptext1 textfile PCL File: lpr -Praw1 pclfile.pcl PostScript File: lpr -Praw1 psfile.ps HP-GL/2 File: lpr -Praw1 hpglfile.hpg For HP-UX systems, substitute lp -d for lpr -P. 2. To get print status, type the following at the UNIX prompt: lpq -Pprinter_name where printer_name is the designated printer. Examples (for BSD-based systems): lpq -Ptext1 lpq -Praw1 For HP-UX systems, substitute lpstat for lpq -P to get print status. This completes the process for configuring the HP Jetdirect print server to use LPD.
48 Configuring for LPD Printing
ENWW
Page 49
LPD on Windows 2000/Server 2003 Systems This section describes how to configure Windows systems to use the HP Jetdirect LPD (Line Printer Daemon) services. The process consists of two parts: ●
Installing TCP/IP software (if not already installed). ● Configuring a network LPD printer.
Installing TCP/IP Software This procedure lets you check whether you have TCP/IP installed on your Windows system, and to install the software if necessary. Note
You may need your Windows System distribution files or CD-ROMs to install TCP/IP components.
1. To check whether you have Microsoft TCP/IP Printing protocol and TCP/IP printing support: ■
Windows 2000: Click Start, Settings, Control Panel. Then double-click the Network and Dial-up Connections folder. Select the Local Area Connection for your network, then click the File menu and select Properties.
■
Server 2003: Click Start, All Programs, Accessories, Communications, and open the Network Connections folder. Double-click the Local Area Connection for your network and click Properties.
If Internet Protocol (TCP/IP) is listed and enabled in the list of components used by this connection, the necessary software is already installed. (Proceed to “Configuring a Network Printer for Windows 2000/Server 2003 Systems”). if not, go to step 2.
ENWW
Configuring for LPD Printing 49
Page 50
2. If you have not previously installed the software: ■
Windows 2000/Server 2003: In the Local Area Connection Properties window, click Install. In the Select Network Component Type window, select Protocol and click Add to add the Internet Protocol (TCP/IP).
Follow the instructions on the screen. 3. Enter TCP/IP configuration values for the computer: ■
Windows 2000/Server 2003: On the General tab in the Local Area Connection Properties window, select Internet Protocol (TCP/IP) and click Properties.
If you are configuring a Windows server, type the IP address, default gateway address, and subnet mask in the appropriate spaces. If you are configuring a client, check with your Network Administrator to learn whether you should enable automatic TCP/IP configuration or whether you should type a static IP address, default gateway address, and subnet mask in the appropriate spaces. 4. Click OK to exit 5. If prompted, exit Windows and restart your computer for the changes to take effect.
Configuring a Network Printer for Windows 2000/Server 2003 Systems Set up the default printer by performing the following steps. 1. Verify that the Print Services for Unix is installed (required for LPR port availability): a. Windows 2000: Click Start, Setup, and Control Panel. Double-click the Network and Dial-up Connections folder. Server 2003: Click Start, All Programs, Accessories, Communications, and open the Network Connections folder. b. Click the Advanced menu and select Optional Networking Components.
50 Configuring for LPD Printing
ENWW
Page 51
c.
Select and enable Other Network File and Print Services.
d. Click Details, and verify that Print Services for Unix is enabled. If not, enable it. e.
Click Okay, and then Next.
2. Windows 2000: Open the Printers folder (from the Desktop, click Start, Settings, and Printers). Server 2003: Open the Printers and Faxes folder (from the Desktop, click Start, Printers and Faxes). 3. Double-click Add Printer. From the Add Printer Wizard welcome screen, click Next. 4. Select Local printer, and disable automatic detection for Plug and Play printer installation. Click Next. 5. Choose Create a new port, and select LPR Port. Click Next. 6. In the Add LPR compatible printer window: ■
Enter the DNS name or IP address of the HP Jetdirect print server.
■
Enter (in lower case) raw, text, or auto for the name of the printer or print queue on the HP Jetdirect print server.
Then click OK. Note
The HP Jetdirect print server treats text files as unformatted text or ASCII files. Files that are raw are formatted files in PCL, PostScript, or HP-GL/2 printer languages. For HP Jetdirect external print servers with three ports, use raw1, raw2, raw3, text1, text2, text3 or auto1, auto2, auto3 to specify the port.
7. Select the Manufacturer and Printer model. (If necessary, click Have Disk and follow the instructions to install the printer driver.) Click Next. 8. Choose to keep the existing driver, if prompted. Click Next. 9. Enter a printer name, and choose whether this printer will be the default printer. Click Next.
ENWW
Configuring for LPD Printing 51
Page 52
10. Choose whether this printer will be available to other computers. If shared, enter a share name that identifies the printer to other users. Click Next. 11. If desired, enter a location and other information for this printer. Click Next. 12. Choose whether to print a test page, and click Next. 13. Click Finish to close the wizard.
Verifying the Configuration Print a file from any application. If the file prints correctly, the configuration was successful. If the print job is not successful, try printing directly from DOS using the following syntax: lpr -S<ipaddress> -P<queuename> filename where ipaddress is the IP address of the print server, queuename is the name “raw” or “text” and filename is the file you wish to print.If the file prints correctly, the configuration was successful. If the file does not print, or prints incorrectly, see the chapter “Troubleshooting the HP Jetdirect Print Server.”
Printing from Windows Clients If the LPD printer on the Windows server is shared, Windows clients can connect to the printer on the server using the Windows Add Printer utility in the Printers folder.
52 Configuring for LPD Printing
ENWW