AirPrint Using DNS-SD – Setup details
This guide goes through the basic configuration that is required to get an AirPrint enabled printer (whether that be through the device directly or through an application which is publishing queues as AirPrint printers) available so that it can be accessed and used by an Apple client that is on a totally different broadcast domain.
After working this out and getting it to work successfully, I worked on creating the DNS-SD Parser application which automates much of this process and then creates a script which creates the required DNS records for you. Click here for more information on this project.
Substitute example.com with the actual domain name.
1. Create new domain under the primary domain called ‘airprint’
2. Create PTR records to advertise this domain as offering dns-sd services.
Host IP: lb._dns-sd._udp.airprint.example.com
Host Name: airprint.example.com
Host IP: b._dns-sd._udp.airprint.example.com
Host Name: airprint.example.com
3. Get the details of Airprint printers on the network.
a. Log in to a machine which is on the same broadcast domain as the printers that you want to publish.
b. From command prompt, run ‘dns-sd –Z _ipp._tcp’
c. Wait a few seconds. When it appears that output has stopped, press Ctrl+C to quit as the output does not stop automatically. It carries on scanning for new devices indefinitely.
d. Copy the output to notepad as it is easier to work with. You should see a block for each airprint printer.
4. Create the records below for each printer by right clicking the airprint.example.com domain
a. Create a SRV record
i. The domain should show airprint.example.com
ii. The Service should be entered as ‘MyPrinterName._ipp
iii. The Protocol should be ‘_tcp’
iv. The Priority, Weight and Port Number can be found by looking for SRV in the text file above.
v. The Host Offering can also be found by looking after the numbers in the text file.
b. Create a TXT record
i. The record name should be entered as ‘MyPrinterName._ipp._tcp
ii. The Text should be copied from the output of the dns-sd command above. Each section in quotes should be put on a separate line, else the record will be truncated.
c. Create a PTR record
i. In Host IP number enter ‘_ipp._tcp’
ii. Enter ‘MyPrinterName._ipp._tcp.airprint.example.com’ on the host name.
d. Create another PTR record
i. In Host IP number enter ‘_universal._sub_ipp._tcp’
ii. Enter ‘MyPrinterName._ipp._tcp.airprint.example.com’ on the host name
This is the output from a network with one machine on it. It shows the initial DNS-SD output,p and how this is broken up in to the different records that you need to create.
Output from dns-sd –Z _printer._tcp
_printer._tcp PTR KONICA\032MINOLTA\032biz
KONICA\032MINOLTA\032bizhub\032C252(53:8E:1B)._printer._tcp SRV 0 0 515 KMC2
52.local. ; Replace with unicast FQDN of target host
KONICA\032MINOLTA\032bizhub\032C252(53:8E:1B)._printer._tcp TXT "txtvers=1"
"qtotal=2" "usb_MFG=KONICA MINOLTA" "usb_MDL=C252/C252P" "rp=print" "priority=50
" "ty=KONICA MINOLTA bizhub C252" "product=KONICA MINOLTA C450 PS(P)" "pdl=pdl=a
pplication/postscript" "adminurl=http://192.168.16.4/" "Transparent=T" "Binary=T
PTR Record Details
_printer._tcp PTR KONICA\032MINOLTA\032bizhub\032C252(53:8E:1B)._printer._tcp
SRV Record Details
KONICA\032MINOLTA\032bizhub\032C252(53:8E:1B)._printer._tcp SRV 0 0 515
TXT Record Details
"ty=KONICA MINOLTA bizhub C252"
"product=KONICA MINOLTA C450 PS(P)"