WinNT client setup for printing to LPD queue

Introduction

Windows NT is able to work in a diverse networking environment. This flexibility extends to network printing as well. In an effort to support Internet standards, including TCP/IP-based services, as well as provide smooth integration with UNIX platforms, Microsoft included a set of TCP/IP printing utilities with Windows NT.

These utilities enable NT to print to TCP/IP network printers as well as receive and process incoming TCP/IP print jobs. These functions are provided using the Line Printer Remote (LPR) protocol, for sending print jobs and the Line Printer Daemon (LPD) for receiving them. NT also implements a third common protocol, the Line Printer Query (LPQ), which enables you to query the status of a TCP/IP print device.

The LPD feature1) under Windows NT is implemented as an NT service, which quietly listens for incoming print jobs and submits them to the appropriate NT-based printer. There is no front-end interface that can be manipulated, with the exception of starting and stopping the TCP/IP Printing service.

The LPR support 2) is handled in Windows NT by the LPR print monitor, which is accessed from the standard printer interfaces, either the Print Manager, or the Printer Wizard. You can also submit an LPR print job directly from the command-line interface using the LPR.EXE utility.

Finally, if you want to get status information from a remote LPD print queue, you can use the third utility, LPQ, which is only available in the form of the LPQ.EXE command-line utility.

This chapter explores how to install the TCP/IP Print Services, as well as how to configure NT Server as a TCP/IP printing client, and as a TCP/IP print server. It also discusses using the LPR.EXE and LPQ.EXE command-line utilities and their proper syntax.

The TCP/IP print services are not installed by default with Windows NT. Additionally, before you
can install the TCP/IP print services, you must first install TCP/IP.

Installing TCP/IP Printing Service

First step is thus to make sure TCP/IP printing service is installed.

Windows NT can print to any device capable of accepting Berkeley-style LPR jobs, as described in RFC 1179.
In order to print to a TCP/IP print server, you must first create a printer (print queue) on the NT Server
and tell it where to send its print jobs. When creating a printer, Windows NT treats a TCP/IP print server
exactly like it would a printer connected directly to the server through the LPT or similar port. Except, 
instead of passing the print job directly to the LPT port, NT passes the job across the network using LPR.

Once you have set up an NT printer and told it the address of the remote TCP/IP print server, you can share
the NT printer, exactly as you would any other NT printer. This enables **any** networked computer capable
of sending print jobs to your NT Server, including Windows 3.11, Windows 95 and Macintosh clients, to print
to the TCP/IP print server using the NT Server as an intermediary **even** if the client does not have TCP/IP
installed. 

Adding the printer queue

Now double click 'My Computer' and then the 'Printers' icon, or use 'Start → Settings → Printers', a screen similar to the one below should show:

The next wizard should show if you double click the 'Add printer' icon:

Strange enough you should select 'My Computer' here and not 'Network printer server' (we are going to print to a Network printer server are we not?)

It might seem strange to choose the My Computer option, because you are in fact connecting to
a printer on the network. The option for Network Print Server only works if you are connecting
to a printer on the network shared by a Windows for Workgroups 3.1x, LAN Manager, Windows 95,
Windows NT, Windows 2000, Windows XP or Linux system with SAMBA installed (any SMB-based print
device), or by a Novell server if you have Gateway Services for NetWare installed. 
When you print to a remote TCP/IP printer, you actually need to create an NT printer on your
local computer, which is responsible for forwarding the job to the network printer.
For stand-alone network printers that you print to using AppleTalk, DLC, or TCP/IP LPR/LPD,
you must create the printer on your system. This is why you choose the My Computer option.

Click Next> and this page should appear:

Adding the LPR Port

Now click the 'Add Port…' button:

If LPR Port does not show in this dialog, then you have not installed TCP/IP Printing Service correctly, stop now and start again.
Select 'LPR Port' and click the 'New Port…' button and the next dialog should popup:

In this dialog you must enter either the hostname 3) of your FREESCO router if your local DNS is configured correctly (test this with a ping command in a DOS box if you're not sure) or it's IP address if DNS is not working. In the example above the IP address is used.

For the queue name you have two options when you're talking to the default FREESCO printer server, namely:

queue name Comment
nt This queue does *not* send a formfeed at End Of Job
lp This queue sends a formfeed at End Of Job

Click the OK button to continue. NT will send an LPD test command to the FREESCO print server you just specified. If it fails, NT will warn you that it could not establish communications with the LPD server. If you are sure that the information is correct, maybe the printer is turned off, then click OK to continue.

Click Close to close the Printer Ports window and return to the list of available ports in the Add Printer Wizard. The port identifier for the LPD server you just specified should appear in the list of available ports, as shown:

Choose the correct make and model for the printer. For example, a HP Laserjet 5L:

Give the printer a name, as shown below. You also need to tell NT whether or not you want to make this your default printer.

Next you're asked if you want to share this printer. This can f.i. be used to share the just made queue to your FREESCO with Win9x clients that default cannot “talk” to an LPD server but can “talk” to a WinNT printer share.

Now the wizard ask if you want to print a test page when the wizard is finished installing.

This dialog pops up at the end of the installation, asking for a confirmation if the test job printed OK or not. I suggest you always say 'Yes' here, no matter if that's the truth or not, because you don't want to go through the M$ Printer Troubleshoot wizard, believe me!

LPR command

If you want to send a simple text file to your remote FREESCO printer server, you can use the LPR command-line utility.

The syntax for the LPR command is:

lpr -S server -P printer [-C Class] [-J Jobname] filename

-S server is the DNS name, or the IP address of the host.

-P printer is the name of the printer or queue on the host.

-C class specifies the content of the banner page for the class.

-J jobname specifies a name for the job. This name will show up if someone views the print queue status on the print server.

filename is the name of the file you want to print.

For example, if I wanted to print a file c:\test.txt to the 'nt' queue on my FREESCO box at IP adres 192.168.0.1, I would use the following command:

lpr -S 192.168.0.1 -P nt c:\test.txt

This only works if the printer attached to your FREESCO is capable of printing unformatted (ASCII) text files, not all printers do!

Using the LPQ Utility To Check the Status of your FREESCO printer server

The LPQ utility enables you to query the queue status of an LPD print server.

The syntax for the LPQ command is

lpq -S server -P printer [-l]

-S server is the DNS name, or the IP address of the host.

-P printer is the name of the printer or queue on the host.

-l requests a detailed status. Most LPD servers will ignore this switch.

For example, if I wanted to know the status of queue 'lp' on a my FREESCO at router.inet, I would use the command:

lpq -S router.inet -P lp
1) the capability to receive and process a print job
2) the ability to send a job to a remote machine for processing
3) f.i. router.inet
 
freesco/manuals/clients/winnt/printing.txt (145003 views) · Last modified: 2005/09/14 00:49 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki