Printing Overview


If you're trying to solve a printing problem, and have read this document before, you may wish to skip down to the Basic Troubleshooting section.

Overview

Printing, in its basic form, is a very simple operation. The computer sends a print job (just a technical term for what you are sending to the printer) to the printer which processes the job and prints it. In its simplest form the printer is attached directly to the computer which allows one printer per computer. On the next level of complexity there is one printer on a Local Area Network (LAN) and all the computers can submit jobs to it. This is referred to as "remote" printing which is not as efficient as having one printer per computer, but it is much more economical. Some computer platforms, suck as the Macintosh (MAC) handle remote printing very well. This is because they use their own proprietary protocol (think of a proprietary protocol as a private language) to communicate with the printer. Unfortunately, this becomes a serious problem when you have different computer platforms each trying to talk to the printer in with their own proprietary protocol. This situation is known as an heterogeneous environment and providing printing services within one is not a trivial task. The Technical staff of CK:P has been asked to implement an heterogeneous printing environment. In order to understand the problems and solutions the three major platforms and components are discussed below.

MAC Printing

The MAC environment is the simplest. Print jobs can be submitted to a local printer connected directly to the MAC or it can print remotely by using AppleTalk. The printer must be PostScript and capable of communicating using the AppleTalk protocol.

Unix Printing

The second component is printing via a Unix platform. Unix uses the daemon lpd (a daemon is any process that run continuously in the background) to submit any print jobs to the appropriate printer. Lpd reads the file /etc/printcap to determine where to send the print job based on the printer name. The printer may be attached directly to the Unix box via a serial or parallel port or it may be a remote printer on the LAN. In the event of a remote printer the printer must be attached to a print server. The print server acts as a interface to the LAN, and in the case of Unix and it must use the TCP/IP protocol. Some possible print servers are another Unix box, PCs, or JetDirect Cards.

PC Printing

PC printing is the most complex component of the three. While PCs can easily print to a local printer via the serial or parallel port it is usually much more complex to print to a remote printer. However, there are a number of solutions and advances in networking technology is making it easier. Two ways of using a PC to print remotely are:


CK:P Printing Model

In order to make sure that all computers on any one network can access a printer several minimum requirements need to be met:

Macs
If there are any Macs on the LAN the printer or print server must be able to communicate via the AppleTalk protocol. Also, it is necessary that the printer be able to use the PostScript language (either natively or through emulation).
Unix Server
In order for lpd to be able to submit print jobs according to the model that CK:P has implemented, one of the two following conditions must be true:
  1. If the printer is only capable of communicating via AppleTalk then CAP must be installed on the server. This will ensure that lpd can print the jobs remotely using CAP.
  2. Else, the printer (or print server) must be able to communicate via the TCP/IP protocol. In this manner, the Unix host simply uses the printer as a "remote" printer.
PCs
The PC can submit remote print jobs using three basic methods:
  1. Using SAMBA (or other client/server software) to submit a print job to one of the printers the Unix server is connected to.
  2. Submitting the print job directly to the print server using a proprietary protocol. This will require the appropriate software from print server vendor (e.g. HP Print Monitor).
  3. Submitting the print job directly to a print server that can communicate via TCP/IP (WinLpr.)
Print Servers
Print Servers are not actually platforms that you print from but an interface for the printer to communicate to a LAN. However, it is important to have a basic understanding of the use and types of print servers. In the CK:P environment, there are roughly four types of print server:
  1. A dedicated system (running any operating system...even DOS) on the LAN that accepts print jobs from remote computer and sends them to a printer connected to the parallel or serial port.
  2. A computer that has many other duties but also has a printer connected to it. For example, a computer might be used as a mail server, a web server and a print server.
  3. A piece of hardware that attaches directly to the printer and to the LAN (e.g. Jet Direct Card). This type of print server may not be able to maintain its configuration by itself. The likely cause of this would be an inability to properly maintain its network address. If this is the case then another computer on the LAN would maintain the connection using Bootp.
  4. Some printers (e.g. DEC LP-40) have the necessary hardware built into them to acts as a print server and printer.

The most important concept is that unless the network is solely Macs, some form of a print server is necessary.

When building new networks or adding a printer to an existing one CK:P uses at least one of the defined requirements for each method of printing. This is, of course, dependent upon the availability of those platforms. Using Schenley as an example, the types of computers that CK:P supports at the site are PCs and Unix Servers.

Referring to the above list of printing methods we find there are methods for printing under both Unix and PCs using TCP/IP. Being that there are no Macs on the network, a printer that can communicate using TCP/IP would be the preferred choice. The HP4P w/Ethernet interface (JetDirect Card) would do the job admirably. By using a HP4P with JetDirect Card the Unix server would communicate to the print server using lpd. The PCs print by sending the job to the Unix server using SAMBA, which in turn, would then submit the jobs to the print server.


