


	
                iQueue

		LPD/LPR printing connectivity for 
		Novell NetWare 3.1x & 4.x
                

















































May 1996

The information in this document is subject to change without notice and should not be construed as a commitment by Smart Systems. Smart Systems assumes 
no responsibility for any errors that may appear in this document.

DEC, VMS, DECnet are registered trademarks of Digital Equipment Corporation.
UNIX is a registered trademark of AT&T.
MS-DOS is a registered trademark of Microsoft Corporation.
NetWare and Novell  are registered trademarks of Novell Inc.

All other brand and product names are trademarks or registered trademarks of their respective companies.



Copyright c1992-1996 SMART SYSTEMS.



Contents

1.1 Introduction	2
1.2 Prerequisites	2
2.0 UNIX-to-NetWare Printing	3
2.1 Installing the NetWare NLM	3
2.2 Configuring Queues for LPD	4
2.3 LPR Options	6
2.4 Remote Host Configuration	6
2.5 Privileged Hosts	6
2.6 Queue Job Ownership	7
2.7 LPQ and LPRM Commands	7
3.0 NetWare-to-UNIX Printing	8
3.1 Installing the NetWare NLM	8
3.2 Print Queue Configuration	8
3.3 Queue Types	8
3.4 LPR Transfer Notification	9
3.5 Printcap File	9
4.1 Troubleshooting	10
Appendix A - LPD control code interpretation	11
Appendix B - UNIX Printcap Entries	12





1.1 Introduction

	iQueue provides a pair of NetWare Loadable Modules (NLM) which implement the Berkeley Line Printer Daemon 
(RFC1179, LPD) protocol. This is the de facto standard remote printing protocol for UNIX. The LPD protocol that 
layers on top of TCP/IP is also supported by many other operating systems.

	The LPD NLM allows a NetWare file server to accept print jobs from systems supporting the LPD protocol. 
NetWare queue inquiry and job deletion are supported by the UNIX LPQ and LPRM commands. The LPR NLM 
allows a NetWare file server to service local NetWare print-queues for transmission via the LPD protocol to remote 
hosts.
	
	If you have not been supplied with authorisation keys this software will run in demonstration mode (except for un-
keyed versions of the software). The implication of this is that the NLMs will terminate and unload after one hour. 
Please see the file order.inf for further information. 

	The configuration of the UNIX (or other) host is not addressed here. You will need to consult with the system 
administrator responsible for the remote host.

1.2 Prerequisites

	Ensure the TCPIP.NLM is loaded and configured correctly on your NetWare server. Refer to the TCP/IP Transport 
Supervisors Guide included with your NetWare documentation set, or the Novell technical note NetWare TCP/IP 
Installation and Configuration on a NetWare 3.11 Fileserver available as NWTCP.TXT from any Novell FTP 
mirror in NOVLIB 8.
	
	It is strongly recomended that TCPIP.NLM be version 2.02m or later, this is found on a NetWare archive as 
TCP188.EXE.

	If you are running NetWare 3.11 you may not have the required support NLM NWSNUT, without this 
LPDSET.NLM will report missing symbols. NWSNUT can be obtained as part of the Novell update LIBUP3.EXE. 
This file can be obtained from ftp.novell.com or Netwire on CompuServe.
	
	Enter the names and addresses of the remote TCP/IP hosts that you wish to print to and from into the sys:\etc\hosts 
file on the NetWare server.

	Check that the TCP/IP connection is working by PINGing the NetWare server from the remote host.

	NetWare 4.xx environments require that Bindery Emulation is enabled.



2.0 UNIX-to-NetWare Printing
2.1 Installing the NetWare NLM

	Copy the LPD.NLM, LPD.PS and LPDSET.NLM from the distribution directory to the sys:\system directory on 
your target server.

	On the File Server Console type
		load LPD <auth_key> [verbose] [text] [threads=x] [user=userid]
	This will load and start the LPD server software,  presenting the status screen. To switch between console screens 
type Ctrl-ESC.
	The command line options for LPD are:
	auth_key	The required server specific authorisation key. Note site licence versions of the software will not 
require a key.
	verbose	The status screen will display debugging information.
	text	All the inward queues are text queues and will have the CR to CR/LF filter applied.
	threads=	Allows performance tuning by increasing or decreasing the number of LPD server threads, this 
