Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

PRINT SERVER LABORATORY

PhD. Alcides Montoya Canola, Est. Carlos Andres Ballesteros


Universidad Nacional de Colombia - sede Medellin

Abstract
This guide will develop the procedure that will allow you to practice
the knowledge acquired in the theoretical class of server management.
The topic to be developed is print server.

1 Introduction
In a computer system is very common the need to print documents because it
is one of the main applications of computers. A print server is a software that
allows the PCs of a local network to make use of the printers on the network in
an efficient way as it centralizes the printing tasks facilitating a management of
the same.[1].

Figure 1: Printing service system.

1.1 Printer Operation


Printers can be distinguished by interface, such as USB or network, and printer
language. Make sure the printer has a compatible interface (USB, Ethernet, or
Wi-Fi) and a suitable printer language. Printers can be classified according to
the following three kinds of printer languages:

• PostScript Printers: PostScript is the printer language in which most


print jobs in Linux and Unix are generated and processed by the internal
print system. If PostScript documents can be processed directly by the
printer and do not need to be converted in additional stages in the print
system, the number of potential error sources is reduced.
• Standard Printers (Languages Like PCL and ESC/P): In the case
of known printer languages, the print system can convert PostScript jobs

1
to the respective printer language with Ghostscript. This processing stage
is called interpreting. The best-known languages are PCL (which is mostly
used by HP printers and their clones) and ESC/P (which is used by Epson
printers). These printer languages are usually supported by Linux and
produce an adequate print result.
• Proprietary Printers (Also Called GDI Printers): These printers
do not support any of the common printer languages. They use their own
undocumented printer languages, which are subject to change when a new
edition of a model is released. [2]

2 Printing Protocols
• Line Printer Daemon: The Line Printer Daemon protocol/Line Printer
Remote protocol (or LPD, LPR) is a network protocol for submitting
print jobs to a remote printer. The original implementation of LPD was
in the Berkeley printing system in the BSD UNIX operating system; the
LPRng project also supports that protocol. The Common Unix Printing
System (or CUPS), which is more common on modern Linux distributions
and also found on Mac OS X, supports LPD .. Commercial solutions are
available that also use Berkeley printing protocol components, where more
robust functionality and performance is necessary than is available from
LPR/LPD (or CUPS) alone (such as might be required in large corporate
environments). The LPD Protocol Specification is documented in RFC
1179.

• Server Message Blockl: is a network protocol that allows files, printers,


etc. to be shared among a network of computers that use the Microsoft
Windows operating system. This protocol belongs to the application layer
in the OSI model.It is mainly used in computers with operating systems:
Microsoft Windows and DOS.SMB was originally developed at IBM

• Internet Printing Protocoll: IPP defines a protocol for printing and


managing jobs to print, this protocol, like data in IP, can be used locally or
on the Internet to maintain a communication with local or remote printers,
so users can print directly in a URL through an intranet or Internet.
IPP is implemented using the Hypertext Transfer Protocol (HTTP) and
inherits all of the HTTP streaming and security features. For example, au-
thorization can take place via HTTP’s Digest access authentication mech-
anism, GSSAPI, or any other HTTP authentication method.Encryption is
provided using the TLS protocol-layer, either in the traditional always-on
mode used by HTTPS or using the HTTP Upgrade extension to HTTP
(RFC 2817). Public key certificates can be used for authentication with
TLS. Streaming is supported using HTTP chunking.
IPP uses the traditional client-server model, with clients sending IPP re-
quest messages with the MIME media type ”application/ipp” in HTTP
POST requests to an IPP printer. IPP request messages consist of key/value
pairs using a custom binary encoding followed by an ”end of attributes”
tag and any document data required for the request. The IPP response

2
is sent back to the client in the HTTP POST response, again using the
”application/ipp” MIME media type. [5]

3 About CUPS
CUPS (Common UNIX Printing System) is a printing system for GNU / Linux
and other operating systems based on the POSIX standard, distributed under
the terms of the GNU / GPLv2 license.
It was originally developed in 1997 by Michael Sweet, owner of Easy Software
Products, using at that time the LPD (Line Printer Daemon protocol), which
had many technical limitations and incompatibilities between the various printer
brands, which is why it was changed by IPP (Internet Printing Protocol). In
2002 CUPS was included for the first time in Mac OS X, becoming the de facto
printing system used to date in that operating system. In February 2007, Apple
Inc. hired Michael Sweet as an employee, also purchasing the CUPS source
code.
CUPS consists of a print queue with a scheduler, a filter system to convert
data to formats that printers can use, and a system that allows this data to be
sent to the printer. It also allows using any computer as a print server, through
the IPP protocol, using port 631 / TCP.
The controllers for CUPS use the format PPD (PostScript Printer Descrip-
tion), developed by Adobe Systems and consist of files with extension * .ppd
(or * .ppd.gz when they are compressed with the GZIP algorithm), generally
created and maintained by printer manufacturers, which contain the PostScript
code necessary to use the particular characteristics of a particular printer model.
CUPS uses this format for all printers, including non-PostScript printers, using
filters that redirect outputs when the case requires it.

