0

I am trying to add a file backed zone on microsoft dns via dnscmd. I have a zone file in c drive,

c:\Windows\zones\test.com.dns

Upon entering the command,

dnscmd /zoneadd test.com /primary /file c:\Windows\zones\test.com.dns

the zone is added correctly, the entry in boot file is,

primary  test.com     c:\Windows\zones\test.com.dns

the zone is added but the records in the zone are not the ones which are in the file, instead, the records are added automatically by the server.

I see the records by the command,

dnscmd /zoneprint test.com

which displays,

;      Zone version:  1
;

@ IN  SOA test-dc01.testgcs01.com. hostmaster.testgcs01.com. (
                            1            ; serial number
                            900          ; refresh
                            600          ; retry
                            86400        ; expire
                            3600       ) ; default TTL

;
;  Zone NS records 
;

@ NS    test-dc01.testgcs01.com.

;
;  Zone records
;

These are not the records in my zone file, but they are assigned internally somehow.

Can someone please point what I am doing wrong here, as I want the zone records to be the one that are in the file.

Anss
  • 313
  • 1
  • 4
  • 11
  • I'm assuming that you're referring to the SOA and NS records? Did you expect it to create an authoritative zone with different SOA and NS records? – joeqwerty Nov 06 '14 at 15:57
  • Yes I do, SOA, NS, and all the other RR records specified in the file. – Anss Nov 07 '14 at 10:35

1 Answers1

1

I got the answer to this, the zone file has to be in C:\Windows\System32\dns folder(which is the default working directory for dnscmd), and there should be a /load statement at the end on the /zoneadd command. Here's how,

dnscmd /zoneadd test.com /primary /file test.com.dns /load

This works.

Anss
  • 313
  • 1
  • 4
  • 11