Setting up wide-area AirPrint
Some services, like AirPrint printers, have keys in the TXT record, which the device uses to identify the type of printer and its capabilities. The
dns-sd -Z _ipp._tcp,_universal command browses the local network for AirPrint-capable IPP printers and outputs the results in BIND-compatible zone file format. Copy and paste the PTR/SRV/TXT records for the AirPrint printers you want to make available into your authoritative server’s zone file. You can put the entries into your main zone file, or into a subfile called AirPrint, which you include using the $INCLUDE directive.
AirPrint devices don’t browse for all IPP printers—they browse only for the subset of IPP printers that support Universal Raster Format (URF). To make your printers discoverable by AirPrint devices, you must manually add one more PTR record for each printer. This is identical to the PTR record that is output by the
dns-sd -Z command, except the name has
_universal._sub manually prepended on to it.
Here’s an example of the AirPrint file, with the
_universal._sub line added manually:
@ PTR Office\032Printer\226\128\153s\032Wide\032Area\032Bonjour\032AirPrint\032Printer
_universal._sub PTR Office\032Printer\226\128\153s\032Wide\032Area\032Bonjour\032AirPrint\032Printer
Office\032Printer\226\128\153s\032Wide\032Area\032Bonjour\032AirPrint\032Printer SRV 0 0 631 fqdn-of-printer.example.com.
Office\032Printer\226\128\153s\032Wide\032Area\032Bonjour\032AirPrint\032Printer TXT "txtvers=1" "qtotal=1" "rp=printers/HP_Color_LaserJet_9500" "ty=HP Color LaserJet
9500 MFP" "adminurl=http://foo.example.com.:631/printers/HP_Color_LaserJet_9500" "note=Shared HP CLJ 9500; In DA7/4 Near Howard" "priority=0" "product=(HP color LaserJet 9500
MFP)" "printer-state=3" "printer-type=0xC0B0DE" "Transparent=T" "Binary=T" "Fax=F" "Color=T" "Duplex=T" "Staple=F" "Copies=T" "Collate=T" "Punch=F" "Bind=F" "Sort=F" "Scan=F" "p
dl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf" "air=username,password" "URF=W8,SRGB24,CP255,RS600,DM1"
Here’s an example of the authoritative server’s zone file, with the $INCLUDE directive for the AirPrint list:
b._dns-sd._udp IN PTR @
lb._dns-sd._udp IN PTR @
$INCLUDE AirPrint _ipp._tcp