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

Using Printing Protocols in the Solaris Release

The overall printing architecture in the Solaris OS uses network printing protocols to communicate with print services in following ways:

  • Client-to-server communications

  • Server-to-printer communications

The Solaris Express software provides applications, toolkits, printing commands, and an application programming interface that interacts with print services. This API is called the PAPI. The PAPI consists of a front-end API implementation that dynamically loads back-end print service or protocol modules that communicate directly with print services. These print services contain the print job or print queue that is being acted upon. Client-to-server communications include the RFC-1179 and IPP protocols, as well as support for communicating with a local LP print service. For server-to-printer communications, the network printing protocol support enables the print service to transmit print jobs directly to network‐attached printers.

Server-to-printer communications include support for the following network protocols:

  • Raw Transmission Control Protocol (TCP) socket

  • RFC-1179

  • IPP

  • SMB

Selecting the Client-To-Server Network Printing Protocol

Applications, toolkits, and printing commands select the protocol to use for client-to-server communications, based on the value of the printer-uri-supported attribute that is found in the printers.conf database entry for the specified print queue. This value is automatically generated and populated when access to a remote print queue is configured by using the lpadmin command or when an application uses the interface that is being referenced to perform an action or actions.

For example, when printing a document while using Mozilla, the path that is followed to gain access to the printer is:

Mozilla → lp → PAPI

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

The lpadmin command generates printer-uri-supported values using the following format:

{ipp|lpd}://server/printers/queue

To determine which URI to use in the printers.conf database, the lpadmin command probes the remote print service. If the remote print service supports IPP, this protocol is preferred over the BSD protocol. However, you can override automatic protocol selection by specifying the -soption with the lpadmin command, then supplying a different URI. For more information, see the Printer URI Formats.

The print subsystem uses the BSD print protocol, also referred to as the RFC‐1179 protocol, and raw Transmission Control Protocol (TCP), the basic communication language or protocol of the Internet, to communicate with the printer. If you are setting up a printer that includes printer vendor documentation, information about which protocol to use is provided. The TCP protocol is the protocol that is most often used for printing on the network.

Printer URI Formats

The following are supported printer URI formats:

Table 1-1 Supported URI Formats for Print Commands

lpsched

lpsched://localhost/printers/queue

This printer URI scheme can only be used to contact a local LP service to access the print queue that is specified in the URI.

lpd

lpd://localhost/printers/queue[#extensions]

Use this printer URI scheme to contact local or remote print services to address the specified print queue on the host that is specified in the URI. The optional #extensions can be specified as #solaris to indicate that the server host will process Solaris extensions to the RFC-1179 protocol during print job submission.

ipp

ipp://server[:port]/printers/queue

https://server:631/printers/queue

ipp://server[:port]/...

Use this printer URI scheme to contact local or remote print services to address a particular print queue on the host that is specified in the URI. The IPP URI scheme is described in the IPP specifications. This printer URI scheme utilizes more of a free form than the LPD printer URI scheme. All of the Solaris and CUPS-based print queues are accessed by using these schemes, or formats. Access to print queues on other IPP-based print servers requires the use of the server supported IPP URI scheme. Typically, the scheme that is used is one those that are listed in this table.

Selecting the Server-To-Printer Network Printing Protocol

Network‐attached printers often support more than one method of communicating with a print service. The most common method of communicating with the print service is through a raw TCP connection to a well-known port on the device. Other methods of communication include the RFC-1179 and IPP network protocols. You can select the server-to-printer communication protocol when adding a new print queue in one of following ways:

  • By using the lpadmin command with the following options, and as shown here:

    # lpadmin -o protocol={bsd|tcp} -o dest=printer:queue-or-port -m netstandard{_foomatic}

    This method for communicating with the print service was introduced in the Solaris 2.6 OS and is available in all subsequent Solaris releases.

  • The second method is to use the lpadmin command with the -d option, supplying a device-uri, and the -m option, specifying a uri.

    This method for communicating with the print service was introduced more recently and is intended to replace the previous method. For more information, see What is a Device URI?.

When determining which protocol to use for server-to-printer communication, consult the vendor printer documentation for more specific information. Documentation includes information such as TCP port numbers, RFC-1179 printer names, and the IPP printer URIs that are supported by the device. In most instances, a raw TCP socket communication is likely to provide the most reliable results.

Also, note that due to differences between printing services on UNIX and Windows platforms, Windows hosted printers should be configured as network‐attached printers and administered as such. These types of printers require the creation of a print queue if you are using them on a Solaris system. These printers might also use the SMB protocol for server-to-printer communication. For more information about the SMB protocol, see Using the SMB Protocol.

For more information about setting up printers and configuring print queues, see Setting Up Printers on a Print Server (Task Map).

What is a Device URI?

A Uniform Resource Identifier (URI) is an addressing technology for identifying resources on the Internet or a private intranet. The terms URI and URL are used synonymously. URIs can be used with application-level protocols, called URI schemes. The Solaris printer software includes support for configuring network‐attached printers. When creating print queues for network‐attached printers by using LP print commands or by using Solaris Print Manager, you can specify the device as a device-uri.

To specify the device as a device-uri from the command line, use the lpadmin command with the -v and -m options:

# lpadmin -p printer -v device-uri -m uri