could be reduced on small servers to lower memory overhead or increased in high volume 
environments. Idle threads use no CPU resource. The range is 1 through 10 with the default 
being 5.
	user=	Specifies a userid that all incoming print jobs will belong to. This userid may have a password 
but not an expiry date or login count restrictions. Use this option only if you have problems with 
print servers servicing jobs spooled by iQueue.

	To ensure that the printer daemon NLM is loaded each time your file server starts, edit with a text editor or the 
INSTALL NLM  sys:\system\autoexec.ncf , adding the load command to the end of script.
		e.g. load LPD abb543e text threads=3




2.2 Configuring Queues for LPD

	Once the LPD NLM is loaded all print queues on the NetWare server are available to receive LPD print jobs.

	Configuration of individual queue options is done with the LPDSET.NLM, at the console prompt enter load 
LPDSET.

	Select the queue to configure by pressing enter, the screen shown below is displayed.

	 

	Secure:
	By default (No) any remote user may print to a NetWare queue via the LPD NLM. 
	Setting a queue to secure causes the NLM to attempt a match between the remote userid and a local NetWare 
user. If the match or NetWare security fails the job is discarded. Secure queues require that the NetWare user 
has a valid account (e.g. not disabled or expired) and is a user of the queue as defined in PCONSOLE.
	Care must be taken when limiting concurrent NetWare logins for users as a count against this restriction is 
used when a print job is being received. This option is useful in environments where printer accounting is 
used.

	Filter:
	Converts the incoming data, the currently available filters are:
	Binary	Passes data without change (default).
	Text	Converts CR to CR/LF characters. 
	Fortran	Converts print jobs with fortran carriage control characters into formatted form.
	Text -> Postscript	
	Converts plain text files into the Postscript printer language. If the inward job is already in 
Postscript form no conversion is performed. Different character mapping (for Scandinavian 
countries) can be configured  by editing the file LPD.PS with a text editor.
	When the `text' option is used with the LPD load command the filter is Text for every queue 
regardless of this setting.
	
	Configure Filter:
		This option is only available for the Postscript filter. Selection presents a form for setting paper size, margins 
and font. Measurements are in points, 72 points = 1 inch, 28.35 points = 1 cm.

	Suppress Banner:	
Disables the printer banner page for all inward jobs on this queue. Banners should be suppressed for Postscript 
print queues unless the NetWare print server is "Postscript aware" (e.g. ATPS).



	Suppress Form Feed:
		Sets the `suppress form feed at end of job' flag in the NetWare print entry. This instructs the print server not to 
print a blank page at the end of the print job.

	Form Number:		
		Will set the form number on print job entries.

	Printer Init:	
		Enable the sending of data before each print job. This is used to set such options as font and orientation with 
printer specific control codes. Selecting `file' indicates the initialisation information is held in a binary file that 
you specify, selecting `string' indicates that you will directly specify the control characters. The latter is a more 
efficient method.

	Enter Data:	
		Select this to enter the init sequence data or filename. File names must include the NetWare volume name, e.g. 
sys:\etc\hpinit
		Strings are typed directly, control characters are entered as their ascii value enclosed in <> e.g. <026>, 
entering a less than symbol is done as <<

	Printer Reset:		
		As for init except the data is sent after the print job.



2.3 LPR Options

	Several job options can be controlled from the sending end of the printing operation. All of the following options 
are case sensitive. If any option is to be permanent, using LPDSET NLM configuration tool is the preferred method.


2.3.1 Banner Pages

	If the remote LPR software is fully Berkeley LPD compatible then suppression on a job by job basis can be achieved 
with the command:
		lpr -sh filename
	The permanent version of this is to add the :sh command to the printcap file. (Refer Appendix B)

	If the sh option does not work with your LPR then the following can be used:
		lpr -J/nb filename


2.3.2 Form Feed Suppression

	If you require Form Feeds to be filtered by the LPD NLM the /nff switch may be used with the LPR command. As 
with all /J modifiers a combination is acceptable:
		lpr -J/nff filename or lpr -J/nff/nb filename


2.3.3 Form Number

	If you require a particular NetWare form number for a print job this can be set with the /f:x option. For form 
number 10 the following would be used:
		lpr -J/f:10 filename
2.4 Remote Host Configuration

	This will mainly depend on the LPR software your remote host is using. You should refer to the documentation 
supplied with the system. 

	Information you will need however is the IP address (or name) of the NetWare file server and the destination print 
