[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1172
  • Last Modified:

Move one Active Directory Integrated DNS zone into another

We got a misconfiguration in our Active Directory Integrated DNS zones where our root zone (also the root domain) should include all child zones and child domains. One particular zone resides outside the root like shown below:

ASIA.COM
THAILAND.ASIA.COM

Asia.com does contain the domains China.Asia.com, Japan.Asia.com etc, and we'd like to move Thailand in here as well. How would you suggest we go about?

We're using Microsoft Server 2008 R2 as DNS servers.
0
crayonas
Asked:
crayonas
  • 12
  • 9
  • 4
1 Solution
 
SaadAhmedFarooquiCommented:
1 - Export the dns records
2-  delete the zone 'THAILAND.ASIA.COM'
3-  recreate the zone 'THAILAND.ASIA.COM' as a subdomain of 'asia.com'
4-  import the dns records

Note:  

Although this will work but to make sure create a test.asia.com domain, create some dummy records, export it, create the test.asia.com as subdomain and then import it.

After succesful test then do it with the original zone.
0
 
crayonasAuthor Commented:
I'm unable to identify the correct commands to import, could you assist?
0
 
SaadAhmedFarooquiCommented:
23
Jun/09Import or Export a DNS Zone With DNSCMD
by JBrokaw under SBS 2000, SBS 2003, Server 2000, Server 2003
Export

Export the zone Domain.Local. using dnscmd.

dnscmd will automatically export the file to system32\dns\”filename.dns

Usage: DnsCmd <ServerName> /ZoneExport <ZoneName> <ZoneExportFile>

Example: dnscmd /zoneexport Domain.Local Domain.dns

 

Import

Copy the exported DNS Zone file to system32\dns\ folder.

Usage: DnsCmd <ServerName> /ZoneAdd <ZoneName> <ZoneType> [<Options>]……

Example: dnscmd /zoneadd NewDomain.com/primary /file “filename.dns” /load

Reference: http://my-technet.com/index.php/microsoft/server/sbs-2000/import-or-export-a-dns-zone-with-dnscmd/
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
crayonasAuthor Commented:
Keep in mind I'm only working on one server who hosts both zones.
The /file switch does only work for primary zones, I have AD Integrated ones.
I've already looked at the output of DNSCMD, however I was unable to import the DNS file after export.

I used the following command:

DNSCMD /ZONEADD ASIA.COM /DP THAILAND.ASIA.COM /LOAD EXPORT
and recieved the "Command Failed" Followed by Error_Invalid_Parameter 87 0x57.

I've also tried switching THAILAND.ASIA.COM and ASIA.COM to no avail.
0
 
SaadAhmedFarooquiCommented:
I think the zone type in the above command will be "dsprimary" may be the below information is helpful

Example: DNSCMD /ZONEADD THAILAND.ASIA.COM /DSPRIMARY /LOAD EXPORT

I beleive ths would be more helpful:

To reload an Active Directory integrated zone

1.Copy the signed zone file to the %windir%\System32\DNS directory on the authoritative DNS server.

2.Open an elevated command prompt and browse to the %windir%\System32\DNS directory.

3.Type the following command, and then press ENTER:

dnscmd /ZoneDelete <zone name> /dsdel /f

4.Type the following command, and then press ENTER:

dnscmd /ZoneAdd <zone name> <zone type> /file <zone file name> /load

5.Type the following command, and then press ENTER:

dnscmd /ZoneResetType <zone name> /dsprimary
0
 
crayonasAuthor Commented:
The example you provided gave me the same error output.

I do not see how the command will differentiate between the exported ZONE and that I'd like to import it into a DOMAIN...
0
 
SaadAhmedFarooquiCommented:
Ah I found the error in the syntax; syntax is

dnscmd /zoneadd NewDomain.com/primary /file “filename.dns” /load

so we should write:

DNSCMD /ZONEADD THAILAND.ASIA.COM/DSPRIMARY /file "filaname.dns" /LOAD

we did included the /file switch
0
 
Chris DentPowerShell DeveloperCommented:

It won't, you can't use ZoneAdd, it adds a zone not records to an existing zone.

Are all of the records dynamic? Do you really need to import them?

Chris
0
 
crayonasAuthor Commented:
Theres quite a lot of static entries here (2-3 000), and twice or three times dynamic entries. Plus reverse zone.

I was unsuccessful using the last DNSCMD command, if I put a space between THAILAND.ASIA.COM and /DSPRIMARY then I got an error stating "DNS_ERROR_ZONE_ALREADY_EXISTS" 9609 0x2589
0
 
SaadAhmedFarooquiCommented:
1 - are you sure this is not possible via gui? I have done this before on win 2003 but have not done it with win 2008.

2- try deleting the zone 'thailand.asia.com' maybe this comand will create the zone and import the records at the same time.

0
 
crayonasAuthor Commented:
1 - I do not see any export / import option, and googling the issue has shown no plausible solutions (thats why I posted here :)

2 - I tried to delete my test-zone, but was unable to import it into my main zone. Was able to recreate the zone, but that's not what I am interested in.
0
 
SaadAhmedFarooquiCommented:
I will need to test this out on my test server, its an interesting issue and would love to resolve it. so give me a day or two maybe I can come up with a solution.

Meanwhile let me know if you find anything that could help.

note: there is another option using batch file to create records in the new domain.
0
 
SaadAhmedFarooquiCommented:
found a post that described the GUI process

In DNS, Expand your server > Right Click Forward Lookup Zones > New Zone

Select Primary > Next > Zone name (like microsoft.com) > Next > Use Existing File and select your *.dns filenext, next, finish

Once you have done this, you might want to check your SOA record and the Name Servers records for the zone in DNS.

0
 
crayonasAuthor Commented:
Your suggestion to click New Zone seems wrong?
I am integrating a zone into another, and not creating a new zone...
0
 
SaadAhmedFarooquiCommented:
well you have to create a new zone, it cannot be integrated like that, you will need to delete the existing zone and create a new zone in the new place as I suggested in my first post
0
 
crayonasAuthor Commented:
Then you misunderstood my objective - I have two Active Directory Integrated Zones, and they need to be merged.
0
 
SaadAhmedFarooquiCommented:
oh, are they on the same AD domain or different.


0
 
Chris DentPowerShell DeveloperCommented:

Doesn't really make any difference, Merging zones is not something MS do. You have to do it yourself, which means:

1. Exporting or reading the current zone
2. Creating records in the existing zone for each of the old records

It's not the simplest thing in the world to do, but it is possible.

I suggest you let the dynamic entries re-create themselves and concentrate on the static entries.

What kind of records are you dealing with? A and CNAME? Or others as well?

Chris
0
 
crayonasAuthor Commented:
SaadAhmedFarooqui:
Yes, my DNS server has two zones, where one should be a child zone of the other.

Chris-Dent:
A complete zone for a domain (NS, MX, A, CName, etc).
The dynamic entries won't recreate until I remove the zone I'd like to remove.
0
 
Chris DentPowerShell DeveloperCommented:

Obviously you'll be dropping NS and SOA if you're dragging it into an existing zone.

Hmm do you really need it to be part of the parent zone? Seems a bit backwards.

Chris
0
 
crayonasAuthor Commented:
The NS and SOA records (along with other unique ones) will need to reside in the child zone. We have multiple child zones for our multiple child domains, and this one was the odd one out.

All DNS zones are replicated to all DCs in the forest.
0
 
Chris DentPowerShell DeveloperCommented:
> will need to reside in the child zone.

If you have asia.com as the "parent" zone, and Thailand exists within that, i.e. is part of the same zone file, you do not / can not have NS or SOA records.

It makes me a little confused about your expectations. Am I right in thinking you have this?

Forward Lookup Zones
             | -- asia.com
             |          | -- china
             |          | -- japan
             |
             | -- thailand.asia.com

Either way, you're not going to gain much by throwing the content of Thailand into the parent zone. Risk vs Reward doesn't really balance out.

Chris
0
 
crayonasAuthor Commented:
You are correct about the situation today and how it needs to be.
Would it be possible to export all records, manipulate them, and then import all records into the child zone then?
0
 
crayonasAuthor Commented:
Since theres no other input to my question we're bound to do it the manual (hard) way :(
0
 
crayonasAuthor Commented:
No
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

  • 12
  • 9
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now