CUPS 浏览协议的替代

CUPS 浏览协议的替代

CUPS“浏览”协议被标记为已弃用,并在 CUPS v1.6 中删除,原因是广播问题和托管网络/WiFi。它是一种 UDP 协议,用于广播 CUPS 服务器上已安装打印机的信息并共享它们。

下图简单地描述了使用此协议的网络和打印机传播:

             Browse Protocol                                            
                                                                        
                 *Printers are shared as ipp pools on the printserver* 
+-----------+                                                           
|CUPS Client|  ipp://printserver/printer01, ipp://printserver/printer02 
|1.3.7      +--------+                                                  
|           |        |      +------------------+                        
+-----------+        |      |                  |                        
                     +------>   Printserver    |                        
+-----------+        |      |   CUPS 1.5.3     |                        
|CUPS Client|        |      |                  |                        
|1.5.3      |        |      +------+---------+-+                        
|           +--------+             |         |                          
+-----------+                      |         | ipp://printer01          
                        smb://printer02      |                          
                                   |         |                          
                         +---------v-+    +--v-------+                  
                         |           |    |          |                  
                         |Printer 02 |    |Printer 01|                  
                         |           |    |          |                  
                         ++----------+    +----------+                  
                 *Printserver connects to them using                    
                  all kinds of protocols*                               
                                                                        
  • 服务器在同一VLAN上有接口,以进行打印机的zeroconf传播;
  • 客户(其中一些)拥有通过lpr.他们的本地cups有打印机指向打印服务器;
  • 打印服务器每 60 秒宣布(广播)新打印机并更改一次;

我们有大约 10 个客户端使用这些打印服务器轮询,而打印服务器本身连接到 250 台打印机。由于在每个客户端上添加打印机并不是一项令人愉快的任务,并且由于较新打印机的驱动程序问题,CUPS 需要更新,我问:

问题:是否有浏览协议的替代方案以分布式方式添加打印机?

需要保留此架构的原因:

  • 有了这个集中式打印服务器,我可以通过脚本进行作业统计并通过电子邮件发送它们。同步打印机但让客户端直接打印到它们将是一个“足够好”的解决方案,但不是最好的;
  • 在一台服务器上轻松管理打印机;
  • 安全。由于它是虚拟化环境,我可以决定哪个服务器将在同一 VLAN 上有一个接口,打印服务器会广播它的池/打印机;
  • 我们的支持人员接受过使用默认的 cups 管理页面 ( ) 添加和共享打印机的培训http://printserver:631,但他们根本无法访问 shell。这就是为什么像添加这样的解决方案一项 avahi 服务对于每台打印机来说都不是好的选择。

答案1

这完全没有经过我自己的测试,但我能够找到这个线程,这听起来像是解决您的问题的可能方法。在论坛帖子中标题为:首页» 网络、服务器和保护» CUPS (libcups) 1.6 打印问题的解决方案

摘抄

大家好,我在这里和其他地方阅读了无数关于 CUPS 1.6 的一个非常令人沮丧的功能的帖子:显然您不能像我们过去那样单独使用 libcups 来浏览网络中的现有打印机。即使您知道本地 CUPS 服务器的地址也不会。您需要安装cups服务器包。

我花了很多时间试图找到解决这个问题的方法,因为这真的很烦人。

我很高兴地说我找到了一个非常简单的解决方案:

  1. 你只需要 libcups (1.6),和原来一样
  2. 您需要编辑/etc/cups/client.conf~/.cups/client.conf并添加此行(我猜 /version 添加了与旧 CUPS 服务器的互操作性):

      ServerName foobar/version=1.1
    

显然这是一个尚未记录的新选项。感谢 Ubuntu 人员,我就是在那里找到它的:https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1069671

如果有人编辑维基以添加此内容,我将不胜感激。我现在正在路上。否则,我会在下周晚些时候做。

使此粘性也可能是合适的。

干杯!

参考

答案2

cups-browsed 已针对 debian 进行了打包,旨在使用 mdns 添加等效功能。

相关内容