]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/network.html
Merge changes from CUPS 1.4svn-r7874.
[thirdparty/cups.git] / doc / help / network.html
CommitLineData
ef416fc2 1<HTML>
2<!-- SECTION: Getting Started -->
3<HEAD>
4 <TITLE>Using Network Printers</TITLE>
5</HEAD>
6<BODY>
7
b86bc4cf 8<P>This help document describes how to discover, configure, and use TCP/IP network printers with CUPS.</P>
ef416fc2 9
b86bc4cf 10<H2 CLASS="title"><A NAME="ADDRESS">Getting the IP Address</A></H2>
11
12<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>
13
14<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>
15
16
17<H2 CLASS="title"><A NAME="CONFIG">Configuring the IP Address</A></H2>
18
19<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>
20
21<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>
22
23<H3><A NAME="DHCP">Configuring the IP Address Using DHCP</A></H3>
24
25<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>
26
27<PRE CLASS="command">
28host <I>hostname</I> {
29 hardware ethernet <I>mac-address</I>;
30 fixed-address <I>ip-address</I>;
31}
32</PRE>
33
34<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>
35
36<H3><A NAME="BOOTP">Configuring the IP Address Using BOOTP</A></H3>
37
38<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>
39
40<PRE CLASS="command">
41myprinter 08:00:69:00:12:34 192.0.2.2 <VAR>myprinter.boot</VAR>
42</PRE>
43
44<P>Newer versions of <TT>bootpd</TT> use a different format:</P>
45
46<PRE CLASS="command">
47myprinter:ha=080069001234:ip=192.0.2.2:<VAR>t144=myprinter.boot</VAR>
48</PRE>
49
50<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>
51
52<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>
53
54
55<H2 CLASS="title"><A NAME="VERIFY">Verifying the Printer Connection</A></H2>
56
57<P>To test that the IP address has been successfully assigned and
58that the printer is properly connected to your LAN, type:</P>
59
60<PRE CLASS="command">
61<KBD>ping ip-address</KBD>
62</PRE>
63
64<P>If the connection is working properly you will see something
65like:</P>
66
67<PRE CLASS="command">
68<KBD>ping myprinter</KBD>
69PING myprinter (192.0.2.2): 56 data bytes
7064 bytes from 192.0.2.2: icmp_seq=0 ttl=15 time=5 ms
7164 bytes from 192.0.2.2: icmp_seq=1 ttl=15 time=3 ms
7264 bytes from 192.0.2.2: icmp_seq=2 ttl=15 time=3 ms
7364 bytes from 192.0.2.2: icmp_seq=3 ttl=15 time=3 ms
74</PRE>
75
76<P>If not, verify that the printer or print server is connected
77to the LAN, it is powered on, the LAN cabling is good, and the IP
78address is set correctly. You can usually see the current IP
79address and network status by printing a configuration or test
80page on the device.</P>
81
82
83<H2 CLASS="title"><A NAME="PROTOCOLS">Network Protocols Supported by CUPS</H2>
84
85<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>
86
87<H3><A NAME="SOCKET">AppSocket Protocol</A></H3>
88
89<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>
90
91<PRE>
92socket://<i>ip-address-or-hostname</i>
93socket://<i>ip-address-or-hostname</i>?waiteof=false
94socket://<i>ip-address-or-hostname</i>:<i>port-number</i>
95socket://<i>ip-address-or-hostname</i>:<i>port-number</i>?waiteof=false
96</PRE>
97
98<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>
99
100<H3><A NAME="IPP">Internet Printing Protocol (IPP)</A></H3>
101
2fb76298 102<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>
b86bc4cf 103
104<PRE>
105http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
106http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value</i>
107http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value&option=value</i>
108ipp://<i>ip-address-or-hostname</i>/<i>resource</i>
109ipp://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value</i>
110ipp://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value&option=value</i>
111ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
112ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value</i>
113ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value&option=value</i>
114</PRE>
115
116<P>The <tt>ipp</tt> backend supports many options, which are summarized in <A HREF="#TABLE2">Table 2</A>.</P>
117
118<DIV CLASS="table"><TABLE SUMMARY="IPP URI Options">
119<CAPTION>Table 2: <A NAME="TABLE2">IPP URI Options</A></CAPTION>
120<THEAD>
121<TR>
122 <TH>Option</TH>
123 <TH>Description</TH>
124</TR>
125</THEAD>
126<TBODY>
127<TR>
128 <TD><TT>compression=gzip</TT></TD>
129 <TD>Specifies that print data should be compressed before sending.</TD>
130</TR>
131<TR>
132 <TD><TT>encryption=always</TT></TD>
133 <TD>Specifies that the connection to the IPP server should be encrypted using SSL.</TD>
134</TR>
135<TR>
136 <TD><TT>encryption=ifrequested</TT></TD>
137 <TD>Specifies that the connection to the IPP server should only be encrypted if the server requests it.</TD>
138</TR>
139<TR>
140 <TD><TT>encryption=never</TT></TD>
141 <TD>Specifies that the connection to the IPP server should not be encrypted.</TD>
142</TR>
143<TR>
144 <TD><TT>encryption=required</TT></TD>
145 <TD>Specifies that the connection to the IPP server should be encrypted using TLS.</TD>
146</TR>
147<TR>
148 <TD><TT>version=1.0</TT></TD>
149 <TD>Specifies that version 1.0 of the IPP protocol should be used instead of the default version 1.1.</TD>
150</TR>
151<TR>
152 <TD><TT>waitjob=false</TT></TD>
153 <TD>Specifies that the IPP backend should not wait for the job to complete.</TD>
154</TR>
155<TR>
156 <TD><TT>waitprinter=false</TT></TD>
157 <TD>Specifies that the IPP backend should not wait for the printer to become idle before sending the print job.</TD>
158</TR>
159</TBODY>
160</TABLE></DIV>
161
162<H3><A NAME="LPD">Line Printer Daemon (LPD) Protocol</A></H3>
163
164<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>
165
166<PRE>
167lpd://<i>ip-address-or-hostname</i>/<i>queue</i>
168lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value</i>
169lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i>
170</PRE>
171
172<P><A HREF="#TABLE3">Table 3</A> summarizes the options supported by the <tt>lpd</tt> backend.</P>
173
174<DIV CLASS="table"><TABLE SUMMARY="LPD URI Options">
175<CAPTION>Table 3: <A NAME="TABLE3">LPD URI Options</A></CAPTION>
176<THEAD>
177<TR>
178 <TH>Option</TH>
179 <TH>Description</TH>
180</TR>
181</THEAD>
182<TBODY>
183<TR>
184 <TD><TT>banner=on</TT></TD>
185 <TD>Specifies that a banner page should be printed by the server.</TD>
186</TR>
187<TR>
188 <TD><TT>contimeout=<I>seconds</I></TT></TD>
189 <TD>Specifies the number of seconds to wait for the connection to the server to complete.</TD>
190</TR>
191<TR>
192 <TD><TT>format=c</TT></TD>
193 <TD>Specifies that the print data is a CIF file.</TD>
194</TR>
195<TR>
196 <TD><TT>format=d</TT></TD>
197 <TD>Specifies that the print data is a DVI file.</TD>
198</TR>
199<TR>
200 <TD><TT>format=f</TT></TD>
201 <TD>Specifies that the print data is a plain text file.</TD>
202</TR>
203<TR>
204 <TD><TT>format=g</TT></TD>
205 <TD>Specifies that the print data is a Berkeley plot file.</TD>
206</TR>
207<TR>
208 <TD><TT>format=l</TT></TD>
209 <TD>Specifies that the print data is a raw (preformatted) print file.</TD>
210</TR>
211<TR>
212 <TD><TT>format=n</TT></TD>
213 <TD>Specifies that the print data is a ditroff file.</TD>
214</TR>
215<TR>
216 <TD><TT>format=o</TT></TD>
217 <TD>Specifies that the print data is a PostScript file.</TD>
218</TR>
219<TR>
220 <TD><TT>format=p</TT></TD>
221 <TD>Specifies that the print data is a plain text file that should be "pretty" printed with a header and footer.</TD>
222</TR>
223<TR>
224 <TD><TT>format=r</TT></TD>
225 <TD>Specifies that the print data is a FORTRAN carriage control file.</TD>
226</TR>
227<TR>
228 <TD><TT>format=t</TT></TD>
229 <TD>Specifies that the print data is a troff Graphic Systems C/A/T phototypesetter file.</TD>
230</TR>
231<TR>
232 <TD><TT>format=v</TT></TD>
233 <TD>Specifies that the print data is a Sun raster file.</TD>
234</TR>
235<TR>
236 <TD><TT>order=data,control</TT></TD>
237 <TD>Specifies that the print data files should be sent before the control file.</TD>
238</TR>
239<TR>
240 <TD><TT>reserve=none</TT></TD>
241 <TD>Specifies that the backend should not reserve a source port.</TD>
242</TR>
243<TR>
244 <TD><TT>reserve=rfc1179</TT></TD>
245 <TD>Specifies that the backend should reserve a source port from 721 to 731 as required by RFC 1179.</TD>
246</TR>
247<TR>
248 <TD><TT>sanitize_title=no</TT></TD>
249 <TD>Specifies that the job title string should not be restricted to ASCII characters.</TD>
250</TR>
251<TR>
252 <TD><TT>sanitize_title=yes</TT></TD>
253 <TD>Specifies that the job title string should be restricted to ASCII characters.</TD>
254</TR>
255<TR>
256 <TD><TT>timeout=<I>seconds</I></TT></TD>
257 <TD>Specifies the number of seconds to wait for LPD commands to complete.</TD>
258</TR>
259</TBODY>
260</TABLE></DIV>
261
262
263<H3><A NAME="URI">Common Network Printer URIs</A></H3>
264
265<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 266
480ef0fe 267<DIV CLASS="table"><TABLE SUMMARY="Common Device URIs">
b86bc4cf 268<CAPTION>Table 1: <A NAME="TABLE1">Common Device URIs</A></CAPTION>
480ef0fe 269<THEAD>
270<TR>
ef416fc2 271 <TH>Model/Manufacturer</TH>
272 <TH>Device URI(s)</TH>
273</TR>
480ef0fe 274</THEAD>
275<TBODY>
276<TR>
ef416fc2 277 <TD>Apple LaserWriter</TD>
278 <TD>lpd://<I>address</I>/PASSTHRU</TD>
279</TR>
480ef0fe 280<TR>
ef416fc2 281 <TD>Axis w/o IPP<BR>
282 Axis OfficeBasic<BR>
283 <A HREF="#AXIS">(see directions)</A></TD>
284 <TD>socket://<I>address</I>:9100<BR>
285 socket://<I>address</I>:9101<BR>
286 socket://<I>address</I>:9102</TD>
287</TR>
480ef0fe 288<TR>
ef416fc2 289 <TD>Axis w/IPP</TD>
290 <TD>ipp://<I>address</I>/LPT1<BR>
291 ipp://<I>address</I>/LPT2<BR>
292 ipp://<I>address</I>/COM1</TD>
293</TR>
480ef0fe 294<TR>
ef416fc2 295 <TD>Castelle LANpress<SUP>TM</SUP></TD>
296 <TD>lpd://<I>address</I>/pr1<BR>
297 lpd://<I>address</I>/pr2<BR>
298 lpd://<I>address</I>/pr3</TD>
299</TR>
480ef0fe 300<TR>
ef416fc2 301 <TD>DPI NETPrint</TD>
302 <TD>lpd://<I>address</I>/pr1<BR>
303 lpd://<I>address</I>/pr2<BR>
304 lpd://<I>address</I>/pr3</TD>
305</TR>
480ef0fe 306<TR>
ef416fc2 307 <TD>DLink DP-301P+</TD>
308 <TD>socket://<I>address</I></TD>
309</TR>
480ef0fe 310<TR>
ef416fc2 311 <TD>EFI&reg; Fiery&reg; RIP</TD>
312 <TD>lpd://<I>address</I>/print</TD>
313</TR>
480ef0fe 314<TR>
ef416fc2 315 <TD>EPSON&reg; Multiprotocol Ethernet Interface Board</TD>
316 <TD>socket://<I>address</I></TD>
317</TR>
480ef0fe 318<TR>
ef416fc2 319 <TD>Extended System ExtendNET</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>
2fb76298 325 <TD>Hewlett Packard JetDirect</TD>
ef416fc2 326 <TD>socket://<I>address</I>:9100<BR>
327 socket://<I>address</I>:9101<BR>
328 socket://<I>address</I>:9102</TD>
329</TR>
480ef0fe 330<TR>
e1d6a774 331 <TD>Intel&reg; NetportExpress XL, PRO/100</TD>
ef416fc2 332 <TD>lpd://<I>address</I>/LPT1_PASSTHRU<BR>
333 lpd://<I>address</I>/LPT2_PASSTHRU<BR>
334 lpd://<I>address</I>/COM1_PASSTHRU</TD>
335</TR>
480ef0fe 336<TR>
ef416fc2 337 <TD>Lexmark<SUP>TM</SUP> MarkNet</TD>
338 <TD>lpd://<I>address</I>/ps</TD>
339</TR>
480ef0fe 340<TR>
ef416fc2 341 <TD>Linksys EtherFast&reg;<BR>
342 <A HREF="#LINKSYS">(see directions)</A></TD>
343 <TD>socket://<I>address</I>:4010<BR>
344 socket://<I>address</I>:4020<BR>
345 socket://<I>address</I>:4030</TD>
346</TR>
480ef0fe 347<TR>
ef416fc2 348 <TD>Linksys PSUS4</TD>
349 <TD>lpd://<I>address</I>/lp</TD>
350</TR>
480ef0fe 351<TR>
ef416fc2 352 <TD>Kodak&reg;</TD>
353 <TD>lpd://<I>address</I>/ps</TD>
354</TR>
480ef0fe 355<TR>
ef416fc2 356 <TD>QMS&reg; CrownNet<SUP>TM</SUP></TD>
357 <TD>lpd://<I>address</I>/ps</TD>
358</TR>
480ef0fe 359<TR>
ef416fc2 360 <TD>Tektronix&reg; PhaserShare<SUP>TM</SUP></TD>
361 <TD>socket://<I>address</I>:9100</TD>
362</TR>
480ef0fe 363<TR>
ef416fc2 364 <TD>XEROX&reg; 4512 NIC</TD>
365 <TD>lpd://<I>address</I>/PORT1</TD>
366</TR>
480ef0fe 367<TR>
ef416fc2 368 <TD>XEROX&reg; XNIC</TD>
369 <TD>lpd://<I>address</I>/PASSTHRU</TD>
370</TR>
480ef0fe 371<TR>
ef416fc2 372 <TD>XEROX&reg; (most others)</TD>
373 <TD>socket://<I>address</I>:5503</TD>
374</TR>
480ef0fe 375</TBODY>
ef416fc2 376</TABLE></DIV>
377
ef416fc2 378
b86bc4cf 379<H2 CLASS="title"><A NAME="SNMP">Troubleshooting SNMP Discovery Problems</A></H2>
380
381<P>Whenever you view the administration web page or a list of supported device URIs, the <tt>snmp</tt> backend will probe the local network(s) using Simple Network Management Protocol (SNMP) broadcasts. Printers that respond to these broadcasts are then interrogated for the make and model and supported protocols, yielding a device URI that can be used to add the printer.</P>
382
383<P>That said, the SNMP requests sometimes expose problems in vendor SNMP or IPP 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>
384
385<H3>Quick Fixes</H3>
386
387<P>If you don't use "public" as your community name, create a text file called <VAR>/etc/cups/snmp.conf</VAR> and put the following line in it:</P>
ef416fc2 388
389<PRE CLASS="command">
b86bc4cf 390Community <I>your community name</I>
ef416fc2 391</PRE>
392
b86bc4cf 393<P>If you have more than one community name, list them all on separate lines.</P>
ef416fc2 394
b86bc4cf 395<P>If you don't support SNMP v1 on your network, you are currently "out of luck". That said, we will be adding v2, v2c, and v3 support in future CUPS releases once we have a handle on the actual requirements people have for such things. Please file or update an <A HREF="http://www.cups.org/str.php">SNMP enhancement request</A> with <em>specific</em> requirements you have - what you need supported, why you need it supported, and how you would like to see the functionality provided/exposed - so that we can do it "right" the first time.</P>
ef416fc2 396
b86bc4cf 397<H3>Basic Debugging</H3>
ef416fc2 398
b86bc4cf 399<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 400
401<PRE CLASS="command">
b86bc4cf 402CUPS_DEBUG_LEVEL=2 /usr/lib/cups/backend/snmp 2>&amp;1 | tee snmp.log
ef416fc2 403</PRE>
404
b86bc4cf 405<P>For C shell (/bin/csh) and TCsh (/bin/tcsh), use the following command instead:</P>
ef416fc2 406
407<PRE CLASS="command">
b86bc4cf 408(setenv CUPS_DEBUG_LEVEL 2; /usr/lib/cups/backend/snmp) |& tee snmp.log
ef416fc2 409</PRE>
410
b86bc4cf 411<P>On MacOS X you'll find the SNMP backend in /usr/libexec/cups/backend instead:</P>
ef416fc2 412
413<PRE CLASS="command">
b86bc4cf 414CUPS_DEBUG_LEVEL=2 /usr/libexec/cups/backend/snmp 2>&amp;1 | tee snmp.log
ef416fc2 415</PRE>
416
b86bc4cf 417<P>The output will look something like this:</P>
418
419<PRE STYLE="margin-left: 36pt">
420 1 INFO: Using default SNMP Address @LOCAL
421 2 INFO: Using default SNMP Community public
422 3 DEBUG: Scanning for devices in "public" via "@LOCAL"...
423 4 DEBUG: 0.000 Sending 46 bytes to 192.168.2.255...
424 5 DEBUG: SEQUENCE 44 bytes
425 6 DEBUG: INTEGER 1 bytes 0
426 7 DEBUG: OCTET STRING 6 bytes "public"
427 8 DEBUG: Get-Request-PDU 31 bytes
428 9 DEBUG: INTEGER 4 bytes 1149539174
42910 DEBUG: INTEGER 1 bytes 0
43011 DEBUG: INTEGER 1 bytes 0
43112 DEBUG: SEQUENCE 17 bytes
43213 DEBUG: SEQUENCE 15 bytes
43314 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
43415 DEBUG: NULL VALUE 0 bytes
43516 DEBUG: 0.001 Received 55 bytes from 192.168.2.229...
43617 DEBUG: community="public"
43718 DEBUG: request-id=1149539174
43819 DEBUG: error-status=0
43920 DEBUG: SEQUENCE 53 bytes
44021 DEBUG: INTEGER 1 bytes 0
44122 DEBUG: OCTET STRING 6 bytes "public"
44223 DEBUG: Get-Response-PDU 40 bytes
44324 DEBUG: INTEGER 4 bytes 1149539174
44425 DEBUG: INTEGER 1 bytes 0
44526 DEBUG: INTEGER 1 bytes 0
44627 DEBUG: SEQUENCE 26 bytes
44728 DEBUG: SEQUENCE 24 bytes
44829 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
44930 DEBUG: OID 9 bytes .1.3.6.1.2.1.25.3.1.5
45031 DEBUG: add_cache(addr=0xbfffe170, addrname="192.168.2.229",
451 uri="(null)", id="(null)", make_and_model="(null)")
45232 DEBUG: 0.002 Sending 46 bytes to 192.168.2.229...
45333 DEBUG: SEQUENCE 44 bytes
45434 DEBUG: INTEGER 1 bytes 0
45535 DEBUG: OCTET STRING 6 bytes "public"
45636 DEBUG: Get-Request-PDU 31 bytes
45737 DEBUG: INTEGER 4 bytes 1149539175
45838 DEBUG: INTEGER 1 bytes 0
45939 DEBUG: INTEGER 1 bytes 0
46040 DEBUG: SEQUENCE 17 bytes
46141 DEBUG: SEQUENCE 15 bytes
46242 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
46343 DEBUG: NULL VALUE 0 bytes
46444 DEBUG: 0.003 Received 69 bytes from 192.168.2.229...
46545 DEBUG: community="public"
46646 DEBUG: request-id=1149539175
46747 DEBUG: error-status=0
46848 DEBUG: SEQUENCE 67 bytes
46949 DEBUG: INTEGER 1 bytes 0
47050 DEBUG: OCTET STRING 6 bytes "public"
47151 DEBUG: Get-Response-PDU 54 bytes
47252 DEBUG: INTEGER 4 bytes 1149539175
47353 DEBUG: INTEGER 1 bytes 0
47454 DEBUG: INTEGER 1 bytes 0
47555 DEBUG: SEQUENCE 40 bytes
47656 DEBUG: SEQUENCE 38 bytes
47757 DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
47858 DEBUG: OCTET STRING 23 bytes "HP LaserJet 4000
479 Series"
48059 DEBUG: 1.001 Probing 192.168.2.229...
48160 DEBUG: 1.001 Trying socket://192.168.2.229:9100...
48261 DEBUG: 192.168.2.229 supports AppSocket!
48362 DEBUG: 1.002 Scan complete!
48463 network socket://192.168.2.229 "HP LaserJet 4000 Series"
485 "HP LaserJet 4000 Series 192.168.2.229" ""
ef416fc2 486</PRE>
487
b86bc4cf 488<H3>Dissecting the Output</H3>
ef416fc2 489
b86bc4cf 490<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 491
b86bc4cf 492<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 493
b86bc4cf 494<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 495
b86bc4cf 496<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 497
b86bc4cf 498<P>Finally, line 63 shows the device information line for the print server that is sent to CUPS.</P>
ef416fc2 499
b86bc4cf 500<H3>Reporting Problems</H3>
ef416fc2 501
b86bc4cf 502If 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 503
504<PRE CLASS="command">
b86bc4cf 505snmpwalk -Cc -v 1 -c public <I>ip-address</I> | tee snmpwalk.log
ef416fc2 506</PRE>
507
b86bc4cf 508<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 509
b86bc4cf 510<PRE STYLE="margin-left: 36pt">
511HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
512HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: HP LaserJet 4000 Series
ef416fc2 513</PRE>
514
b86bc4cf 515<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>
516
517<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>
518
519
520<H2 CLASS="title"><A NAME="SERVERS">Configuring Print Servers</A></H2>
ef416fc2 521
b86bc4cf 522<H3><A NAME="AXIS">Configuring Axis Print Servers</A></H3>
ef416fc2 523
b86bc4cf 524<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 525
b86bc4cf 526<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 527
528<PRE CLASS="command">
529<KBD>ftp ip-address</KBD>
530Connected to ip-address.
531220 Axis NPS ### FTP Printer Server V#.## MON DD YEAR ready.
532ftp> <KBD>user root</KBD>
533331 User name ok, need password
534Password: <KBD>pass</KBD> <I>(this is not echoed)</I>
535230 User logged in
536ftp> <KBD>get config</KBD>
537local: config remote: config
538200 PORT command successful.
539150 Opening data connection for config (192,0,2,2),
540(mode ascii).
541226 Transfer complete.
542##### bytes received in #.## seconds (##### Kbytes/s)
543ftp> <KBD>quit</KBD>
544221 Goodbye.
545</PRE>
546
b86bc4cf 547<P>Next, edit the file with your favorite text editor and locate the lines beginning with:</P>
ef416fc2 548
549<PRE CLASS="command">
550RTN_OPT. : YES
551RTEL_PR1. : 0
552RTEL_PR2. : 0
553RTEL_PR3. : 0
554RTEL_PR4. : 0
555RTEL_PR5. : 0
556RTEL_PR6. : 0
557RTEL_PR7. : 0
558RTEL_PR8. : 0
559</PRE>
560
b86bc4cf 561<P>Change the <TT>RTN_OPT</TT> line to read:</P>
ef416fc2 562
563<PRE CLASS="command">
564RTN_OPT. : <KBD>NO</KBD>
565</PRE>
566
b86bc4cf 567<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 568
569<PRE CLASS="command">
570RTEL_PR1. : <KBD>9100</KBD>
571RTEL_PR2. : <KBD>9101</KBD>
572RTEL_PR3. : <KBD>9102</KBD>
573RTEL_PR4. : <KBD>9103</KBD>
574RTEL_PR5. : <KBD>9104</KBD>
575RTEL_PR6. : <KBD>9105</KBD>
576RTEL_PR7. : <KBD>9106</KBD>
577RTEL_PR8. : <KBD>9107</KBD>
578</PRE>
579
b86bc4cf 580<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 581
582<PRE CLASS="command">
583<KBD>ftp ip-address</KBD>
584Connected to ip-address.
585220 Axis NPS ### FTP Printer Server V#.## MON DD YEAR ready.
586ftp> <KBD>user root</KBD>
587331 User name ok, need password
588Password: <KBD>pass</KBD> <I>(this is not echoed)</I>
589230 User logged in
590ftp> <KBD>put config CONFIG</KBD>
591local: config remote: CONFIG
592200 PORT command successful.
593150 Opening data connection for config (192,0,2,2), (mode ascii).
594226 Transfer complete.
595##### bytes received in #.## seconds (##### Kbytes/s)
596ftp> <KBD>get hardreset</KBD>
597local: hardreset remote: hardreset
598200 PORT command successful.
599421 Axis NPS ### hard reset, closing connection.
600ftp> <KBD>quit</KBD>
601221 Goodbye.
602</PRE>
603
604<P>Your Axis print server is now ready for use!</P>
605
b86bc4cf 606<H3><A NAME="LINKSYS">Configuring Linksys Print Servers</A></H3>
ef416fc2 607
b86bc4cf 608<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 609
b86bc4cf 610<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 611
612<PRE CLASS="command">
613<KBD>ftp -n ip-address</KBD>
614Connected to ip-address.
615220 Print Server Ready.
616Remote system type is Print.
617ftp> <KBD>get CONFIG</KBD>
618local: CONFIG remote: CONFIG
619200 Command OK.
620150 Open ASCII Mode Connection.
621WARNING! 68 bare linefeeds received in ASCII mode
622File may not have transferred correctly.
623226 Transfer complete.
624##### bytes received in #.## seconds (##### Kbytes/s)
625ftp> <KBD>quit</KBD>
626221 Goodbye.
627</PRE>
628
b86bc4cf 629<P>Next, edit the file with your favorite text editor and locate the lines beginning with:</P>
ef416fc2 630
631<PRE CLASS="command">
6320100 L1_PROUT:P1
6330120 L2_PROUT:P1
6340140 L3_PROUT:P1
635</PRE>
636
b86bc4cf 637<P>Change the port number for each parallel and serial port on the server as follows:</P>
ef416fc2 638
639<PRE CLASS="command">
6400100 L1_PROUT:<KBD>P1</KBD>
6410120 L2_PROUT:<KBD>P2</KBD>
6420140 L3_PROUT:<KBD>P3</KBD>
643</PRE>
644
b86bc4cf 645<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 646
647<PRE CLASS="command">
648<KBD>ftp -n ip-address</KBD>
649Connected to ip-address.
650220 Print Server Ready.
651Remote system type is Print.
652ftp> <KBD>put CONFIG</KBD>
653local: CONFIG remote: CONFIG
654200 Command OK.
655150 Open ASCII Mode Connection.
656226 Transfer complete.
657##### bytes received in #.## seconds (##### Kbytes/s)
658ftp> <KBD>quit</KBD>
659221 Goodbye.
660</PRE>
661
662<P>Your Linksys print server is now ready for use!</P>
663
ef416fc2 664</BODY>
665</HTML>