Sharing Linux Printers Across Subnets - page 3
Printing Is Still Vexatious. But We Can PrevailPick one computer in the 192.168.2.0/24 network to act as your "relay" server; it will contact the printer server and then relay its printers to the rest of the 192.168.2.0/24 subnet. Just add these lines to cupsd.conf:
BrowsePoll 192.168.1.10 BrowseRelay 127.0.0.1 192.168.2.255
# Allow shared printing Order allow,deny Allow 192.168.2.0/24
Restart CUPS, and in half a minute or so all the computers on 192.168.2.0/24 should see all the printers that are physically attached to the server at 192.168.1.10. What if you have more than one printer server to share? Then add a line for each server like this:
BrowsePoll 192.168.1.10 BrowsePoll 192.168.1.15 BrowsePoll 192.168.1.20 BrowseRelay 127.0.0.1 192.168.2.255
You can easily test all of this from the comfort of your secret armored underground network administrator lair, because of course you have OpenSSH set up all over your network so that you can securely log in to all hosts and do stuff. First log into your relay computer, then use lpstat to see what printers are available:
$ lpstat -v device for HP_LaserJet_3050: ipp://uberpc.alrac.net:631/printers/HP_LaserJet_3050 device for HP_LaserJet_6L_LPT_parport0_HPLIP: ipp://xena.alrac.net:631/ printers/HP_LaserJet_6L_LPT_parport0_HPLIP device for tp0: ipp://uberpc.alrac.net:631/printers/tp0Now that is a happy sight; you can see printers from two different printer servers. You can see if they are ready to use:
$ lpstat -a HP_LaserJet_3050 HP_LaserJet_3050 accepting requests since Tue 18 Dec 2007 07:07:39 PM PST
You can even print a test page remotely:
$ lpr -P HP_LaserJet_3050 /etc/cups/cupsd.conf
CUPS relies on polling to notify the entire network about what printers are up. By default each CUPS server send out an 80-byte broadcast packet every thirty seconds. If this gets to be too much, or if your printer setup doesn't change very often, you can change this behavior:
BrowseInterval 360 BrowseTimeout 600This polls the network every six minutes, and if any CUPS server does not respond within ten minutes it is removed from the browse list.
So there you are- as easy as falling over and a lot more fun.
ResourcesCUPS has bales of documentation; click the Documentation/Help tab in your CUPS Web interface, and visit CUPS Documentation
- Skip Ahead
- 1. Printing Is Still Vexatious. But We Can Prevail
- 2. Printing Is Still Vexatious. But We Can Prevail
- 3. Printing Is Still Vexatious. But We Can Prevail
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: RHEL 6.5, Debian 7.2 and EOL for Linux 3.0.x
- 5Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10