Figure 2: How CUPS work.[3]

3
4 Development of Practice
The development of the practice will take place in the distribution of Open Suse
Leap 15, it is clear that this practice can be extended to other distributions
taking into account their respective changes.

4.1 Necessary logical equipment.


The standard installation of openSUSE includes CUPS and everything you need
to configure most of the available compatible printers. If necessary, install the
necessary packages to configure the printer.

4.2 Start service and add the service to the system boot.
CUPS is a service that only needs to be installed and started in order to be
used. By default it is enabled in all execution levels.

Execute the following to start the service for the first time:

Execute the following to restart the service:

Execute the following to stop the service:

4.3 Necessary modifications in the firewall.


For print servers, it is necessary to open port 631 on firewall firewall by TCP
and UDP (IPP)

4.4 Files and configuration directories.


• /etc/cups/cupsd.conf: it is used to configure the policies and access
control of the service.
• /etc/cups/printers.conf: it is used to save the configuration of the
print queues.

• /etc/cups/lpoptions: It is used to save the specific configuration op-


tions for each print queue.
• /etc/cups/ppd/: corresponds to the directory where the * .ppd files
corresponding to each print queue are saved.

4
• /var/spool/cups/: corresponds to the directory used for the print pro-
cessing queue. Here you can find all the print jobs.

• /var/log/cups/access log: is used to store the service activity log.


• /var/log/cups/error log: it is used to store the service error log. When
there are problems with the configuration or operation of the service, this
is the indicated file to find the information necessary to make diagnoses..
• /var/log/cups/page log: it is used to store the log of print jobs.

4.5 Allow connections from remote hosts.


By default, cups only allow connections from the local host. Some modifications
must be made in the configuration to share the printers with the rest of the sys-
tems in the local area network. The recommended tool is the YaST Printer
module, available in graphic mode and terminal mode. Enable the following
from the menu. Equipment → System → Y ast → P rinter → Shareprinters.

To do it manually in terminal mode you must modify the cupsd.confde file


as follows:

While the file is being modified, stop the service.

Edit the file /etc/cups/cupsd.conf:

Locate Listen localhost: 631:

Disable the option at the start of the line and add below Port 631:

Locate the following:

5
Add the BrowseRemoteProtocols option with the CUPS value and the
BrowseDirection option with the @LOCAL value to enable the printer shar-
ing function and access to the remote printers:

Locate the following:

to allow access to all devices add Allow all just below Order allow, deny,
and if you want to restrict the access only for some devices then add Allow and
the number of the ip example:

Allow 192.182.3.200
Allow 192.182.3.201
...

4.6 Manage Printer.


In most distributions, modern technologies and as long as it is a compatible de-
vice, that is supported, that has a driver, that is available. It is only necessary
to turn the printer off and on again or disconnect and reconnect so that it is
detected and can be configured automatically.

6
In case it is necessary, CUPS has an administration interface, it is based on
HTTP -descerely after starting the service- through http://localhost:631/admin.
This interface includes a configuration wizard to find and add new printers or
manage existing ones.

4.6.1 Some Useful Commands.


lpadmin: Configure cups printers and classes
lp: submits files for printing, or alters a pending print job.
lpoptions: Display or set printer options and defaults
lprm: Cancels print jobs
lpstat: Lists status of the LP print services [6]

5 Exercise
Install and configure a printer to offer the printing service from any device
connected to the local network. check the correct functioning of the printer and
its server.

References
[1] Print Server linux networks, ite.educacion.es 2018
[2] Printer Operation/Start-Up/openSUSE Leap 15.0”, doc.opensuse.org 2018
[3] LinuxFoundationX+LFS101x+1T2017, Courses.edx.org 2018
[4] Print Server linux networks, ite.educacion.es 2018 Niels Bohr Institute &
Nano-Science Center, Københavns Universitet
[5] M. Lanos, Protocolos de Impresion 2018
[6] J. Barrios Dueñas, Instalación y configuración de CUPS. - Alcance Libre
2018

You might also like