Note that the -v option is still a valid option for specifying devices other than those that utilize the device-uri. addressing technology.

For example, to add the printer, Lucille, by using the device-uri, smb://server/queue, and the interface script that is included in the Solaris printer software, type:

# lpadmin -p lucille -v smb://server/print-queue -m uri -n /usr/lib/lp/model/ppd /system/foomatic/Epson/Epson-Stylus_Color_777-Stc777p.upp.ppd.gz

Note - You must use the -m option in the command-line syntax to specify an interface script, or the back-end process ignores the print request. The script can be the interface script that is included in the Solaris printing software or another interface script that is device-uri protocol aware.


The following device-uri schemes are supported:

  • ipp://host/printers/name

  • lpd://host/printers/name

  • socket://host:port

  • smb://server/printer

  • smb://workgroup/server/printer

  • smb://username:password@server/printer

  • smb://username:password@workgroup/server/printer

To specify a device that uses a device-uri when using Solaris Print Manager to add a network‐attached printer, select the URI option in the Protocol drop-down menu of the New Network Printer window. Type a supported printer URI in the destination field.

Other modifications that support setup of remote print queues by specifying the device as a device-uri include the following:

  • The Solaris print spooler can pass device information in the form of a device-uri to the back-end interface script as the environment variable, DEVICE_URI. Because the information is passed to the back-end as an environment variable, the existing interface scripts cannot take advantage of this information. However, these scripts are not adversely impacted.

  • The /etc/lp/model/uri file now communicates with the printer through the use of helper applications and the device-uri. The interface script also has the ability to process PPD files and uses a Foomatic script to convert print data to a printer-ready format.

What Is the Internet Printing Protocol?

IPP is a fairly recent industry standard network printing protocol that is used for client-to-server and server-to-printer communications. This protocol provides a basic model that includes printers and jobs, standard attributes for these printers and jobs, and a set of standard operations that can be performed against these printers and jobs. Because the objects, attributes, and operations are standardized, IPP is a method for communicating between client and server systems. In the Solaris OS, server-side support for this protocol is provided by an IPP listening service. IPP client-side support in the Solaris OS is implemented through the PAPI. IPP printer support is available through the URI interface script.

More information about OpenSolaris printing can be found at https://opensolaris.org/os/community/printing/.

For step-by-step procedures and additional background information in this document, see Setting Up the Internet Printing Protocol and Appendix A, Using the Internet Printing Protocol.

Overview of the RFC-1179 Printing Protocol

The RFC-1179 protocol is an existing over-the-wire protocol that is widely used for communicating between print clients and servers and network‐attached printers. The Request for Comments (RFC) 1179 describes the protocol that a line printer daemon client uses to control printing. Developed originally for BSD UNIX, the RFC-1179 printing protocol has long been the cross-platform standard for printing. You can use this protocol to perform basic printing tasks, such as submitting and canceling print jobs, and obtaining print job status. The RFC-1179 protocol is able to communicate with LPD-based print servers and any other print server that accepts the BSD printing protocol. Many network‐attached printers offer this protocol as an option for transferring job data.

RFC-1179 Protocol Compared to the Internet Printing Protocol

The RFC-1179 protocol has served for decades as the standard network printing protocol. The protocol was originally designed to perform a very limited set of operations. The RFC-1179 protocol lacks a common representation for status information. In addition, this protocol offers only basic print job options. Conversely, the design of IPP includes features that are lacking in the RFC-1179 and BSD protocols. With IPP, a broad set of operations can be performed. These operations make use of a core set of common attributes by using a common representation and encoding method. Also, IPP enables encryption and authentication to be used between a print client and a print server. Finally, IPP provides a means for extending operations and attributes, while maintaining backward compatibility and interoperability. One of the results of the evolution of the RFC-1179 protocol is that it has several conflicting vendor extensions to overcome, making IPP the preferred choice of printing protocols.

For more information about using IPP to set up and administer printers, see Setting Up the Internet Printing Protocol and Appendix A, Using the Internet Printing Protocol.

Using the SMB Protocol

The SMB protocol is an application-level network protocol that is primarily used for sharing printers, access to files, serial ports, and miscellaneous communications between nodes on the network. Mainly used by Windows systems, SMB is an authenticated inter-process communication mechanism. In the Solaris OS, the SMB protocol is used primarily for sharing printers. All of these processes take place over the network. SMB can run over multiple protocols.

SMB works through a peer-to-peer approach. A client makes a specific requests to a server, and the server responds accordingly. SMB servers make their file systems and other resources available to clients on the network. In the Solaris OS, SMB includes Samba server-side support that is managed by the Service Management Facility (SMF) and Samba smbclient client-side support. To access a Windows hosted printer, setup of a local print queue is required. This requirement is due to differences in UNIX and Windows printing models.

About Samba

Samba is an open-source SMB server freeware application that uses the SMB protocol. Samba provides Windows clients access to UNIX servers and UNIX clients access to Windows servers. The access that is provided is for both files and other services, including printer sharing. Samba's design, as well as constraint, is to operate on top of a variety of existing UNIX systems. Samba runs as a set of daemons and services, without any need for modification of existing kernels. More information about Samba can be found at https://www.samba.org.

Previous Next

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