Printing with CUPS, Part 2

Each variant of Unix has its own printing system with its own unique behaviors and shortcomings. CUPS, the Common Unix Printing System, is a free single-solution tool for Unix and Linux that standardizes printing in these environments. In this second article of a two-part series, Carla Schroder explores using CUPS with networked printers, including network-direct, and Windows servers and clients.

By  Carla Schroder | Jul 16, 2003
Page 1 of 2
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Each variant of Unix has its own printing system with its own unique behaviors and shortcomings. CUPS, the Common Unix Printing System, is a free single-solution tool for Unix and Linux that standardizes printing in these environments. In this second article of my two-part series focusing on CUPS, we'll explore using CUPS with networked printers, including network-direct, and Windows servers and clients.

CUPS Printer Server

The online CUPS Software Administrator's manual, excellent as it is, is not completely up-to-date on connecting client machines. My manual claims that CUPS automatically broadcasts itself on its own subnet, and becomes automagically available to clients. While older editions of CUPS did indeed do this, the latest editions do not accept connections from client machines by default; rather, this option must first be enabled. (I am using CUPS 1.1.15; if the manuals have been corrected in more recent versions, hurrah!)

First, the print server needs a static IP, and then some edits must be made to cupsd.conf. In cupsd.conf, find:

<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Location>

Add the local network information using values appropriate for your network:

Allow from 192.168.1

Then find the BrowseAddress section and specify the broadcast address:

BrowseAddress 192.168.1.255

Restart CUPS. The default browse interval is 30 seconds, so within short order, Linux client machines will display all installed printers in their CUPS web interfaces (or you can get the information using the lpstat -t command). The browse interval is configurable.

Classes

Printers are organized into classes; by default, they are all lumped into a single class. Print jobs sent to a class will go to the first available printer. Classes can even contain their own classes, which are useful for organizing distributed high-volume printing. CUPS creates implicit classes when more than one server points to a particular printer, which ensures that the print jobs still get through if one server goes down.

Quotas

CUPS supports printer-based quotas. They cannot be configured per user, though; for example, a daily quota of 10 pages on the expensive color plotter will apply to all users. However, each user will be logged individually. Quotas can be either numbers of pages or kilobytes.

# lpadmin -p expensive_plotter -o job-quota-period=604800 -o job-page-limit=10
# lpadmin -p expensive_plotter -o job-quota-period=604800 -o job-k-limit=1048576

Logging

Logs are kept in /var/log/cups. They are automatically rotated. Everything is logged — individual print jobs with time, date, and user; errors; and each page, with the printer it was sent to.

Network-Direct Printers

Printers that connect directly to a hub or switch, such as HP Jet Direct printers, are added by selecting AppSocket/HP JetDirect in the CUPS 'Add Printer' menu. These normally connect on port 9100, so the deviceURI looks like socket://[hostname or IP]:9100.

Page 2: Windows Clients

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter
Helpful Links
  • Yankee Group Mobile WAN Optimization Report

    Mobile work continues to evolve. Your organization must keep up with the demands of its mobile workforce. This report introduces the concept of mobile WAN optimization and provides three case studies including RCM, PRTM and Einstein that highlight how this emerging technology can help IT departments achieve what previously appeared to be conflicting goals. Read >

  • Network Security Resources

    More threats than ever before pose a danger to today's enterprise network. Get the latest tips and intel on the newest risks in our guide to network security resources. Read >

  • Extreme Savings: Cutting Costs with WAN Optimization

    Did you know it's possible to cut IT costs without impacting day-to-day IT operations? In fact, when you download this whitepaper from Riverbed on cost-savings through WAN optimization, you'll discover how businesses of all different sizes have realized a return on investment in just a few months through significant hard cost savings in areas such as bandwidth reduction and IT consolidation. It's called Extreme Savings and its only from Riverbed. Read >