Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Solaris Printing
Previous Next

Setting Up Network Printers

A network printer is a hardware device that is directly connected to the network. This printer can be accessed from a print server without physically connecting the printer to the print server with a cable. The network printer has its own system name and IP address.


Caution - Configuring a network printer without utilizing queue configuration on a print server is an unsupported method that results in printer misconfiguration.

You can correctly configure a network printer with Solaris Print Manager by selecting the New Network Printer option. Or, you can use the lpadmin command to correctly configure a network printer. For information about how to configure a network printer by using the lpadmin command, see How to Add a New Network-Attached Printer by Using LP Print Service Commands.

Note that you should not use the lpadmin -p queue-name -s printer-name command or the Add Access to Printer option of Solaris Print Manager to add a network printer. These methods should be used exclusively to point to an already existing queue on a remote print server.

The print server includes the following features:

  • Queueing capabilities

  • Filtering

  • Printing administration for a network printer

Printing directly to a network printer results in a printer misconfiguration that is likely to cause a number of problems. Additionally, job options, such as copies, the use or disuse of burst page, and filtering, are lost.


Network printers might use one or more special protocols that require a vendor-supplied printing program. The procedures that are used to set up the vendor-supplied printing program can vary. If the printer does not come with vendor– supplied support, Solaris network printer support can be used with most devices. Use the printer vendor-supplied software, whenever possible.

The vendor might supply an SVR4 printer interface script to replace the standard printer interface script. If so, that SVR4 interface script calls the vendor-supplied printing program to send the job to the printer. If not, you need to modify the standard interface script to call the vendor-supplied printing program. To do so, edit the per-printer copy of the standard interface script to call the vendor-supplied printing program.

The following are the terms that are used in network printer configuration. For a complete description of printing terms, see Glossary.

  • Print server – The system that spools and schedules the jobs for a printer.

  • Printer-host device – The software and hardware supplied by a vendor that provides network printer support for a non-network capable printer.

  • Printer node – Either the physical printer or the printer-host device.

  • Printer name – The name typed on the command line when you use any of the printer commands.

  • Destination or network printer access name – The internal name of the printer node port that is used by the printer subsystem to access the printer.

  • Protocol – The over-the-wire protocol that is used to communicate with the printer. For more information, see Selecting the Printing Protocol.

  • Timeout, or retry interval timeout – Is a seed number that represents the number of seconds to wait between attempting connections to the printer.

Sun Support for Network Printers

If the network printer vendor does not provide software support, Sun supplied software is available. The software provides generic support for network printers and is not capable of providing full access to all possible printer attributes.

A general discussion of how to add a network printer is provided in Setting Up Network Printers. The following is a discussion of printer management when you use the Sun supplied software.

Invoking Network Printer Support

The software support for network printers is called through the network interface script netstandard. Configuring a network printer with this script causes the network printer support module to be called. Here is the command to configure the printer with the network support.

lpadmin -p printer-name -m netstandard 

Selecting the Printer Node Name

You select the printer node name. This name must be unique, as with any node on the network. The printer node name is associated with the IP address of the printer.

Selecting the Destination Name (Also Called the Network Printer Access Name)

The print subsystem requires access information for the printer. The subsystem uses the destination name when making the network connection to the printer. You supply this name to the print subsystem by using the lpadmin command. This name then becomes part of the printer configuration database. The printer access name is the name of the printer node, sometimes qualified by a port name. Port designation varies across printer vendors. You can find information about port designation in the printer documentation.

Here is the format of printer access name:

printer-node-name[:port-designation]

Destination names can be specified in one of three forms:

Atomic (simple)

(destination) - Is resolved by locating a printer-uri-supported key/value pair for the named destination in the printers.conf or the printers configuration database. If no printer-uri-supported key is found for an entry, it's bsdaddr value is converted to printer URI form and used.

For more information, see the printers(4) and printers.conf(4) man pages.

Printer URI

