Sunday, January 11, 2009

Add a forward dns lookup zone on command line

The following illustrates adding a forward DNS lookup zone on command prompt using dnscmd command
1. First, Assume your dns server name is "dnsserver", domain is "myrootdns.com", and the dns zone which is to be created is "dsprimaryzone.myrootdns.com".

2.
Now run the following command to create primary dnszone in DS integrated Active Directory. dnscmd dnsserver /zoneadd /dsprimary dsprimaryzone.myrootdns.com


Also to specify the storage location of zone information ,say domain level, run
dnsserver /zoneadd /dsprimary dsprimaryzone.myrootdns .com /dp /domain

3. To verify the zone is created, run

dnscmd dnsserver /zoneinfo dsprimaryzone.myrootdns.com.
4.To create primary dnszone without integrated in to DS Active Directory(file based), run

dnscmd dnsserver /zoneadd dsprimaryzone.myrootdns.com /primary
5. To Create Primary dns zone and store zone information to a file, do the following
   i. Assume the file to which the zone information to be stored is dsprimaryzone.txt(created

dsprimaryzone.txt can be located at C:\windows\system32\dns)

ii. Run the following to create the dns zone and store info in to this file


dnscmd dnsserver /zoneadd dsprimaryzone.myrootdns.com /primary /file %windir%\system32\dns\dsprimaryzone.txt

Also to create primary from an existing zone file "dsprimaryzone.txt" , run

dnscmd dnsserver /zoneadd dsprimaryzone.myrootdns.com /primary /file %windir%\system32\dns\dsprimaryzone.txt /load

6. To Create Secondary zone for the zone "myrootdns.com"on a second dns server, run the following on the second dns server(Assume the primary dns server ip address is 192.168.1.100)

dnscmd /zoneadd myrootdns.com /secondary 192.168.1.100


Also to store secondary zone information on forest, run

dnscmd /zoneadd myrootdns.com /secondary 192.168.1.100 /dp forest

7. To create stubzone, run


dnscmd /zoneadd myrootdns.com /stub 192.168.1.100 /file mystub.txt


8. To create forwarder dns zone, run

dnscmd /zoneadd myrootdns.com /forwarder 192.168.1.100 /file mystub.txt

Download dnscmd.exe from http://www.microsoft.com/downloads/details.aspx?familyid=6EC50B78-8BE1-4E81-B3BE-4E7AC4F0912D&displaylang=en

1 comments:

Anonymous said...

test comment

Design by infinityskins.blogspot