Basic Trouble Shooting

This is a basic check list that can be used as a guide for a user administrator when encountering printing problems. Please remember, that knowledge of printing is highly recommended. If you haven't read the introductory material explaining printing, the following checklist will not work for you. Like teachers, the computers know when you haven't done your homework, and will refuse to cooperate if you haven't!

  1. Is there paper in the printer? Fill it.
  2. Is the printer powered up? Turn it on, check the power cord.
  3. Is the Ethernet cord plugged into the printer? Plug it in.
  4. Is the corresponding Ethernet cord on the patch panel plugged into the concentrator? Get an Ethernet cord and connect the correct patch panel port to the concentrator.
  5. Can the server print to the printer? Find out by logging into the unix server and typing lpr /etc/printcap. If it can't then the problem is probably not with the user devices, but with the printer or server. Go on to the queue management section.
  6. Can you print to the printer from one PC but not another? If not, go on to the next step. If so, this suggests that the PC from which you can't print is misconfigured. Check all cables in the back of the afflicted PC to be sure they are firmly in. There are many possibly software misconfigurations which could affect printing; so many that we can't possibly discuss them all her; so many that we can't possibly discuss them all here; you'll need to run restore.

If you have a Print Server:

  1. Is the print server power up? Turn it on, check the power cord.
  2. Is the printer plugged into the print server? Connect it with the appropriate cord.
  3. Can you connect to the print server (e.g. ping printer.pps.pgh.pa.us)? If you can't, then the problem is either a network connection, or the print server is confused who it is (a bootp problem?)
  4. If you have a JetDirect card, press the small button marked "test". The printer should spit out a couple of pieces of paper. On the second page should be a row marked "IP Address". If the numbers next to this are "0.0.0.0", there is a bootp problem -- contact the System Administrator for assistance. If no paper comes out, it is almost certainly a mechanical problem with the printer or a cabling problem -- recheck the connection from the printer to the print server.

If you have an Apple printer:

  1. Make sure cap is running on your server. To do this, log in, and type ps auxw | grep cap .
  2. If only one line (reading grep cap ) comes back, then cap is not running. Contact your system administrator.

Queue Management

  1. There are several unix tools that can help you manage a print queue from the unix server. To read up on these in detail, type "man" and one of the following words: lpq, lpc, lprm, lpd, lpr.
  2. lpr is the simplest printing tool; it simply tries to print a text file to the default printer. One of the things you can try when you're having printing troubles is to type lpr /etc/printcap and see if anything prints out (/etc/printcap is just a small text file that should be on any unix server. You can substitute another file if you like, but /etc/printcap is a good choice because in most cases it will only be one or two pages.) If it does print out, then you know that your printer and print server, if any, are working, and the problem likely lies elsewhere. If it doesn't print out, that's a strong suggestion that something is wrong with the print queue.
  3. lpq will show you what items are queued to be printed, their job number, and how large they are. If there are many small items waiting to be printed, and the job at the "top" of the queue is small also, there is likely a problem. If the job at the top of the queue is huge, it's possible that the printer is just processing it, and taking a long time because it's so large; generally there will be some lights blinking on the printer to indicate that this is what's going on.
  4. lprm removes jobs that are queued on the printer. A user can only remove her or his own jobs; the system administrator will be able to remove anyone's jobs by using privileges. The argument you give lprm is the job number reported by lpq. So if lpq told you that the file you wanted to remove was job 312, you would type: lprm 312 to delete it from the queue.
  5. lpc is a tool used by a privileged user to view, manipulate, and manage the print queues. When you start lpc, you will be given a prompt. If you type ? at the prompt, you'll get a brief summary of all the commands. The key commands you'll probably use are restart, to restart a given printer daemon, and clean to remove junk files from the queue. Basically, you can try restart printername (where printername is the name of your printer) when you have checked all physical connections to the printer, have checked to ensure that there are no -huge- files waiting to be printed, and printing a small test file fails. If you want to use lpc, you should certainly read the man page by typing man lpc at the unix prompt. Don't worry if you don't understand all the options -- just try to get the gist of them.

Printing Administration

  • See chapter 25 of "Unix System Administration Handbook", Prentice Hall.
  • See chapter 11 of "Essential System Administration", O'Reilly & Assoc.
  • Man lpd, lpr.
  • Man printcap.

    Print Server Administration

  •  

    Return to Hardware Information

     

    Revision 1.2:July 15, 1996:CJR