Difference between revisions of "Cups browsing"

From Finninday
Jump to: navigation, search
(Created page with "I'm trying to understand the basics of cups configuration for printing. I have a print server that sees three printers and can print to them locally. It seems like client cups …")
 
Line 2: Line 2:
  
 
I have a print server that sees three printers and can print to them locally.  It seems like client cups instances should be able to easily discover the print server as they are on the same network, but when I use cups admin to find new printers or add a printer, I have to manually construct the proper URL to describe the network shared printer.  Surely it can be easier than that.
 
I have a print server that sees three printers and can print to them locally.  It seems like client cups instances should be able to easily discover the print server as they are on the same network, but when I use cups admin to find new printers or add a printer, I have to manually construct the proper URL to describe the network shared printer.  Surely it can be easier than that.
 +
 +
h3. server and client configuration
  
 
The cups documentation says that it is. (http://www.cups.org/documentation.php/doc-1.6/sharing.html)
 
The cups documentation says that it is. (http://www.cups.org/documentation.php/doc-1.6/sharing.html)
Line 34: Line 36:
  
 
The Listen directive is similar to the Port directive but allows you to restrict access to specific interfaces or networks.
 
The Listen directive is similar to the Port directive but allows you to restrict access to specific interfaces or networks.
 +
 +
h3. firewall configuration
 +
I'm allowing port 631 tcp and udp on my local subnet
 +
 +
h3. network configuration
 +
 +
I found that my broadcast address was not consistent across the subnet and after fixing that, I was able to see broadcasts from the server on the client, but nothing else.  No response.
 +
 +
On a different subnet (at work), I see that auto-discovery works just fine.  When I dump the network during discovery, I see that it is using snmp:
 +
<pre>
 +
08:51:00.416238 IP 10.50.1.101.47631 > 10.50.255.255.snmp:  GetRequest(28)  25.3.2.1.2.1
 +
08:51:00.416900 IP 10.50.100.2.snmp > 10.50.1.101.47631:  GetResponse(37)  25.3.2.1.2.1=25.3.1.5
 +
08:51:00.417004 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(28)  25.3.2.1.3.1
 +
08:51:00.417015 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(32)  E:2699.1.2.1.2.1.1.3.1
 +
08:51:00.417022 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(33)  E:2699.1.2.1.3.1.1.4.1.1
 +
08:51:00.417028 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(25)  system.sysLocation.0
 +
08:51:00.417034 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(30)  E:641.2.1.2.1.2.1
 +
08:51:00.417042 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(33)  E:674.10898.100.2.1.2.1.2.1
 +
08:51:00.417050 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(30)  E:641.2.1.2.1.3.1
 +
08:51:00.417056 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(31)  E:367.3.2.1.1.1.11.0
 +
08:51:00.417062 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(30)  E:128.2.1.3.1.2.0
 +
08:51:00.417078 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(30)  E:hp.2.3.9.1.1.7.0
 +
08:51:00.417313 IP 10.50.1.101.50138 > pdx-dc01.americas.nwea.pvt.domain: 47947+ PTR? 2.100.50.10.in-addr.arpa. (42)
 +
08:51:00.417563 IP 10.50.100.2.snmp > 10.50.1.101.47631:  GetResponse(37)  25.3.2.1.3.1="FS-C5015N"
 +
08:51:00.417860 IP pdx-dc01.americas.nwea.pvt.domain > 10.50.1.101.50138: 47947 NXDomain* 0/1/0 (133)
 +
08:51:00.417877 IP 10.50.100.2.snmp > 10.50.1.101.47631:  GetResponse(148)  E:2699.1.2.1.2.1.1.3.1="ID:FS-C5015N;MFG:Kyocera;CMD:PCLXL,PostScript Emulation,PCL5C,PJL;MDL:FS-C5015N;CLS:PRINTER;DES:Kyocera FS-C5015N;"
 +
</pre>

Revision as of 15:59, 13 August 2012

I'm trying to understand the basics of cups configuration for printing.

I have a print server that sees three printers and can print to them locally. It seems like client cups instances should be able to easily discover the print server as they are on the same network, but when I use cups admin to find new printers or add a printer, I have to manually construct the proper URL to describe the network shared printer. Surely it can be easier than that.

h3. server and client configuration

The cups documentation says that it is. (http://www.cups.org/documentation.php/doc-1.6/sharing.html)

My server is running cups 1.4.4

It looks like the following configuration directives are of interest for the server:

  • Allow

The Allow directive specifies a hostname, IP address, or network that is allowed access to the server. Allow directives are cummulative, so multiple Allow directives can be used to allow access for multiple hosts or networks.

  • BrowseAddress

The BrowseAddress directive specifies an address to send browsing information to. Multiple BrowseAddress directives can be specified to send browsing information to different networks or systems.

The @LOCAL name will broadcast printer information to all local interfaces. The @IF(name) name will broadcast to the named interface.

There is no default browse address.

  • BrowseAllow

The BrowseAllow directive specifies a system or network to accept browse packets from. The default is to accept browse packets from all hosts.

Host and domain name matching require that you enable the HostNameLookups directive.

IP address matching supports exact matches, partial addresses that match networks using netmasks of 255.0.0.0, 255.255.0.0, and 255.255.255.0, or network addresses using the specified netmask or bit count. The /mm notation specifies a CIDR netmask, a shown in Table 1.

The @LOCAL name will allow browse data from all local interfaces. The @IF(name) name will allow browse data from the named interface. In both cases, CUPS only allows data from the network that the interface(s) are configured for - data arriving on the interface from a foreign network will not be allowed.

  • Browsing

The Browsing directive controls whether or not network printer browsing is enabled. The default setting is Yes.

This directive does not enable sharing of local printers by itself; you must also use the BrowseAddress or BrowseProtocols directives to advertise local printers to other systems.

  • Listen

The Listen directive specifies a network address and port to listen for connections. Multiple Listen directives can be provided to listen on multiple addresses.

The Listen directive is similar to the Port directive but allows you to restrict access to specific interfaces or networks.

h3. firewall configuration I'm allowing port 631 tcp and udp on my local subnet

h3. network configuration

I found that my broadcast address was not consistent across the subnet and after fixing that, I was able to see broadcasts from the server on the client, but nothing else. No response.

On a different subnet (at work), I see that auto-discovery works just fine. When I dump the network during discovery, I see that it is using snmp:

08:51:00.416238 IP 10.50.1.101.47631 > 10.50.255.255.snmp:  GetRequest(28)  25.3.2.1.2.1
08:51:00.416900 IP 10.50.100.2.snmp > 10.50.1.101.47631:  GetResponse(37)  25.3.2.1.2.1=25.3.1.5
08:51:00.417004 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(28)  25.3.2.1.3.1
08:51:00.417015 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(32)  E:2699.1.2.1.2.1.1.3.1
08:51:00.417022 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(33)  E:2699.1.2.1.3.1.1.4.1.1
08:51:00.417028 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(25)  system.sysLocation.0
08:51:00.417034 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(30)  E:641.2.1.2.1.2.1
08:51:00.417042 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(33)  E:674.10898.100.2.1.2.1.2.1
08:51:00.417050 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(30)  E:641.2.1.2.1.3.1
08:51:00.417056 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(31)  E:367.3.2.1.1.1.11.0
08:51:00.417062 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(30)  E:128.2.1.3.1.2.0
08:51:00.417078 IP 10.50.1.101.47631 > 10.50.100.2.snmp:  GetRequest(30)  E:hp.2.3.9.1.1.7.0
08:51:00.417313 IP 10.50.1.101.50138 > pdx-dc01.americas.nwea.pvt.domain: 47947+ PTR? 2.100.50.10.in-addr.arpa. (42)
08:51:00.417563 IP 10.50.100.2.snmp > 10.50.1.101.47631:  GetResponse(37)  25.3.2.1.3.1="FS-C5015N"
08:51:00.417860 IP pdx-dc01.americas.nwea.pvt.domain > 10.50.1.101.50138: 47947 NXDomain* 0/1/0 (133)
08:51:00.417877 IP 10.50.100.2.snmp > 10.50.1.101.47631:  GetResponse(148)  E:2699.1.2.1.2.1.1.3.1="ID:FS-C5015N;MFG:Kyocera;CMD:PCLXL,PostScript Emulation,PCL5C,PJL;MDL:FS-C5015N;CLS:PRINTER;DES:Kyocera FS-C5015N;"