(scheme://endpoint) - Is completely resolved and specifies the protocol and communication endpoint to contact for print services. This form of destination name is useful for accessing print services outside of your system's current management domain. Since the name includes the protocol to use when contacting the print service, you can select a richer protocol than the RFC-1179 protocol.

POSIX

(server:queue[:extensions]) - Is complete and resolves to an equivalent printer URI form of lpd://server/printers/queue[#extensions] This form is being maintained for Solaris backward compatibility only. The printer URI form is the preferred replacement.

Example 4-6 Destination Name (or Network Printer Access Name) With Port Designation (Number)

A common port designation with TCP is 9100. If the printer node name is pn1, and the printer vendor defines the port as 9100, then the printer access name is pn1:9100. To configure a printer in this case, use the following command:

lpadmin -p printer_name -o dest=pn1:9100
Example 4-7 Destination Name (or Network Printer Access Name) With BSD Port Designation (Name)

When you use the BSD protocol, the port designation might not be a number, but some name defined by the printer vendor, for example: xxx_parallel_1. If the printer node name is cardboard, then the printer access name is cardboard:xxx_parallel_1. To configure a printer in this case, use the following command:

lpadmin -p printer-name -o dest=cardboard:xxx_parallel_1
Example 4-8 Destination Name (or Network Printer Access Name) With No Port Designation

If there is no port designation, and the printer node name is newspaper, the printer access name is the printer node name: newspaper. To configure a printer in this case, use the following command:

lpadmin -p printer-name -o dest=newspaper

Selecting the Printing Protocol

The print subsystem uses the BSD print protocol and raw TCP to communicate with the printer. The printer vendor documentation provides information about which protocol to use. In general, the TCP protocol is more generic across printers.


Note - The Device URI protocol was introduced in the Solaris Express 2/05 releaseSolaris 10 5/08 release. This protocol enables remote printer access. You can specify a device-uri when adding a network printer by using the lpadmin command or by using Solaris Print Manager.


To select the BSD protocol, type:

lpadmin -p printer-name -o protocol=bsd

To select the TCP protocol, type:

lpadmin -p printer-name -o protocol=tcp

If the protocol that is selected is the BSD print protocol, you can further select the order of sending the control file to the printer. Some printers expect the control file, then the data file. Other printers expect the reverse. For this information, see the printer vendor documentation. The default is to send the control file first.

To select the order, type one of the following commands:

lpadmin -p printer-name -o bsdctrl=first
lpadmin -p printer-name -o bsdctrl=last

For information about using the IPP protocol, see Administering Printers by Using the Internet Printing Protocol (Task Map).

Setting the Timeout Value

The timeout option allows the user to select the amount of time (in seconds) to wait between successive attempts to connect to the printer. Some printers have a long warm up time, and a longer timeout value is advised. The default is 10 seconds.

The timeout value does not impact the success or failure of the print process. The value is a seed value that the software uses as the initial timeout count. On repeated failures, this count is increased. A message is sent to the spooler when repeated attempts to connect to the printer fail. This message alerts the user that intervention might be required. The failure could be anything from the printer being turned off to the printer being out of paper. If these messages are produced too often, for example when the printer is warming up, increasing the timeout value will eliminate spurious messages.

You can experiment to find the optimal timeout value. Type the following command to set the timeout value:

lpadmin -p printer-name -o timeout=n

Managing Network Printer Access

Each network printer should have only one server that provides access to the printer. This restriction enables the server to manage access to the printer and keep jobs coherent.

The default device for the network printer is /dev/null. This device is sufficient when the printer has only one queue. If more queues are required, set the device to a file. This setting enables the print system to restrict access to the printer across queues. The following commands create a device file and configure it as the network printer device.

touch /path/filename
chmod 600 /path/filename
lpadmin -p printer-name -v /path/filename

The following is an example of how to create a device file called devtreedown.

# touch /var/tmp/devtreedown
# chmod 600 /var/tmp/devtreedown
# lpadmin -p treedown -v /var/tmp/devtreedown
Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire