I have a CUPS server with two print queues defined. Once this was defined, all the CUPS clients on the same subnet could see the two print queues automatically, no problem.
Now I have a collection of machines on a separate subnet, reachable from the first subnet by a router.
How do I enable CUPS browsing on the second set of machines so that they can see the print queues defined on the first machine?
Let's call the server A.B.C.7. The first subnet is A.B.C.0/24. The second subnet is A.B.D.0/24, and there is a router with arms on both networks.
The 'native' way is to have a CUPS server (they don't need printers, just the CUPS software) on each subnet, and configure those servers to act as a Browse Relay server. The configuration would be
That CUPS-running server will then respond to subnet-local browse requests with the remote server.
There is also a way to do it via multicast and the Service Location Protocol, but it isn't documented well at all.
cups 1.6 used dnssd. This multicast to 224.0.0.251 port 5353. As router are not allowed to forward 224.0.0.251 the packets are stuck on the gateway border.
You could use avahi-daemon mDNS reflector feature on the gateway .
NB: If you nat at the gateway you will need to set NONAT for packets incoming from the parent network. In shorewall/masq file:
avahi-daemon.conf on the router
PS: One could need to mangle the packets to increase Time To Live. This is a topic that needs more investigations though here are the shorewall/start, raw iptables tweaks:
ttl_inc: any number starting from one. I use twenty locally though it is not set in stone. Mostly depends on the number of routers crossed in between printer and client station.
Gnome control center "printers" here send a ttl f 255 (the maximum) so it is not required.
As far as I know there is no way to automatically make it available to other clients that are not on the same subnet. CUPS announces itself with multicast dns packets. You can still use the printer from another subnet (if the access controls are right), but you have to add it manually refering to by its IP address.