Airprint upload SS subnets (2)

Source: Internet
Author: User
Tags test dns server

Press: This is another Ashish article about airprint configurations in the Enterprise Environment published on Google sites.

Original article address: airprint upload SS 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 subnetWhat 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.comThis 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 youneed 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 cache        auth-nxdomain no;    # conform to RFC1035        recursion 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_IPADDRlb._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 printserverpname2._printer._tcp        IN SRV 0 0  631 printserverpname1._printer._tcp         IN TXT     ( "txtvers=1"  "qtotl=1"  "rp=printers/PRINTERNAME1" "adminurl=http://printserver:631/printers/PRINTERNAME16_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.ppdJust 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 nameiPAD 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:631You should have something like this in your config file  /etc/cups/cupsd.confServerAlias *# Allow remote accessPort 631Listen /var/run/cups/cups.sockAccessLog syslogAccessLogLevel allLogLevel debugMaxLogSize 0SystemGroup lpadmin# Enable printer sharing and shared printers.Browsing OnBrowseOrder allow,denyBrowseAllow allBrowseRemoteProtocols CUPSBrowseAddress @LOCALBrowseLocalProtocols CUPS dnssdBrowseProtocols allDefaultAuthType 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.Ashishmailto:ashish.logmaster@gmail.comIf you found this REALLY useful and would like to donate some money for future research I would highly appreciate it  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.