Batch File

You will need to create reverse lookup zones that correspond to all the different subnets that your iOS devices will be associated with, and put 2 PTR records in each zone.

We have written the DOS batch file below that will do the right thing for you.

Example: Let’s say you have a DNS server at and the subnet that you would like to configure is and you name the batch file dns_setup.


If you run this batch file on the same machine as the DNS Server:

dns_setup .

It will create a reverse zone, and create 2 PTR records in that zone, b._dns-sd._udp and lb._dns-sd._udp. 

Use this batch file to create your Reverse Lookup Zones and add PTR records.

Batch file:

@echo off

if [%1]==[] (

echo Usage: %0 server subnet 1...subnet n

exit /b


set server=%1



if not "%1" == "" (

call :setup %1


GOTO again




for /F "tokens=1,2,3,4 delims=. " %%a in ("%1") do (

dnscmd %server% /ZoneAdd /DsPrimary

dnscmd %server% /RecordAdd b._dns-sd._udp PTR %%d.%%c.%%b.%%a.dnssd.presto.

dnscmd %server% /RecordAdd lb._dns-sd._udp PTR %%d.%%c.%%b.%%a.dnssd.presto.



Feedback and Knowledge Base