按:这是Ashish的另外一篇,发布在Google sites上的有关AirPrint在企业环境中的配置。

原文地址:Airprint across subnets

Your company decided to deploy iPad/iPhone.
Now you want to print from the device onto your corporate printer.
You ask Apple and get the usual answer, its not supported.
Hopefully the solutions described below will provide you with a solution.iPad/iPhone use bonjour to discover printers.
Bonjour uses broadcasting, so odds are you cannot see stuff outside the wireless subnet
What you need to do is add a bunch of entries into your DNS and setup a CUPS printserver.
This will now allow the iOS device to discover printers and send print requests.Assumptions:Your internal DNS domain is: foocompany.comWe are going to setup a new subdomain called bonjour.foocompany.com
This allows us to play with DNS.
More importantly, you can use DNS views and show printers relative to the subnet address from where the DNS queries come from.
IE: Building A has subnet A1, Building B has subnet B1.
If a customer is in Building B, you only want to show printers in Building B.
Assuming when a customer is in Building B, they are on subnet B1, you can create a view in DNS that says when
the client ipaddress (of the DNS request) is in subnet B1, used the following DNS entries.In this case I use a Ubuntu Linux server to test out DNS and CUPS.SETUPSetup a test DNS server which forwards all requests to your primary DNS server while supporting the test entries that you
need to play with.
Setup your /etc/bind/named.conf as follows, replace everything that is UPPERCASE with your site specific stuffoptions {directory "/var/cache/bind";forwarders { REALDNSSERVER_IPADDR1 ; REALDNSSERVER_IPADDR1 ;  };forward first;allow-query-cache { any; };  // Allow client queries from other subnet to query from cacheauth-nxdomain no;    # conform to RFC1035recursion yes;
};
zone "bonjour.FOOBAR.COM." {   type master; file "/etc/bind/db.home"; };
zone "FOOBAR.COM" { type forward; forward only; forwarders { REALDNSSERVER_IPADDR1 ; REALDNSSERVER_IPADDR1 ;  };  };setup your /etc/bind/db.home file$TTL 60
@ SOA ns.bonjour.FOOBAR.COM. hostmaster.bonjour.FOOBAR.COM. (2006010102 10800 3600 604800 1)NS ns.bonjour.FOOBAR.COM.
ns      IN A    YOURTESTDNSSERVER_IPADDRprintserver IN A YOURCUPSPRINTSERVER_IPADDR
lb._dns-sd._udp                 IN PTR @
b._dns-sd._udp                  IN PTR @_cups._sub._ipp._tcp            IN PTR pname1._printer._tcp
_universal._sub._ipp._tcp       IN PTR pname1._printer._tcp_cups._sub._ipp._tcp            IN PTR pname2._printer._tcp
_universal._sub._ipp._tcp       IN PTR pname2._printer._tcppname1._printer._tcp                 IN SRV 0 0  631 printserver
pname2._printer._tcp        IN SRV 0 0  631 printserverpname1._printer._tcp         IN TXT     ( "txtvers=1"  "qtotl=1"  "rp=printers/PRINTERNAME1" "adminurl=http://printserver:631/printers/PRINTERNAME1
6_LJ" "ty=HP Laserjet PRINTERNAME1"  "product=(HP LaserJet 4200)"  "transparent=t"  "copies=t"  "duplex=t"  "color=f"  "pdl=application/octet-stream,
application/pdf,application/postscript,image/jpeg,image/png,image/urf" "URF=W8,SRGB24,CP1,RS600" )pname2._printer._tcp                IN TXT     ( "txtvers=1"  "qtotl=1"  "rp=printers/PRINTERNAME2" "adminurl=http://printserver:
631/printers/PRINTERNAME2" "ty=HP PRINTERNAME1"  "product=(HP color LaserJet 4650)"  "transparent=t"  "copies=t"  "duplex=t"  "
color=t"  "pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf" "printer-type=0x801046" "URF=W8,SRGB24,CP1,RS600" )Setup your CUPS server to print to a printer. See http://www.cups.org/
Assuming you setup a printer in CUPS with the queue name PRINTERNAME1, you need to put the same name in DNS above.
In the "product=" key you need to put the model info from the PPD file /etc/cups/ppd/PRINTERNAME1.ppd . grep "*Product:" /etc/cups/ppd/PRINTERNAME1.ppd
Just pick one of many choices for model name, the iPAD does not use it, however OSX on Mac's does.The "ty=" key is used in OSX to display a user friendly name
iPAD however uses the DNS name, in this case the stuff before the "_printer._tcp" part.In CUPS ensure that the printer queue is accessible from your Intranet.
You can check by navigating to http://printserver.bonjour.FOOBAR.COM:631
You should have something like this in your config file  /etc/cups/cupsd.confServerAlias *
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
AccessLog syslog
AccessLogLevel all
LogLevel debug
MaxLogSize 0
SystemGroup lpadmin
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseRemoteProtocols CUPS
BrowseAddress @LOCAL
BrowseLocalProtocols CUPS dnssd
BrowseProtocols all
DefaultAuthType BasicNow setup your ipad network config to point to your test DNS server and add "bonjour.FOOBAR.COM" in your DNS search path.
Try to print from the Photo application.Good luck! If found this information useful, please shoot me an email. It nice to hear that this helped someone.Thanks you for visiting.
Ashish
mailto:ashish.logmaster@gmail.comIf you found this REALLY useful and would like to donate some money for future research I would highly appreciate it ;-)