queue name, this is what the remote queue is to be "pointed" at.

	Not all LPD software adheres to the RFC. Appendix A lists the LPD control file entries recognised by the LPD 
NLM.

2.5 Privileged Hosts

	By default any foreign host can print to your NetWare server. Limiting which hosts can access queues on a server is 
done by creating the text file sys:\etc\hosts.lpd, place the names of authorised hosts (from those defined in 
sys:\etc\hosts) one per line.
	e.g.	alpha.foo.bar.com
			beta.foo.bar.com

2.6 Queue Job Ownership

	If a queue is defined as `secure', the local user with the same userid as the remote job submitter will own the job.  If 
a queue is not `secure' queue entries spooled from a remote host will be entered into NetWare queues with the 
owner being the same name as your fileserver. The implication of this is any printing accounting done by the 
NetWare print server may be incorrect. However remote user identification is provided for banner printing and 
PCONSOLE inquiry. 

2.7 LPQ and LPRM Commands

	The remote host can query all your NetWare queues with the lpq command.  The lprm command allows the 
removal of print jobs. The security applying to this command follows the UNIX standard with a user able to delete 
only their own jobs and the `root' user all jobs. When a queue is defined as secure this is enhanced by supporting 
NetWare queue operator rights



3.0 NetWare-to-UNIX Printing
3.1 Installing the NetWare NLM

	Copy the LPR.NLM from the distribution directory to the SYS:SYSTEM directory on your target server.

	Once the PRINTCAP file has been created (see below), on the File Server Console type:
	load LPR <auth_key> [verbose] [threads=x] [StripCtrlD] [BadResp] [dbu] [nam]

	auth_key	The required server specific authorisation key. Note site license versions of the software will 
not require a key.
	verbose		The status screen will display debugging information.
	threads=	Allows performance tuning by increasing or decreasing the number of LPR server threads, this 
could be reduced on small servers to lower memory overhead or increased in high volume 
environments. Idle threads use no CPU resource. The range is 1 through 10 with the default 
being 5.
	StripCtrlD	When enabled the LPR NLM will check for and strip Ctrl-D characters from the start of 
Postscript printjobs. UNIX connected Postscript printers or filters often read a Ctrl-D as an end 
of job indicator and discard the Postscript data.
	BadResp	This is a special flag,see the troubleshooting section below.
	dbu	Drop bad jobs. With this switch is on jobs rejected by the remote host when the control file is 
sent will be deleted from the queue. This option is useful when userid mapping is enabled at 
the remote end and you wish to drop jobs from invalid users.
	nam	This will force LPR to use the Name Field from the capture command rather than the NetWare 
login ID as the owner of the printjob. This may be useful for accounting purposes. The capture 
name field is set with the capture /nam= parameter.

	To ensure that the printer server NLM is loaded each time your file server starts, edit with a text editor or the 
INSTALL NLM  sys:\system\autoexec.ncf , adding the load command to the end of script.
	e.g. load LPR ae550034 verbose threads=3

	This will load and start the LPR software. The software presents the status screen, this screen is used to monitor the 
operation of the software. To switch between console screens type CTRL-ESC.

3.2 Print Queue Configuration

	Using PCONSOLE create a new print server called LPR_DAEMON. Note do not assign a password to it. Create the 
print queues that are to be served by remote hosts, making LPR_DAEMON their print server.

3.3 Queue Types

	DOS uses the control character pair Carriage Return/Line Feed (CR/LF) to mark the end of a line in a text file. 
UNIX however uses only the Line Feed (LF) to mark the end of a line. 

	NetWare has two types of print job, TEXT and BINARY. If the job is flagged as TEXT the LPR NLM strips all 
CR/LF pairs to the LF character. 

	The NetWare CAPTURE command defaults to TEXT mode, if you need to send a binary file (e.g. to an IBM 
graphics printer) you should use the capture /NT switch to force the new queue entries to BINARY mode.

	The "Print Banner" flag of a NetWare print queue entry is also respected and this information is passed to the 
remote LPD daemon enabling or suppressing banners as required.

3.4 LPR Transfer Notification

	The NetWare CAPTURE command provides a NOTIFY switch. Enabling this switch causes the LPR NLM to send 
a broadcast message to the submitting workstation when a print job is successfully transferred to the remote host.  

3.5 Printcap File

	To define outward queues you must create the text file PRINTCAP in the sys:\etc directory, the format of this file 
is:
	netware_queue	remote_host	remote_queue
	netware_queue	remote_host	remote_queue
	...

	For example to redirect the local NetWare queue LASER to the remote host foo.bar.com, and the remote queue 
name is HP_LASER, the following entry would be made:
	LASER	FOO.BAR.COM	hplaser

	Print jobs can also be redirected to a port on a device such as a terminal server. The syntax for this is #port_no 
instead of the queue name. An example entry would be:

	DOTMATRIX	BOX.BAR.COM	#23

	If you change the PRINTCAP file the LPR NLM must be reloaded before any changes will take effect.



4.1 Troubleshooting

Error
LPD or LPR NLM fails to load reporting symbol not found

Action
You must upgrade to a newer version of CLIB (see the prerequisites section of this manual).

Error
LPDSET fails to load reporting symbol not found errors.	

Action
You must upgrade to a newer version of CLIB that supports the NWSNUT.NLM

Error
LPR cannot connect to a host specified in the PRINTCAP file.

Check
Remote host correctly defined in the SYS:ETC/HOSTS file
Correct case of queue name in PRINTCAP file
LPD daemon running on the remote host
NetWare server defined in DNS or hosts file and PINGable by name from the remote host.
NetWare server in etc/hosts.equiv or etc/hosts.lpd file on remote host.

Error
Inward printouts appear to have the next line run-on instead of starting from the margin

Action
Use the LPDSET NLM to configure the print queue type as TEXT.

Error
Jobs received for a Postscript printer do not work.

Action
Use the LPDSET NLM to ensure that banners are being suppressed for this queue.


Error
Printing from MS-Windows to a queue re-directed to a Postscript printer either fails to print or 
prints as text

Action
MS Windows precedes print jobs with a Ctrl-D. Reload the LPR NLM with the StripCtrlD 
flag.

Error
The printjob sent by LPR is printed by the remote printer but remains in the NetWare queue.

Action
The LPR NLM may be receiving what it thinks is an error. Reload the LPR NLM with the 
BadResp flag

Error
Jobs received via LPD appear to get stuck in the print queue when being serviced by an Intel 
Netport or other 3rd party print server.

Action
The Netport requires that all print jobs have a `real' user as the job owner. Either configure all 
queues to be secure or load LPD with the user= parameter.





