When to Run an LPD Server

Conceptually, network printing is similar to file sharing. In network printing, the client sends a file to the server, much as a file-sharing client may send a file to a file-sharing server. The main difference is what happens to the file. In the case of file sharing, the server stores the file on its disk, presumably to be accessed at a later date by the same or some other user . In network printing, the server sends the file on to a printer, and usually deletes the spool file once this is done. These two tasks are so similar at a network level that some protocols ”most importantly, the Server Message Block (SMB)/Common Internet Filesystem (CIFS) protocols ”use a single server (Samba in the case of Linux) to handle both tasks . Native UNIX tools, though, separate these two functions into two servers: the Network Filesystem (NFS) server for file sharing, and LPD for printer sharing.

As noted earlier, Linux's standard LPD tools integrate local and network printing operations, so if your Linux system is configured to print using these standard tools, it takes very little additional effort to configure the system to either accept remote print jobs or send print jobs to a networked printer. In some sense, therefore, the question of when to run an LPD server is one of when you want to do network printing. As a general rule, network printing is useful in many small- and mid- size offices as a method of stretching available resources. Rather than buy inexpensive (say, $300) laser printers for a dozen computers (for a total cost of $3600), you can buy one much more capable $1500 laser printer. For that price difference, you could even throw in an inexpensive color inkjet or further upgrade the laser printer to one that can handle color , and still come out ahead. LPD is one of the critical components that allows you to do this.

LPD isn't the only network printing protocol, though. As noted earlier, SMB/CIFS includes printing capabilities. So do competing protocols and packages like AppleTalk (via Linux's Netatalk). On another level, then, the question becomes: When should you use LPD as opposed to some other printer-sharing tools? This question is more subtle than the earlier question. There are two major points to consider in answering it:

  • What is best supported by the client? Linux supports a wide variety of network printing protocols, so a Linux computer can function as a print server for many different types of clients. Because clients usually outnumber servers on any given network, you'll save yourself considerable effort by using whatever protocol is best supported by the clients. When your clients are UNIX or Linux systems, this means LPD. When they're DOS, Windows, or OS/2 systems, this means SMB/CIFS. When they're Macintoshes, AppleTalk is a good bet, although MacOS X also works well with LPD.

  • Do the competing protocols provide differing levels of support for features you need? Network printing is simpler in many ways than is file sharing ”for instance, filename and permission issues are less troublesome in network printing than in file sharing. Nonetheless, each protocol supports its own set of options, such as authentication procedures. You might want to use a protocol that's not the default for your clients in order to obtain one of these features.

This second point deserves some elaboration. LPD, like NFS, uses a trusted hosts security model, in which the server relies on the client to control access to the shared resource. The server restricts access based primarily on the IP address of the client. This method is convenient when working with multi-user client OSs, but it's not as secure as a method that requires usernames and passwords to access the server. SMB/CIFS, in particular, works in this way, so you might want to favor it if you prefer to require a password for printer access. (If your clients are Linux or UNIX computers, though, you'll end up storing printer passwords in some globally readable configuration file unless you write new printing scripts from scratch. The result may not be an improvement over trusted hosts security.) The newer Internet Printing Protocol (IPP) favored by CUPS also supports the use of usernames and passwords, but this feature is optional in CUPS.

If your clients are Windows computers, chances are you'll want to use SMB/CIFS for printer sharing, although there are LPD clients available for these systems. You might consider foregoing SMB/CIFS, and the complications of Samba configuration, if you have just a few Windows clients on a network dominated by UNIX, Linux, MacOS, or some other system that doesn't normally use SMB/CIFS.

A related question is when to use Linux as a print server. You can run most Linux print servers on other UNIX-like OSs, so when you have a choice of Linux versus another UNIX-like OS for using BSD protocols, the issue is one of convenience. Linux makes an excellent unifying platform if you need to share printers with Linux, UNIX, Windows, MacOS, and other OSs because you can run so many different printer-sharing protocols simultaneously .

Another option in many situations is to use a dedicated printer-sharing box. These devices are dedicated network appliances with an Ethernet interface, server protocols built into firmware, and parallel, RS-232 serial, or USB ports for connecting one or more printers. They can be very good choices if you don't want to configure printer sharing on a regular computer ”say because the computer won't be powered up at all times or because you're concerned about the security aspects of running a server on whatever computer might be convenient. Some high-end printers come with network connectors that function much like dedicated print servers.



You can convert an old computer into a dedicated print server by using Linux. Install Linux, strip it of unnecessary tools and servers, and even an old 386 makes an adequate print server. With a fast enough CPU, the print server can use Ghostscript to process PostScript files, turning the combination of the dedicated computer and an inexpensive non-PostScript printer into a networked PostScript printer. Particularly if you add extra parallel ports or use USB devices, a single Linux computer can serve several printers. Of course, a more powerful computer can function as a print server and perform other server or nonserver tasks.

Advanced Linux Networking
Advanced Linux Networking
ISBN: 0201774232
EAN: 2147483647
Year: 2002
Pages: 203

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net