]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/network.html
Merge changes from CUPS 1.6svn-r10437.
[thirdparty/cups.git] / doc / help / network.html
1 <HTML>
2 <!-- SECTION: Getting Started -->
3 <HEAD>
4 <TITLE>Using Network Printers</TITLE>
5 <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
6 </HEAD>
7 <BODY>
8
9 <H1 CLASS="title">Using Network Printers</H1>
10
11 <P>This help document describes how to discover, configure, and use TCP/IP network printers with CUPS.</P>
12
13 <H2 CLASS="title"><A NAME="ADDRESS">Getting the IP Address</A></H2>
14
15 <P>Every network printer or print server has a unique Internet Protocol (IP) address associated with it. This address is either configured manually or set using an automatic network protocol such as the <A HREF="#BOOTP">Boot Protocol (BOOTP)</A>, <A HREF="#DHCP">Dynamic Host Control Protocol (DHCP)</A>, Reverse Address Resolution Protocol (RARP), or ZeroConf.</P>
16
17 <P>You can normally find the IP address of a printer on the printer's control panel or by printing the configuration or status page. The <A HREF="#SNMP">Simple Network Management Protocol (SNMP)</A> can also be used to get the IP address remotely, which happens automatically when you visit the CUPS administration web page or choose an available CUPS device when adding a printer.</P>
18
19
20 <H2 CLASS="title"><A NAME="CONFIG">Configuring the IP Address</A></H2>
21
22 <P>When you first install a network printer or print server on your LAN, you need to set the Internet Protocol ("IP") address. Most higher-end "workgroup" printers allow you to set the address through the printer control panel. However, if you have many printers you will want to assign the addresses remotely - this makes administration a bit easier and avoids assigning duplicate addresses accidentally.</P>
23
24 <P>To setup your printer or print server for remote address assignment, you'll need the Ethernet Media Access Control ("MAC") address, also sometimes called a node address, and the IP address you want to use for the device. The Ethernet MAC address can often be found on the printer test page or bottom of the print server.</P>
25
26 <H3><A NAME="DHCP">Configuring the IP Address Using DHCP</A></H3>
27
28 <P>The DHCP protocol is the usual way of setting the IP address of a printer on a managed network. Using the standard <TT>dhcpd(8)</TT> program supplied with UNIX you simply need to add a line to the <VAR>/etc/dhcpd.conf</VAR> file:</P>
29
30 <PRE CLASS="command">
31 host <I>hostname</I> {
32 hardware ethernet <I>mac-address</I>;
33 fixed-address <I>ip-address</I>;
34 }
35 </PRE>
36
37 <P>Make sure that the hostname you use is also listed in the <VAR>/etc/hosts</VAR> file or is registered with your DNS server.</P>
38
39 <H3><A NAME="BOOTP">Configuring the IP Address Using BOOTP</A></H3>
40
41 <P>The BOOTP protocol is used when you need to provide additional information such as the location of a configuration file to the network interface. Using the standard <TT>bootpd(8)</TT> program supplied with UNIX you simply need to add a line to the <VAR>/etc/bootptab</VAR> file; for IRIX:</P>
42
43 <PRE CLASS="command">
44 myprinter 08:00:69:00:12:34 192.0.2.2 <VAR>myprinter.boot</VAR>
45 </PRE>
46
47 <P>Newer versions of <TT>bootpd</TT> use a different format:</P>
48
49 <PRE CLASS="command">
50 myprinter:ha=080069001234:ip=192.0.2.2:<VAR>t144=myprinter.boot</VAR>
51 </PRE>
52
53 <P>The <VAR>myprinter.boot</VAR> file resides in the <VAR>/usr/local/boot</VAR> directory by default. If you do not need to provide a boot file you may leave the last part of the line blank.</P>
54
55 <BLOCKQUOTE><B>Note:</B> Some versions of UNIX do not enable the BOOTP service by default. The <VAR>/etc/inetd.conf</VAR> or <VAR>/etc/xinetd.d/bootp</VAR> file usually contains a line for the BOOTP service that can be uncommented if needed.</BLOCKQUOTE>
56
57
58 <H2 CLASS="title"><A NAME="VERIFY">Verifying the Printer Connection</A></H2>
59
60 <P>To test that the IP address has been successfully assigned and
61 that the printer is properly connected to your LAN, type:</P>
62
63 <PRE CLASS="command">
64 <KBD>ping ip-address</KBD>
65 </PRE>
66
67 <P>If the connection is working properly you will see something
68 like:</P>
69
70 <PRE CLASS="command">
71 <KBD>ping myprinter</KBD>
72 PING myprinter (192.0.2.2): 56 data bytes
73 64 bytes from 192.0.2.2: icmp_seq=0 ttl=15 time=5 ms
74 64 bytes from 192.0.2.2: icmp_seq=1 ttl=15 time=3 ms
75 64 bytes from 192.0.2.2: icmp_seq=2 ttl=15 time=3 ms
76 64 bytes from 192.0.2.2: icmp_seq=3 ttl=15 time=3 ms
77 </PRE>
78
79 <P>If not, verify that the printer or print server is connected
80 to the LAN, it is powered on, the LAN cabling is good, and the IP
81 address is set correctly. You can usually see the current IP
82 address and network status by printing a configuration or test
83 page on the device.</P>
84
85
86 <H2 CLASS="title"><A NAME="PROTOCOLS">Network Protocols Supported by CUPS</H2>
87
88 <P>CUPS supports most network printers using one of three TCP/IP-based protocols. Printer discovery is currently accomplished using the SNMP protocol, however future versions of CUPS will also include support for multicast DNS service discovery as well.</P>
89
90 <H3><A NAME="SOCKET">AppSocket Protocol</A></H3>
91
92 <P>The AppSocket protocol (sometimes also called the JetDirect protocol, owing to its origins with the HP JetDirect network interfaces) is the simplest, fastest, and generally the most reliable network protocol used for printers. AppSocket printing normally happens over port 9100 and uses the <tt>socket</tt> URI scheme:</P>
93
94 <PRE>
95 socket://<i>ip-address-or-hostname</i>
96 socket://<i>ip-address-or-hostname</i>/?waiteof=false
97 socket://<i>ip-address-or-hostname</i>:<i>port-number</i>
98 socket://<i>ip-address-or-hostname</i>:<i>port-number</i>/?waiteof=false
99 </PRE>
100
101 <P>The "waiteof" option controls whether the <tt>socket</tt> backend waits for the printer to complete the printing of the job. The default is to wait.</P>
102
103 <H3><A NAME="IPP">Internet Printing Protocol (IPP)</A></H3>
104
105 <P>IPP is the only protocol that CUPS supports natively and is supported by some network printers and print servers. However, since many printers do not implement IPP properly, only use IPP when the vendor actually documents official support for it. IPP printing normally happens over port 631 and uses the <tt>http</tt> and <tt>ipp</tt> URI schemes:</P>
106
107 <PRE>
108 http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
109 http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value</i>
110 http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value&option=value</i>
111 ipp://<i>ip-address-or-hostname</i>/<i>resource</i>
112 ipp://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value</i>
113 ipp://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value&option=value</i>
114 ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
115 ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value</i>
116 ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value&option=value</i>
117 </PRE>
118
119 <P>The <tt>ipp</tt> backend supports many options, which are summarized in <A HREF="#TABLE2">Table 2</A>.</P>
120
121 <DIV CLASS="table"><TABLE SUMMARY="IPP URI Options">
122 <CAPTION>Table 2: <A NAME="TABLE2">IPP URI Options</A></CAPTION>
123 <THEAD>
124 <TR>
125 <TH>Option</TH>
126 <TH>Description</TH>
127 </TR>
128 </THEAD>
129 <TBODY>
130 <TR>
131 <TD><TT>compression=gzip</TT></TD>
132 <TD>Specifies that print data should be compressed before sending.</TD>
133 </TR>
134 <TR>
135 <TD><TT>encryption=always</TT></TD>
136 <TD>Specifies that the connection to the IPP server should be encrypted using SSL.</TD>
137 </TR>
138 <TR>
139 <TD><TT>encryption=ifrequested</TT></TD>
140 <TD>Specifies that the connection to the IPP server should only be encrypted if the server requests it.</TD>
141 </TR>
142 <TR>
143 <TD><TT>encryption=never</TT></TD>
144 <TD>Specifies that the connection to the IPP server should not be encrypted.</TD>
145 </TR>
146 <TR>
147 <TD><TT>encryption=required</TT></TD>
148 <TD>Specifies that the connection to the IPP server should be encrypted using TLS.</TD>
149 </TR>
150 <TR>
151 <TD><TT>version=1.0</TT></TD>
152 <TD>Specifies that version 1.0 of the IPP protocol should be used instead of the default version 1.1.</TD>
153 </TR>
154 <TR>
155 <TD><TT>version=2.0</TT></TD>
156 <TD>Specifies that version 2.0 of the IPP protocol should be used instead of the default version 1.1.</TD>
157 </TR>
158 <TR>
159 <TD><TT>version=2.1</TT></TD>
160 <TD>Specifies that version 2.1 of the IPP protocol should be used instead of the default version 1.1.</TD>
161 </TR>
162 <TR>
163 <TD><TT>waitjob=false</TT></TD>
164 <TD>Specifies that the IPP backend should not wait for the job to complete.</TD>
165 </TR>
166 <TR>
167 <TD><TT>waitprinter=false</TT></TD>
168 <TD>Specifies that the IPP backend should not wait for the printer to become idle before sending the print job.</TD>
169 </TR>
170 </TBODY>
171 </TABLE></DIV>
172
173 <H3><A NAME="LPD">Line Printer Daemon (LPD) Protocol</A></H3>
174
175 <P>LPD is the original network printing protocol and is supported by many network printers. Due to limitations in the LPD protocol, we do not recommend using it if the printer or server supports one of the other protocols. LPD printing normally happens over port 515 and uses the <tt>lpd</tt> URI scheme:</P>
176
177 <PRE>
178 lpd://<i>ip-address-or-hostname</i>/<i>queue</i>
179 lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>
180 lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value</i>
181 lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value</i>
182 lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i>
183 lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i>
184 </PRE>
185
186 <P><A HREF="#TABLE3">Table 3</A> summarizes the options supported by the <tt>lpd</tt> backend.</P>
187
188 <DIV CLASS="table"><TABLE SUMMARY="LPD URI Options">
189 <CAPTION>Table 3: <A NAME="TABLE3">LPD URI Options</A></CAPTION>
190 <THEAD>
191 <TR>
192 <TH>Option</TH>
193 <TH>Description</TH>
194 </TR>
195 </THEAD>
196 <TBODY>
197 <TR>
198 <TD><TT>banner=on</TT></TD>
199 <TD>Specifies that a banner page should be printed by the server.</TD>
200 </TR>
201 <TR>
202 <TD><TT>contimeout=<I>seconds</I></TT></TD>
203 <TD>Specifies the number of seconds to wait for the connection to the server to complete.</TD>
204 </TR>
205 <TR>
206 <TD><TT>format=c</TT></TD>
207 <TD>Specifies that the print data is a CIF file.</TD>
208 </TR>
209 <TR>
210 <TD><TT>format=d</TT></TD>
211 <TD>Specifies that the print data is a DVI file.</TD>
212 </TR>
213 <TR>
214 <TD><TT>format=f</TT></TD>
215 <TD>Specifies that the print data is a plain text file.</TD>
216 </TR>
217 <TR>
218 <TD><TT>format=g</TT></TD>
219 <TD>Specifies that the print data is a Berkeley plot file.</TD>
220 </TR>
221 <TR>
222 <TD><TT>format=l</TT></TD>
223 <TD>Specifies that the print data is a raw (preformatted) print file.</TD>
224 </TR>
225 <TR>
226 <TD><TT>format=n</TT></TD>
227 <TD>Specifies that the print data is a ditroff file.</TD>
228 </TR>
229 <TR>
230 <TD><TT>format=o</TT></TD>
231 <TD>Specifies that the print data is a PostScript file.</TD>
232 </TR>
233 <TR>
234 <TD><TT>format=p</TT></TD>
235 <TD>Specifies that the print data is a plain text file that should be "pretty" printed with a header and footer.</TD>
236 </TR>
237 <TR>
238 <TD><TT>format=r</TT></TD>
239 <TD>Specifies that the print data is a FORTRAN carriage control file.</TD>
240 </TR>
241 <TR>
242 <TD><TT>format=t</TT></TD>
243 <TD>Specifies that the print data is a troff Graphic Systems C/A/T phototypesetter file.</TD>
244 </TR>
245 <TR>
246 <TD><TT>format=v</TT></TD>
247 <TD>Specifies that the print data is a Sun raster file.</TD>
248 </TR>
249 <TR>
250 <TD><TT>order=data,control</TT></TD>
251 <TD>Specifies that the print data files should be sent before the control file.</TD>
252 </TR>
253 <TR>
254 <TD><TT>reserve=none</TT></TD>
255 <TD>Specifies that the backend should not reserve a source port.</TD>
256 </TR>
257 <TR>
258 <TD><TT>reserve=rfc1179</TT></TD>
259 <TD>Specifies that the backend should reserve a source port from 721 to 731 as required by RFC 1179.</TD>
260 </TR>
261 <TR>
262 <TD><TT>sanitize_title=no</TT></TD>
263 <TD>Specifies that the job title string should not be restricted to ASCII characters.</TD>
264 </TR>
265 <TR>
266 <TD><TT>sanitize_title=yes</TT></TD>
267 <TD>Specifies that the job title string should be restricted to ASCII characters.</TD>
268 </TR>
269 <TR>
270 <TD><TT>timeout=<I>seconds</I></TT></TD>
271 <TD>Specifies the number of seconds to wait for LPD commands to complete.</TD>
272 </TR>
273 </TBODY>
274 </TABLE></DIV>
275
276
277 <H3><A NAME="URI">Common Network Printer URIs</A></H3>
278
279 <P>Once you have set the IP address you can access the printer or print server using the <TT>ipp</TT>, <TT>lpd</TT>, or <TT>socket</TT> backends. <A HREF="#TABLE1">Table 1</A> shows a list of common network interfaces and printer servers and the settings you should use with CUPS:</P>
280
281 <DIV CLASS="table"><TABLE SUMMARY="Common Device URIs">
282 <CAPTION>Table 1: <A NAME="TABLE1">Common Device URIs</A></CAPTION>
283 <THEAD>
284 <TR>
285 <TH>Model/Manufacturer</TH>
286 <TH>Device URI(s)</TH>
287 </TR>
288 </THEAD>
289 <TBODY>
290 <TR>
291 <TD>Apple LaserWriter</TD>
292 <TD>lpd://<I>address</I>/PASSTHRU</TD>
293 </TR>
294 <TR>
295 <TD>Axis w/o IPP<BR>
296 Axis OfficeBasic<BR>
297 <A HREF="#AXIS">(see directions)</A></TD>
298 <TD>socket://<I>address</I>:9100<BR>
299 socket://<I>address</I>:9101<BR>
300 socket://<I>address</I>:9102</TD>
301 </TR>
302 <TR>
303 <TD>Axis w/IPP</TD>
304 <TD>ipp://<I>address</I>/LPT1<BR>
305 ipp://<I>address</I>/LPT2<BR>
306 ipp://<I>address</I>/COM1</TD>
307 </TR>
308 <TR>
309 <TD>Castelle LANpress<SUP>TM</SUP></TD>
310 <TD>lpd://<I>address</I>/pr1<BR>
311 lpd://<I>address</I>/pr2<BR>
312 lpd://<I>address</I>/pr3</TD>
313 </TR>
314 <TR>
315 <TD>DPI NETPrint</TD>
316 <TD>lpd://<I>address</I>/pr1<BR>
317 lpd://<I>address</I>/pr2<BR>
318 lpd://<I>address</I>/pr3</TD>
319 </TR>
320 <TR>
321 <TD>DLink DP-301P+</TD>
322 <TD>socket://<I>address</I></TD>
323 </TR>
324 <TR>
325 <TD>EFI&reg; Fiery&reg; RIP</TD>
326 <TD>lpd://<I>address</I>/print</TD>
327 </TR>
328 <TR>
329 <TD>EPSON&reg; Multiprotocol Ethernet Interface Board</TD>
330 <TD>socket://<I>address</I></TD>
331 </TR>
332 <TR>
333 <TD>Extended System ExtendNET</TD>
334 <TD>lpd://<I>address</I>/pr1<BR>
335 lpd://<I>address</I>/pr2<BR>
336 lpd://<I>address</I>/pr3</TD>
337 </TR>
338 <TR>
339 <TD>Hewlett Packard JetDirect</TD>
340 <TD>socket://<I>address</I>:9100<BR>
341 socket://<I>address</I>:9101<BR>
342 socket://<I>address</I>:9102</TD>
343 </TR>
344 <TR>
345 <TD>Intel&reg; NetportExpress XL, PRO/100</TD>
346 <TD>lpd://<I>address</I>/LPT1_PASSTHRU<BR>
347 lpd://<I>address</I>/LPT2_PASSTHRU<BR>
348 lpd://<I>address</I>/COM1_PASSTHRU</TD>
349 </TR>
350 <TR>
351 <TD>Lexmark<SUP>TM</SUP> MarkNet</TD>
352 <TD>lpd://<I>address</I>/ps</TD>
353 </TR>
354 <TR>
355 <TD>Linksys EtherFast&reg;<BR>
356 <A HREF="#LINKSYS">(see directions)</A></TD>
357 <TD>socket://<I>address</I>:4010<BR>
358 socket://<I>address</I>:4020<BR>
359 socket://<I>address</I>:4030</TD>
360 </TR>
361 <TR>
362 <TD>Linksys PSUS4</TD>
363 <TD>lpd://<I>address</I>/lp</TD>
364 </TR>
365 <TR>
366 <TD>Kodak&reg;</TD>
367 <TD>lpd://<I>address</I>/ps</TD>
368 </TR>
369 <TR>
370 <TD>Netgear WGPS606</TD>
371 <TD>lpd://<I>address</I>/L1<BR>
372 lpd://<I>address</I>/L2</TD>
373 </TR>
374 <TR>
375 <TD>QMS&reg; CrownNet<SUP>TM</SUP></TD>
376 <TD>lpd://<I>address</I>/ps</TD>
377 </TR>
378 <TR>
379 <TD>Tektronix&reg; PhaserShare<SUP>TM</SUP></TD>
380 <TD>socket://<I>address</I>:9100</TD>
381 </TR>
382 <TR>
383 <TD>XEROX&reg; 4512 NIC</TD>
384 <TD>lpd://<I>address</I>/PORT1</TD>
385 </TR>
386 <TR>
387 <TD>XEROX&reg; XNIC</TD>
388 <TD>lpd://<I>address</I>/PASSTHRU</TD>
389 </TR>
390 <TR>
391 <TD>XEROX&reg; (most others)</TD>
392 <TD>socket://<I>address</I>:5503</TD>
393 </TR>
394 </TBODY>
395 </TABLE></DIV>
396
397
398 <H2 CLASS="title"><A NAME="SNMP">Troubleshooting SNMP Discovery Problems</A></H2>
399
400 <P>Whenever you view the administration web page or a list of supported device URIs, the <tt>snmp</tt> backend can probe the local network(s) using Simple Network Management Protocol (SNMP) v1 broadcasts. Printers that respond to these broadcasts are then interrogated for the make, model, and supported protocols, yielding a device URI that can be used to add the printer.</P>
401
402 <P>That said, the SNMP requests sometimes expose problems in vendor implementations. If you are experiencing long delays in loading the CUPS web interface administration page, or if you don't see your printer listed, the following instructions will help you to diagnose those problems and/or provide important feedback to the CUPS developers so that we can correct problems and improve the SNMP backend in future releases.</P>
403
404 <H3>Quick Fixes</H3>
405
406 <P>If you don't use "public" as your community name, edit or create (as needed) a text file called <VAR>/etc/cups/snmp.conf</VAR> and put the following line in it:</P>
407
408 <PRE CLASS="command">
409 Community <I>your community name</I>
410 </PRE>
411
412 <P>The SNMP backend will not be able to find any printers on your network if SNMP v1 or broadcasting are not supported on your network.</P>
413
414 <H3>Basic Debugging</H3>
415
416 <P>The SNMP backend supports a debugging mode that is activated by running it from a shell prompt. If you are using Bash (/bin/bash), Bourne shell (/bin/sh), Korn shell (/bin/ksh), or Z shell (/bin/zsh), you can run the following command to get a verbose log of the SNMP backend:</P>
417
418 <PRE CLASS="command">
419 CUPS_DEBUG_LEVEL=2 /usr/lib/cups/backend/snmp 2>&amp;1 | tee snmp.log
420 </PRE>
421
422 <P>For C shell (/bin/csh) and TCsh (/bin/tcsh), use the following command instead:</P>
423
424 <PRE CLASS="command">
425 (setenv CUPS_DEBUG_LEVEL 2; /usr/lib/cups/backend/snmp) |& tee snmp.log
426 </PRE>
427
428 <P>On MacOS X you'll find the SNMP backend in /usr/libexec/cups/backend instead:</P>
429
430 <PRE CLASS="command">
431 CUPS_DEBUG_LEVEL=2 /usr/libexec/cups/backend/snmp 2>&amp;1 | tee snmp.log
432 </PRE>
433
434 <P>The output will look something like this:</P>
435
436 <PRE STYLE="margin-left: 36pt">
437 1 INFO: Using default SNMP Address @LOCAL
438 2 INFO: Using default SNMP Community public
439 3 DEBUG: Scanning for devices in "public" via "@LOCAL"...
440 4 DEBUG: 0.000 Sending 46 bytes to 192.168.2.255...
441 5 DEBUG: SEQUENCE 44 bytes
442 6 DEBUG: INTEGER 1 bytes 0
443 7 DEBUG: OCTET STRING 6 bytes "public"
444 8 DEBUG: Get-Request-PDU 31 bytes
445 9 DEBUG: INTEGER 4 bytes 1149539174
446 10 DEBUG: INTEGER 1 bytes 0
447 11 DEBUG: INTEGER 1 bytes 0
448 12 DEBUG: SEQUENCE 17 bytes
449 13 DEBUG: SEQUENCE 15 bytes
450 14 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
451 15 DEBUG: NULL VALUE 0 bytes
452 16 DEBUG: 0.001 Received 55 bytes from 192.168.2.229...
453 17 DEBUG: community="public"
454 18 DEBUG: request-id=1149539174
455 19 DEBUG: error-status=0
456 20 DEBUG: SEQUENCE 53 bytes
457 21 DEBUG: INTEGER 1 bytes 0
458 22 DEBUG: OCTET STRING 6 bytes "public"
459 23 DEBUG: Get-Response-PDU 40 bytes
460 24 DEBUG: INTEGER 4 bytes 1149539174
461 25 DEBUG: INTEGER 1 bytes 0
462 26 DEBUG: INTEGER 1 bytes 0
463 27 DEBUG: SEQUENCE 26 bytes
464 28 DEBUG: SEQUENCE 24 bytes
465 29 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
466 30 DEBUG: OID 9 bytes .1.3.6.1.2.1.25.3.1.5
467 31 DEBUG: add_cache(addr=0xbfffe170, addrname="192.168.2.229",
468 uri="(null)", id="(null)", make_and_model="(null)")
469 32 DEBUG: 0.002 Sending 46 bytes to 192.168.2.229...
470 33 DEBUG: SEQUENCE 44 bytes
471 34 DEBUG: INTEGER 1 bytes 0
472 35 DEBUG: OCTET STRING 6 bytes "public"
473 36 DEBUG: Get-Request-PDU 31 bytes
474 37 DEBUG: INTEGER 4 bytes 1149539175
475 38 DEBUG: INTEGER 1 bytes 0
476 39 DEBUG: INTEGER 1 bytes 0
477 40 DEBUG: SEQUENCE 17 bytes
478 41 DEBUG: SEQUENCE 15 bytes
479 42 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
480 43 DEBUG: NULL VALUE 0 bytes
481 44 DEBUG: 0.003 Received 69 bytes from 192.168.2.229...
482 45 DEBUG: community="public"
483 46 DEBUG: request-id=1149539175
484 47 DEBUG: error-status=0
485 48 DEBUG: SEQUENCE 67 bytes
486 49 DEBUG: INTEGER 1 bytes 0
487 50 DEBUG: OCTET STRING 6 bytes "public"
488 51 DEBUG: Get-Response-PDU 54 bytes
489 52 DEBUG: INTEGER 4 bytes 1149539175
490 53 DEBUG: INTEGER 1 bytes 0
491 54 DEBUG: INTEGER 1 bytes 0
492 55 DEBUG: SEQUENCE 40 bytes
493 56 DEBUG: SEQUENCE 38 bytes
494 57 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
495 58 DEBUG: OCTET STRING 23 bytes "HP LaserJet 4000
496 Series"
497 59 DEBUG: 1.001 Probing 192.168.2.229...
498 60 DEBUG: 1.001 Trying socket://192.168.2.229:9100...
499 61 DEBUG: 192.168.2.229 supports AppSocket!
500 62 DEBUG: 1.002 Scan complete!
501 63 network socket://192.168.2.229 "HP LaserJet 4000 Series"
502 "HP LaserJet 4000 Series 192.168.2.229" ""
503 </PRE>
504
505 <H3>Dissecting the Output</H3>
506
507 <P>The first two lines are just informational and let you know that the default community name and address are being used. Lines 3-15 contain the initial SNMP query for the device type OID (.1.3.6.1.2.1.25.3.2.1.2.1) from the Host MIB.</P>
508
509 <P>Lines 16-31 show the response we got from an HP LaserJet 4000 network printer. At this point we discover that it is a printer device and then send another SNMP query (lines 32-43) for the device description OID (.1.3.6.1.2.1.25.3.2.1.3.1) from the Host MIB as well.</P>
510
511 <P>Lines 44-58 show the response to the device description query, which tells us that this is an HP LaserJet 4000 Series printer.</P>
512
513 <P>On line 59 we start our active connection probe and discover that this print server supports the AppSocket (JetDirect) protocol on port 9100.</P>
514
515 <P>Finally, line 63 shows the device information line for the print server that is sent to CUPS.</P>
516
517 <H3>Reporting Problems</H3>
518
519 If you don't see your printer listed, or the wrong information is listed, then you need to gather more information on the printer. The easiest way to do this is to run the snmpwalk command:
520
521 <PRE CLASS="command">
522 snmpwalk -Cc -v 1 -c public <I>ip-address</I> | tee snmpwalk.log
523 </PRE>
524
525 <P>where "ip-address" is the IP address of the printer or print server. You should see a <em>lot</em> of values stream by - the ones you want to see are:</P>
526
527 <PRE STYLE="margin-left: 36pt">
528 HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
529 HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: HP LaserJet 4000 Series
530 </PRE>
531
532 <P>The hrDeviceType line should show hrDevicePrinter; if not, then your printer or print server doesn't identify itself as a printer. The hrDeviceDescr line should provide a human-readable string for the make and model of the printer, although in some cases you'll just see something less useful like "Axis OfficeBASIC Parallel Print Server".</P>
533
534 <P>Once you have collected the snmpwalk output, you should go to the <A HREF="http://www.cups.org/str.php">CUPS Bugs &amp; Features page</A> to submit a feature request to support your printer or print server. Be sure to attach those two log files you created - they will help us to identify the SNMP values we need to look for.</P>
535
536
537 <H2 CLASS="title"><A NAME="SERVERS">Configuring Print Servers</A></H2>
538
539 <H3><A NAME="AXIS">Configuring Axis Print Servers</A></H3>
540
541 <P>The Axis print servers can be configured using BOOTP or DHCP. However, on models that do not provide IPP support an additional step must be performed to configure the TCP/IP portion of the print server for use with CUPS.</P>
542
543 <P>Each print server contains a configuration file named <VAR>config</VAR> that contains a list of network parameters used by the server. To modify this file you must first download it from the print server using the <TT>ftp(1)</TT> program:</P>
544
545 <PRE CLASS="command">
546 <KBD>ftp ip-address</KBD>
547 Connected to ip-address.
548 220 Axis NPS ### FTP Printer Server V#.## MON DD YEAR ready.
549 ftp> <KBD>user root</KBD>
550 331 User name ok, need password
551 Password: <KBD>pass</KBD> <I>(this is not echoed)</I>
552 230 User logged in
553 ftp> <KBD>get config</KBD>
554 local: config remote: config
555 200 PORT command successful.
556 150 Opening data connection for config (192,0,2,2),
557 (mode ascii).
558 226 Transfer complete.
559 ##### bytes received in #.## seconds (##### Kbytes/s)
560 ftp> <KBD>quit</KBD>
561 221 Goodbye.
562 </PRE>
563
564 <P>Next, edit the file with your favorite text editor and locate the lines beginning with:</P>
565
566 <PRE CLASS="command">
567 RTN_OPT. : YES
568 RTEL_PR1. : 0
569 RTEL_PR2. : 0
570 RTEL_PR3. : 0
571 RTEL_PR4. : 0
572 RTEL_PR5. : 0
573 RTEL_PR6. : 0
574 RTEL_PR7. : 0
575 RTEL_PR8. : 0
576 </PRE>
577
578 <P>Change the <TT>RTN_OPT</TT> line to read:</P>
579
580 <PRE CLASS="command">
581 RTN_OPT. : <KBD>NO</KBD>
582 </PRE>
583
584 <P>This disables the Reverse TELNET protocol and enables the standard TELNET protocol on the print server. Next, assign a port number for each parallel and serial port on the server as follows:</P>
585
586 <PRE CLASS="command">
587 RTEL_PR1. : <KBD>9100</KBD>
588 RTEL_PR2. : <KBD>9101</KBD>
589 RTEL_PR3. : <KBD>9102</KBD>
590 RTEL_PR4. : <KBD>9103</KBD>
591 RTEL_PR5. : <KBD>9104</KBD>
592 RTEL_PR6. : <KBD>9105</KBD>
593 RTEL_PR7. : <KBD>9106</KBD>
594 RTEL_PR8. : <KBD>9107</KBD>
595 </PRE>
596
597 <P>This essentially makes the Axis print server look like a Hewlett Packard JetDirect EX print server. Save the file and then upload the new <VAR>config</VAR> file using the <TT>ftp</TT> command:</P>
598
599 <PRE CLASS="command">
600 <KBD>ftp ip-address</KBD>
601 Connected to ip-address.
602 220 Axis NPS ### FTP Printer Server V#.## MON DD YEAR ready.
603 ftp> <KBD>user root</KBD>
604 331 User name ok, need password
605 Password: <KBD>pass</KBD> <I>(this is not echoed)</I>
606 230 User logged in
607 ftp> <KBD>put config CONFIG</KBD>
608 local: config remote: CONFIG
609 200 PORT command successful.
610 150 Opening data connection for config (192,0,2,2), (mode ascii).
611 226 Transfer complete.
612 ##### bytes received in #.## seconds (##### Kbytes/s)
613 ftp> <KBD>get hardreset</KBD>
614 local: hardreset remote: hardreset
615 200 PORT command successful.
616 421 Axis NPS ### hard reset, closing connection.
617 ftp> <KBD>quit</KBD>
618 221 Goodbye.
619 </PRE>
620
621 <P>Your Axis print server is now ready for use!</P>
622
623 <H3><A NAME="LINKSYS">Configuring Linksys Print Servers</A></H3>
624
625 <P>The Linksys print servers can be configured using BOOTP or DHCP. Like older Axis print servers, an additional step must be performed to configure the TCP/IP portion of the print server for use with CUPS.</P>
626
627 <P>Each print server contains a configuration file named <VAR>CONFIG</VAR> that contains a list of network parameters used by the server. To modify this file you must first download it from the print server using the <TT>ftp(1)</TT> program:</P>
628
629 <PRE CLASS="command">
630 <KBD>ftp -n ip-address</KBD>
631 Connected to ip-address.
632 220 Print Server Ready.
633 Remote system type is Print.
634 ftp> <KBD>get CONFIG</KBD>
635 local: CONFIG remote: CONFIG
636 200 Command OK.
637 150 Open ASCII Mode Connection.
638 WARNING! 68 bare linefeeds received in ASCII mode
639 File may not have transferred correctly.
640 226 Transfer complete.
641 ##### bytes received in #.## seconds (##### Kbytes/s)
642 ftp> <KBD>quit</KBD>
643 221 Goodbye.
644 </PRE>
645
646 <P>Next, edit the file with your favorite text editor and locate the lines beginning with:</P>
647
648 <PRE CLASS="command">
649 0100 L1_PROUT:P1
650 0120 L2_PROUT:P1
651 0140 L3_PROUT:P1
652 </PRE>
653
654 <P>Change the port number for each parallel and serial port on the server as follows:</P>
655
656 <PRE CLASS="command">
657 0100 L1_PROUT:<KBD>P1</KBD>
658 0120 L2_PROUT:<KBD>P2</KBD>
659 0140 L3_PROUT:<KBD>P3</KBD>
660 </PRE>
661
662 <P>This maps each virtual printer with a physical port. Save the file and then upload the new <VAR>CONFIG</VAR> file using the <TT>ftp</TT> command:</P>
663
664 <PRE CLASS="command">
665 <KBD>ftp -n ip-address</KBD>
666 Connected to ip-address.
667 220 Print Server Ready.
668 Remote system type is Print.
669 ftp> <KBD>put CONFIG</KBD>
670 local: CONFIG remote: CONFIG
671 200 Command OK.
672 150 Open ASCII Mode Connection.
673 226 Transfer complete.
674 ##### bytes received in #.## seconds (##### Kbytes/s)
675 ftp> <KBD>quit</KBD>
676 221 Goodbye.
677 </PRE>
678
679 <P>Your Linksys print server is now ready for use!</P>
680
681 </BODY>
682 </HTML>