]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/network.html
Import CUPS v2.0.2
[thirdparty/cups.git] / doc / help / network.html
CommitLineData
ef416fc2 1<HTML>
2<!-- SECTION: Getting Started -->
3<HEAD>
4 <TITLE>Using Network Printers</TITLE>
178cb736 5 <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
ef416fc2 6</HEAD>
7<BODY>
8
178cb736
MS
9<H1 CLASS="title">Using Network Printers</H1>
10
b86bc4cf 11<P>This help document describes how to discover, configure, and use TCP/IP network printers with CUPS.</P>
ef416fc2 12
b86bc4cf 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
b9367124 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.</P>
b86bc4cf 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">
31host <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
3dd9c340 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:</P>
b86bc4cf 42
43<PRE CLASS="command">
44myprinter:ha=080069001234:ip=192.0.2.2:<VAR>t144=myprinter.boot</VAR>
45</PRE>
46
47<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>
48
49<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>
50
51
52<H2 CLASS="title"><A NAME="VERIFY">Verifying the Printer Connection</A></H2>
53
54<P>To test that the IP address has been successfully assigned and
55that the printer is properly connected to your LAN, type:</P>
56
57<PRE CLASS="command">
58<KBD>ping ip-address</KBD>
59</PRE>
60
61<P>If the connection is working properly you will see something
62like:</P>
63
64<PRE CLASS="command">
65<KBD>ping myprinter</KBD>
66PING myprinter (192.0.2.2): 56 data bytes
6764 bytes from 192.0.2.2: icmp_seq=0 ttl=15 time=5 ms
6864 bytes from 192.0.2.2: icmp_seq=1 ttl=15 time=3 ms
6964 bytes from 192.0.2.2: icmp_seq=2 ttl=15 time=3 ms
7064 bytes from 192.0.2.2: icmp_seq=3 ttl=15 time=3 ms
71</PRE>
72
73<P>If not, verify that the printer or print server is connected
74to the LAN, it is powered on, the LAN cabling is good, and the IP
75address is set correctly. You can usually see the current IP
76address and network status by printing a configuration or test
77page on the device.</P>
78
79
80<H2 CLASS="title"><A NAME="PROTOCOLS">Network Protocols Supported by CUPS</H2>
81
82<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>
83
84<H3><A NAME="SOCKET">AppSocket Protocol</A></H3>
85
86<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>
87
88<PRE>
89socket://<i>ip-address-or-hostname</i>
5a9febac 90socket://<i>ip-address-or-hostname</i>/?option=value
7374e9e5 91socket://<i>ip-address-or-hostname</i>/?option=value&amp;option=value
b86bc4cf 92socket://<i>ip-address-or-hostname</i>:<i>port-number</i>
5a9febac 93socket://<i>ip-address-or-hostname</i>:<i>port-number</i>/?option=value
7374e9e5 94socket://<i>ip-address-or-hostname</i>:<i>port-number</i>/?option=value&amp;option=value
b86bc4cf 95</PRE>
96
5a9febac
MS
97<P>The "contimeout" option controls the number of seconds that the backend will wait to obtain a connection to the printer. The default is 1 week.</P>
98
99<P>The "snmp" option controls whether the <tt>socket</tt> backend queries for supply and page count information via SNMP.</P>
100
b86bc4cf 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
b9367124 105<P>IPP is the only protocol that CUPS supports natively and is supported by most network printers and print servers. IPP printing normally happens over port 631 and uses the <tt>http</tt> (Windows), <tt>ipp</tt>, and <tt>ipps</tt> URI schemes:</P>
b86bc4cf 106
107<PRE>
108http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
109http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value</i>
7374e9e5 110http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value&amp;option=value</i>
b86bc4cf 111ipp://<i>ip-address-or-hostname</i>/<i>resource</i>
112ipp://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value</i>
7374e9e5 113ipp://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value&amp;option=value</i>
b86bc4cf 114ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
115ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value</i>
7374e9e5 116ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value&amp;option=value</i>
5a9febac
MS
117ipps://<i>ip-address-or-hostname</i>/<i>resource</i>
118ipps://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value</i>
7374e9e5 119ipps://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value&amp;option=value</i>
5a9febac
MS
120ipps://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
121ipps://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value</i>
7374e9e5 122ipps://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value&amp;option=value</i>
b86bc4cf 123</PRE>
124
125<P>The <tt>ipp</tt> backend supports many options, which are summarized in <A HREF="#TABLE2">Table 2</A>.</P>
126
127<DIV CLASS="table"><TABLE SUMMARY="IPP URI Options">
128<CAPTION>Table 2: <A NAME="TABLE2">IPP URI Options</A></CAPTION>
129<THEAD>
130<TR>
131 <TH>Option</TH>
132 <TH>Description</TH>
133</TR>
134</THEAD>
135<TBODY>
b86bc4cf 136<TR>
137 <TD><TT>encryption=always</TT></TD>
138 <TD>Specifies that the connection to the IPP server should be encrypted using SSL.</TD>
139</TR>
140<TR>
141 <TD><TT>encryption=ifrequested</TT></TD>
142 <TD>Specifies that the connection to the IPP server should only be encrypted if the server requests it.</TD>
143</TR>
144<TR>
145 <TD><TT>encryption=never</TT></TD>
146 <TD>Specifies that the connection to the IPP server should not be encrypted.</TD>
147</TR>
148<TR>
149 <TD><TT>encryption=required</TT></TD>
150 <TD>Specifies that the connection to the IPP server should be encrypted using TLS.</TD>
151</TR>
5a9febac
MS
152<TR>
153 <TD><TT>snmp=false</TT></TD>
154 <TD>Specifies that SNMP supply and page count queries should not be performed.</TD>
155</TR>
b86bc4cf 156<TR>
157 <TD><TT>version=1.0</TT></TD>
5a9febac 158 <TD>Specifies that version 1.0 of the IPP protocol should be used instead of the default version 2.0.</TD>
b86bc4cf 159</TR>
c168a833 160<TR>
5a9febac
MS
161 <TD><TT>version=1.1</TT></TD>
162 <TD>Specifies that version 1.1 of the IPP protocol should be used instead of the default version 2.0.</TD>
c168a833
MS
163</TR>
164<TR>
165 <TD><TT>version=2.1</TT></TD>
5a9febac 166 <TD>Specifies that version 2.1 of the IPP protocol should be used instead of the default version 2.0.</TD>
c168a833 167</TR>
b86bc4cf 168<TR>
169 <TD><TT>waitjob=false</TT></TD>
170 <TD>Specifies that the IPP backend should not wait for the job to complete.</TD>
171</TR>
172<TR>
173 <TD><TT>waitprinter=false</TT></TD>
174 <TD>Specifies that the IPP backend should not wait for the printer to become idle before sending the print job.</TD>
175</TR>
176</TBODY>
177</TABLE></DIV>
178
179<H3><A NAME="LPD">Line Printer Daemon (LPD) Protocol</A></H3>
180
181<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>
182
183<PRE>
184lpd://<i>ip-address-or-hostname</i>/<i>queue</i>
c168a833 185lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>
b86bc4cf 186lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value</i>
c168a833 187lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value</i>
7374e9e5
MS
188lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&amp;option=value</i>
189lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&amp;option=value</i>
b86bc4cf 190</PRE>
191
192<P><A HREF="#TABLE3">Table 3</A> summarizes the options supported by the <tt>lpd</tt> backend.</P>
193
194<DIV CLASS="table"><TABLE SUMMARY="LPD URI Options">
195<CAPTION>Table 3: <A NAME="TABLE3">LPD URI Options</A></CAPTION>
196<THEAD>
197<TR>
198 <TH>Option</TH>
199 <TH>Description</TH>
200</TR>
201</THEAD>
202<TBODY>
203<TR>
204 <TD><TT>banner=on</TT></TD>
205 <TD>Specifies that a banner page should be printed by the server.</TD>
206</TR>
207<TR>
208 <TD><TT>contimeout=<I>seconds</I></TT></TD>
209 <TD>Specifies the number of seconds to wait for the connection to the server to complete.</TD>
210</TR>
211<TR>
212 <TD><TT>format=c</TT></TD>
213 <TD>Specifies that the print data is a CIF file.</TD>
214</TR>
215<TR>
216 <TD><TT>format=d</TT></TD>
217 <TD>Specifies that the print data is a DVI file.</TD>
218</TR>
219<TR>
220 <TD><TT>format=f</TT></TD>
221 <TD>Specifies that the print data is a plain text file.</TD>
222</TR>
223<TR>
224 <TD><TT>format=g</TT></TD>
225 <TD>Specifies that the print data is a Berkeley plot file.</TD>
226</TR>
227<TR>
228 <TD><TT>format=l</TT></TD>
229 <TD>Specifies that the print data is a raw (preformatted) print file.</TD>
230</TR>
231<TR>
232 <TD><TT>format=n</TT></TD>
233 <TD>Specifies that the print data is a ditroff file.</TD>
234</TR>
235<TR>
236 <TD><TT>format=o</TT></TD>
237 <TD>Specifies that the print data is a PostScript file.</TD>
238</TR>
239<TR>
240 <TD><TT>format=p</TT></TD>
241 <TD>Specifies that the print data is a plain text file that should be "pretty" printed with a header and footer.</TD>
242</TR>
243<TR>
244 <TD><TT>format=r</TT></TD>
245 <TD>Specifies that the print data is a FORTRAN carriage control file.</TD>
246</TR>
247<TR>
248 <TD><TT>format=t</TT></TD>
249 <TD>Specifies that the print data is a troff Graphic Systems C/A/T phototypesetter file.</TD>
250</TR>
251<TR>
252 <TD><TT>format=v</TT></TD>
253 <TD>Specifies that the print data is a Sun raster file.</TD>
254</TR>
255<TR>
256 <TD><TT>order=data,control</TT></TD>
257 <TD>Specifies that the print data files should be sent before the control file.</TD>
258</TR>
259<TR>
260 <TD><TT>reserve=none</TT></TD>
261 <TD>Specifies that the backend should not reserve a source port.</TD>
262</TR>
263<TR>
264 <TD><TT>reserve=rfc1179</TT></TD>
265 <TD>Specifies that the backend should reserve a source port from 721 to 731 as required by RFC 1179.</TD>
266</TR>
267<TR>
268 <TD><TT>sanitize_title=no</TT></TD>
4ef75dec 269 <TD>Specifies that the job title string should not be restricted to ASCII alphanumeric and space characters.</TD>
b86bc4cf 270</TR>
271<TR>
272 <TD><TT>sanitize_title=yes</TT></TD>
4ef75dec 273 <TD>Specifies that the job title string should be restricted to ASCII alphanumeric and space characters.</TD>
b86bc4cf 274</TR>
5a9febac
MS
275<TR>
276 <TD><TT>snmp=false</TT></TD>
277 <TD>Specifies that SNMP supply and page count queries should not be performed.</TD>
278</TR>
b86bc4cf 279<TR>
280 <TD><TT>timeout=<I>seconds</I></TT></TD>
281 <TD>Specifies the number of seconds to wait for LPD commands to complete.</TD>
282</TR>
283</TBODY>
284</TABLE></DIV>
285
286
287<H3><A NAME="URI">Common Network Printer URIs</A></H3>
288
289<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>
ef416fc2 290
480ef0fe 291<DIV CLASS="table"><TABLE SUMMARY="Common Device URIs">
b86bc4cf 292<CAPTION>Table 1: <A NAME="TABLE1">Common Device URIs</A></CAPTION>
480ef0fe 293<THEAD>
294<TR>
ef416fc2 295 <TH>Model/Manufacturer</TH>
296 <TH>Device URI(s)</TH>
297</TR>
480ef0fe 298</THEAD>
299<TBODY>
300<TR>
ef416fc2 301 <TD>Apple LaserWriter</TD>
302 <TD>lpd://<I>address</I>/PASSTHRU</TD>
303</TR>
480ef0fe 304<TR>
ef416fc2 305 <TD>Axis w/o IPP<BR>
306 Axis OfficeBasic<BR>
307 <A HREF="#AXIS">(see directions)</A></TD>
308 <TD>socket://<I>address</I>:9100<BR>
309 socket://<I>address</I>:9101<BR>
310 socket://<I>address</I>:9102</TD>
311</TR>
480ef0fe 312<TR>
ef416fc2 313 <TD>Axis w/IPP</TD>
314 <TD>ipp://<I>address</I>/LPT1<BR>
315 ipp://<I>address</I>/LPT2<BR>
316 ipp://<I>address</I>/COM1</TD>
317</TR>
480ef0fe 318<TR>
ef416fc2 319 <TD>Castelle LANpress<SUP>TM</SUP></TD>
320 <TD>lpd://<I>address</I>/pr1<BR>
321 lpd://<I>address</I>/pr2<BR>
322 lpd://<I>address</I>/pr3</TD>
323</TR>
480ef0fe 324<TR>
ef416fc2 325 <TD>DPI NETPrint</TD>
326 <TD>lpd://<I>address</I>/pr1<BR>
327 lpd://<I>address</I>/pr2<BR>
328 lpd://<I>address</I>/pr3</TD>
329</TR>
480ef0fe 330<TR>
ef416fc2 331 <TD>DLink DP-301P+</TD>
332 <TD>socket://<I>address</I></TD>
333</TR>
480ef0fe 334<TR>
ef416fc2 335 <TD>EFI&reg; Fiery&reg; RIP</TD>
336 <TD>lpd://<I>address</I>/print</TD>
337</TR>
480ef0fe 338<TR>
ef416fc2 339 <TD>EPSON&reg; Multiprotocol Ethernet Interface Board</TD>
340 <TD>socket://<I>address</I></TD>
341</TR>
480ef0fe 342<TR>
ef416fc2 343 <TD>Extended System ExtendNET</TD>
344 <TD>lpd://<I>address</I>/pr1<BR>
345 lpd://<I>address</I>/pr2<BR>
346 lpd://<I>address</I>/pr3</TD>
347</TR>
480ef0fe 348<TR>
2fb76298 349 <TD>Hewlett Packard JetDirect</TD>
ef416fc2 350 <TD>socket://<I>address</I>:9100<BR>
351 socket://<I>address</I>:9101<BR>
352 socket://<I>address</I>:9102</TD>
353</TR>
480ef0fe 354<TR>
e1d6a774 355 <TD>Intel&reg; NetportExpress XL, PRO/100</TD>
ef416fc2 356 <TD>lpd://<I>address</I>/LPT1_PASSTHRU<BR>
357 lpd://<I>address</I>/LPT2_PASSTHRU<BR>
358 lpd://<I>address</I>/COM1_PASSTHRU</TD>
359</TR>
480ef0fe 360<TR>
ef416fc2 361 <TD>Lexmark<SUP>TM</SUP> MarkNet</TD>
362 <TD>lpd://<I>address</I>/ps</TD>
363</TR>
480ef0fe 364<TR>
ef416fc2 365 <TD>Linksys EtherFast&reg;<BR>
366 <A HREF="#LINKSYS">(see directions)</A></TD>
367 <TD>socket://<I>address</I>:4010<BR>
368 socket://<I>address</I>:4020<BR>
369 socket://<I>address</I>:4030</TD>
370</TR>
480ef0fe 371<TR>
ef416fc2 372 <TD>Linksys PSUS4</TD>
373 <TD>lpd://<I>address</I>/lp</TD>
374</TR>
480ef0fe 375<TR>
ef416fc2 376 <TD>Kodak&reg;</TD>
377 <TD>lpd://<I>address</I>/ps</TD>
378</TR>
4b3f67ff
MS
379<TR>
380 <TD>Netgear WGPS606</TD>
381 <TD>lpd://<I>address</I>/L1<BR>
382 lpd://<I>address</I>/L2</TD>
383</TR>
480ef0fe 384<TR>
ef416fc2 385 <TD>QMS&reg; CrownNet<SUP>TM</SUP></TD>
386 <TD>lpd://<I>address</I>/ps</TD>
387</TR>
480ef0fe 388<TR>
ef416fc2 389 <TD>Tektronix&reg; PhaserShare<SUP>TM</SUP></TD>
390 <TD>socket://<I>address</I>:9100</TD>
391</TR>
480ef0fe 392<TR>
ef416fc2 393 <TD>XEROX&reg; 4512 NIC</TD>
394 <TD>lpd://<I>address</I>/PORT1</TD>
395</TR>
480ef0fe 396<TR>
ef416fc2 397 <TD>XEROX&reg; XNIC</TD>
398 <TD>lpd://<I>address</I>/PASSTHRU</TD>
399</TR>
480ef0fe 400<TR>
ef416fc2 401 <TD>XEROX&reg; (most others)</TD>
402 <TD>socket://<I>address</I>:5503</TD>
403</TR>
480ef0fe 404</TBODY>
ef416fc2 405</TABLE></DIV>
406
ef416fc2 407
b86bc4cf 408<H2 CLASS="title"><A NAME="SNMP">Troubleshooting SNMP Discovery Problems</A></H2>
409
f3c17241 410<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>
b86bc4cf 411
f3c17241 412<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>
b86bc4cf 413
414<H3>Quick Fixes</H3>
415
f3c17241 416<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>
ef416fc2 417
418<PRE CLASS="command">
b86bc4cf 419Community <I>your community name</I>
ef416fc2 420</PRE>
421
f3c17241 422<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>
ef416fc2 423
b86bc4cf 424<H3>Basic Debugging</H3>
ef416fc2 425
b86bc4cf 426<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>
ef416fc2 427
428<PRE CLASS="command">
b86bc4cf 429CUPS_DEBUG_LEVEL=2 /usr/lib/cups/backend/snmp 2>&amp;1 | tee snmp.log
ef416fc2 430</PRE>
431
b86bc4cf 432<P>For C shell (/bin/csh) and TCsh (/bin/tcsh), use the following command instead:</P>
ef416fc2 433
434<PRE CLASS="command">
7374e9e5 435(setenv CUPS_DEBUG_LEVEL 2; /usr/lib/cups/backend/snmp) |&amp; tee snmp.log
ef416fc2 436</PRE>
437
b86bc4cf 438<P>On MacOS X you'll find the SNMP backend in /usr/libexec/cups/backend instead:</P>
ef416fc2 439
440<PRE CLASS="command">
b86bc4cf 441CUPS_DEBUG_LEVEL=2 /usr/libexec/cups/backend/snmp 2>&amp;1 | tee snmp.log
ef416fc2 442</PRE>
443
b86bc4cf 444<P>The output will look something like this:</P>
445
446<PRE STYLE="margin-left: 36pt">
447 1 INFO: Using default SNMP Address @LOCAL
448 2 INFO: Using default SNMP Community public
449 3 DEBUG: Scanning for devices in "public" via "@LOCAL"...
450 4 DEBUG: 0.000 Sending 46 bytes to 192.168.2.255...
451 5 DEBUG: SEQUENCE 44 bytes
452 6 DEBUG: INTEGER 1 bytes 0
453 7 DEBUG: OCTET STRING 6 bytes "public"
454 8 DEBUG: Get-Request-PDU 31 bytes
455 9 DEBUG: INTEGER 4 bytes 1149539174
45610 DEBUG: INTEGER 1 bytes 0
45711 DEBUG: INTEGER 1 bytes 0
45812 DEBUG: SEQUENCE 17 bytes
45913 DEBUG: SEQUENCE 15 bytes
46014 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
46115 DEBUG: NULL VALUE 0 bytes
46216 DEBUG: 0.001 Received 55 bytes from 192.168.2.229...
46317 DEBUG: community="public"
46418 DEBUG: request-id=1149539174
46519 DEBUG: error-status=0
46620 DEBUG: SEQUENCE 53 bytes
46721 DEBUG: INTEGER 1 bytes 0
46822 DEBUG: OCTET STRING 6 bytes "public"
46923 DEBUG: Get-Response-PDU 40 bytes
47024 DEBUG: INTEGER 4 bytes 1149539174
47125 DEBUG: INTEGER 1 bytes 0
47226 DEBUG: INTEGER 1 bytes 0
47327 DEBUG: SEQUENCE 26 bytes
47428 DEBUG: SEQUENCE 24 bytes
47529 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
47630 DEBUG: OID 9 bytes .1.3.6.1.2.1.25.3.1.5
47731 DEBUG: add_cache(addr=0xbfffe170, addrname="192.168.2.229",
478 uri="(null)", id="(null)", make_and_model="(null)")
47932 DEBUG: 0.002 Sending 46 bytes to 192.168.2.229...
48033 DEBUG: SEQUENCE 44 bytes
48134 DEBUG: INTEGER 1 bytes 0
48235 DEBUG: OCTET STRING 6 bytes "public"
48336 DEBUG: Get-Request-PDU 31 bytes
48437 DEBUG: INTEGER 4 bytes 1149539175
48538 DEBUG: INTEGER 1 bytes 0
48639 DEBUG: INTEGER 1 bytes 0
48740 DEBUG: SEQUENCE 17 bytes
48841 DEBUG: SEQUENCE 15 bytes
48942 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
49043 DEBUG: NULL VALUE 0 bytes
49144 DEBUG: 0.003 Received 69 bytes from 192.168.2.229...
49245 DEBUG: community="public"
49346 DEBUG: request-id=1149539175
49447 DEBUG: error-status=0
49548 DEBUG: SEQUENCE 67 bytes
49649 DEBUG: INTEGER 1 bytes 0
49750 DEBUG: OCTET STRING 6 bytes "public"
49851 DEBUG: Get-Response-PDU 54 bytes
49952 DEBUG: INTEGER 4 bytes 1149539175
50053 DEBUG: INTEGER 1 bytes 0
50154 DEBUG: INTEGER 1 bytes 0
50255 DEBUG: SEQUENCE 40 bytes
50356 DEBUG: SEQUENCE 38 bytes
50457 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
50558 DEBUG: OCTET STRING 23 bytes "HP LaserJet 4000
506 Series"
50759 DEBUG: 1.001 Probing 192.168.2.229...
50860 DEBUG: 1.001 Trying socket://192.168.2.229:9100...
50961 DEBUG: 192.168.2.229 supports AppSocket!
51062 DEBUG: 1.002 Scan complete!
51163 network socket://192.168.2.229 "HP LaserJet 4000 Series"
512 "HP LaserJet 4000 Series 192.168.2.229" ""
ef416fc2 513</PRE>
514
b86bc4cf 515<H3>Dissecting the Output</H3>
ef416fc2 516
b86bc4cf 517<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>
ef416fc2 518
b86bc4cf 519<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>
ef416fc2 520
b86bc4cf 521<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>
ef416fc2 522
b86bc4cf 523<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>
ef416fc2 524
b86bc4cf 525<P>Finally, line 63 shows the device information line for the print server that is sent to CUPS.</P>
ef416fc2 526
b86bc4cf 527<H3>Reporting Problems</H3>
ef416fc2 528
b86bc4cf 529If 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:
ef416fc2 530
531<PRE CLASS="command">
b86bc4cf 532snmpwalk -Cc -v 1 -c public <I>ip-address</I> | tee snmpwalk.log
ef416fc2 533</PRE>
534
b86bc4cf 535<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>
ef416fc2 536
b86bc4cf 537<PRE STYLE="margin-left: 36pt">
538HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
539HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: HP LaserJet 4000 Series
ef416fc2 540</PRE>
541
b86bc4cf 542<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>
543
544<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>
545
546
547<H2 CLASS="title"><A NAME="SERVERS">Configuring Print Servers</A></H2>
ef416fc2 548
b86bc4cf 549<H3><A NAME="AXIS">Configuring Axis Print Servers</A></H3>
ef416fc2 550
b86bc4cf 551<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>
ef416fc2 552
b86bc4cf 553<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>
ef416fc2 554
555<PRE CLASS="command">
556<KBD>ftp ip-address</KBD>
557Connected to ip-address.
558220 Axis NPS ### FTP Printer Server V#.## MON DD YEAR ready.
559ftp> <KBD>user root</KBD>
560331 User name ok, need password
561Password: <KBD>pass</KBD> <I>(this is not echoed)</I>
562230 User logged in
563ftp> <KBD>get config</KBD>
564local: config remote: config
565200 PORT command successful.
566150 Opening data connection for config (192,0,2,2),
567(mode ascii).
568226 Transfer complete.
569##### bytes received in #.## seconds (##### Kbytes/s)
570ftp> <KBD>quit</KBD>
571221 Goodbye.
572</PRE>
573
b86bc4cf 574<P>Next, edit the file with your favorite text editor and locate the lines beginning with:</P>
ef416fc2 575
576<PRE CLASS="command">
577RTN_OPT. : YES
578RTEL_PR1. : 0
579RTEL_PR2. : 0
580RTEL_PR3. : 0
581RTEL_PR4. : 0
582RTEL_PR5. : 0
583RTEL_PR6. : 0
584RTEL_PR7. : 0
585RTEL_PR8. : 0
586</PRE>
587
b86bc4cf 588<P>Change the <TT>RTN_OPT</TT> line to read:</P>
ef416fc2 589
590<PRE CLASS="command">
591RTN_OPT. : <KBD>NO</KBD>
592</PRE>
593
b86bc4cf 594<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>
ef416fc2 595
596<PRE CLASS="command">
597RTEL_PR1. : <KBD>9100</KBD>
598RTEL_PR2. : <KBD>9101</KBD>
599RTEL_PR3. : <KBD>9102</KBD>
600RTEL_PR4. : <KBD>9103</KBD>
601RTEL_PR5. : <KBD>9104</KBD>
602RTEL_PR6. : <KBD>9105</KBD>
603RTEL_PR7. : <KBD>9106</KBD>
604RTEL_PR8. : <KBD>9107</KBD>
605</PRE>
606
b86bc4cf 607<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>
ef416fc2 608
609<PRE CLASS="command">
610<KBD>ftp ip-address</KBD>
611Connected to ip-address.
612220 Axis NPS ### FTP Printer Server V#.## MON DD YEAR ready.
613ftp> <KBD>user root</KBD>
614331 User name ok, need password
615Password: <KBD>pass</KBD> <I>(this is not echoed)</I>
616230 User logged in
617ftp> <KBD>put config CONFIG</KBD>
618local: config remote: CONFIG
619200 PORT command successful.
620150 Opening data connection for config (192,0,2,2), (mode ascii).
621226 Transfer complete.
622##### bytes received in #.## seconds (##### Kbytes/s)
623ftp> <KBD>get hardreset</KBD>
624local: hardreset remote: hardreset
625200 PORT command successful.
626421 Axis NPS ### hard reset, closing connection.
627ftp> <KBD>quit</KBD>
628221 Goodbye.
629</PRE>
630
631<P>Your Axis print server is now ready for use!</P>
632
b86bc4cf 633<H3><A NAME="LINKSYS">Configuring Linksys Print Servers</A></H3>
ef416fc2 634
b86bc4cf 635<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>
ef416fc2 636
b86bc4cf 637<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>
ef416fc2 638
639<PRE CLASS="command">
640<KBD>ftp -n ip-address</KBD>
641Connected to ip-address.
642220 Print Server Ready.
643Remote system type is Print.
644ftp> <KBD>get CONFIG</KBD>
645local: CONFIG remote: CONFIG
646200 Command OK.
647150 Open ASCII Mode Connection.
648WARNING! 68 bare linefeeds received in ASCII mode
649File may not have transferred correctly.
650226 Transfer complete.
651##### bytes received in #.## seconds (##### Kbytes/s)
652ftp> <KBD>quit</KBD>
653221 Goodbye.
654</PRE>
655
b86bc4cf 656<P>Next, edit the file with your favorite text editor and locate the lines beginning with:</P>
ef416fc2 657
658<PRE CLASS="command">
6590100 L1_PROUT:P1
6600120 L2_PROUT:P1
6610140 L3_PROUT:P1
662</PRE>
663
b86bc4cf 664<P>Change the port number for each parallel and serial port on the server as follows:</P>
ef416fc2 665
666<PRE CLASS="command">
6670100 L1_PROUT:<KBD>P1</KBD>
6680120 L2_PROUT:<KBD>P2</KBD>
6690140 L3_PROUT:<KBD>P3</KBD>
670</PRE>
671
b86bc4cf 672<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>
ef416fc2 673
674<PRE CLASS="command">
675<KBD>ftp -n ip-address</KBD>
676Connected to ip-address.
677220 Print Server Ready.
678Remote system type is Print.
679ftp> <KBD>put CONFIG</KBD>
680local: CONFIG remote: CONFIG
681200 Command OK.
682150 Open ASCII Mode Connection.
683226 Transfer complete.
684##### bytes received in #.## seconds (##### Kbytes/s)
685ftp> <KBD>quit</KBD>
686221 Goodbye.
687</PRE>
688
689<P>Your Linksys print server is now ready for use!</P>
690
ef416fc2 691</BODY>
692</HTML>