Airprint across subnets(2)相关推荐

  1. AirPrint: 无交互的后台打印实现(Print without UI,iOS8+)

    前言:AirPrint技术存在已经有了很长的时间,但是对于通常实现来说,每次打印都需要用户在客户端点击选择打印机并确认打印,流程上很不方便.所幸的是apple在iOS8更新了此技术,使其可以支持iOS ...

  2. 无线打印 airprint 服务器,如何让 Windows 的共享打印机支持 AirPrint

    对很多办公室环境来说,局域网共享打印机往往都是刚需,而如果局域网内的设备大多为 Windows 设备,通过 网络共享 的方式就可以轻松将所连接的 USB 打印机共享到局域网. 但对同一个局域网内的 A ...

  3. 软件驱动安装在docker_低成本的无线打印:群晖上通过Docker容器实现Airprint

    原文作者:我的昵称已被注册 群晖NAS得益于高质量的软件设计和方便的使用体验深受家庭用户喜爱. 随着使用场景的扩展,各种功能的发掘也随着需求的增长不断出现.打印虽然是个古老的话题了,但是对于有打印需求 ...

  4. 无线打印 airprint 服务器,Docker容器实现Airprint 打印服务器功能

    本教程可使您的NAS变身打印服务器,使角落里的USB打印机变为网络打印机. 由于Docker镜像(我使用的镜像文件为olbat/cupsd)可定制性高,可以很方便的安装驱动和软件,所以用铁威马系统的D ...

  5. 普通打印机支持的airprint功能

    怎么设置普通打印机也能AirPrint无线打印呢? 苹果iOS系统的AirPrint无线打印功能,可与内置打印支持的应用程序配合使用,使iPhone.iPad更加适用于办公环境,让我们可以随时随地享受 ...

  6. uni-app 系统打印、AirPrint、支持ipad、打印图片 pdf webView文档

    地址:系统打印.AirPrint.支持ipad.打印图片 pdf webView文档 - DCloud 插件市场 系统打印.AirPrint.支持ipad.打印图片 pdf webView文档(ios ...

  7. 铁威马通过Docker容器实现Airprint 打印服务器功能

    本教程可使您的铁威马变身打印服务器,使角落里的USB打印机变为网络打印机. 由于Docker镜像(我使用的镜像文件为olbat/cupsd)可定制性高,可以很方便的安装驱动和软件,所以用铁威马系统的D ...

  8. AirPrint的iPad的优点和缺点

    AirPrint的iPad的优点和缺点 苹果iOS 4.2的AirPrint是最期待的应用程序为iPad 1.现在,您将有附加功能,直接从你的iPad打印电子邮件,文档,照片和网页内容. 就像任何新的 ...

  9. poj 1523(无向联通图的割点)

    结合tarjan算法思想,这题终于写了出来. 同样用dfs将图变成为一颗树,这样可以提供许多有用的性质. 对于一个无向连通图,dfs后的树为只有回边(回边Euv,v是u的祖先)和生成树的边的图. 那么 ...

  10. POJ1523 SPF tanjar割点求块数

    题目链接 这道题求把点割了之后分的块数,在tanjar中每次遇到low[v]>=dfn[u]且u!=pre就是割点,cut[i]表示i是否为割点,block[i]表示删除一个割点i增加的联通分量 ...

最新文章

  1. linux yum配置文件 yum.conf 简介
  2. python用途与前景-python能用来干什么
  3. webshpere下载地址
  4. 从零开始数据科学与机器学习算法-人工神经网络与反向传播-09
  5. 【数字图像处理】四.MFC对话框绘制灰度直方图
  6. MySQL 调优/优化的 101 个建议!
  7. javascript使用_用JavaScript唤醒沉睡的城市
  8. python绘制动态图-数据可视化
  9. 50道编程小题目之【完全平方数】
  10. 兼职做了DB设计和维护的体会(存储过程,视图,函数,范式)
  11. 玩水——西沙:在海的远处,水是那么蓝那么清
  12. Windows下安装 ruby
  13. 机房建设整体设计方案
  14. android 腾讯云im demo,Android 9.0 腾讯云IM无法登陆报错6012
  15. Springboot整合轻量级反爬虫组件kk-anti-reptile
  16. 再爆hzhost6.5虚拟主机管理系统的SQL注入漏洞
  17. VS中未定义标识符cout,endl
  18. 【详解】MySQL分区表,分区的过程,四种分区类型
  19. 互联网晚报 |12/2星期五 | 天猫向ofo及戴威索要5亿借款;优衣库创始人称在中国开3K家店还不够;国美电器回应已被破产清算...
  20. 滤波、信号、数字与模拟、金字塔 一看就懂 教程

热门文章

  1. 3par linux多路径软件,Redhat6.X 配置HP3PAR7200存储多路径过程
  2. C++MFC控件属性的解释
  3. 平面几何----笛沙格定理及其应用
  4. openflow交换机 ryu_ryu—交换机
  5. 工作流引擎的流程业务表设计
  6. 前苏格拉底时期的古希腊哲学流派
  7. 自组织特征映射神经网络(SOM)
  8. 手机注册获取验证码的PHP代码
  9. 掘金新石油:金融知识图谱数据建模实战分享
  10. Hibernate类的继承使用joined-class实现