Appendix A - LPD control code interpretation

Any LPD control file codes not interpreted are ignored.
  
H	"host name" of machine where lpr was done.

J	"job name" on banner page. If this contains /NB then the NetWare banner is suppressed.

L	"literal" user's name to print on banner, a NetWare banner is produced if this control code is present.

N	"name" of file, split into directory, file name for banner header.

P	"person" remote user sending print job.

S	this command followed by an X is generated by PLP (Lantronix) printer software to suppress banner pages.

f	this is a text file. (LPR sends this type for TEXT job entries),

l	this is file contains control characters. (LPR sends this type for BINARY job entries)



Appendix B - UNIX Printcap Entries


Below are detailed some of the possible UNIX printcap file entries.

printer_name1|printer_name2|printer_nameN|printer_description:\
	:lp=print_device_name:rm=netware_server_name:\
	:rp=netware_print_queue_name:sd=local_spool_directory:\
	:mx#file_size:rs:sh:

	printer_name1..printer_nameN
	These are the names available for UNIX users to access this queue

	printer_description
	This is an informational description of the printer

	print_device_name
	The name of the print device on the local machine. (e.g. "lp=/dev/matrix")
	When printing to a remote machine this should be set to nothing (e.g. "lp=").

	netware_server_name
	The name of the NetWare server on which the destination queue resides. This name should exist in the /etc/hosts 
file on the UNIX host.

	netware_print_queue_name
	The NetWare print queue.

	local_spool_directory
	This is the name of the local spool directory (e.g. "/usr/spool/netware_print_queue_name") printjobs are temporarily 
stored here before printing. This directory must be manually created.

	file_size
	The maximum file size in blocks that can be spooled to this printer. Omit or set this to 0 for unlimited file size.

	rs
	Restricts remote users to requiring an account on this system before they can access the printer. If this entry is 
omitted any user on a  "trusted host" may access this printer.

	sh
	This will suppress the LPR header (banner) page.
 



 

 





iQueue		1


