Infoblox Exchange Cybersecurity Roadshow 2020 – Join us!
North America | Europe | Middle East/Africa | Asia-Pacific

DNS DHCP IPAM

Reply
Accepted Solution

Creating a subdomain when host records already exist

MBoolootian
New Member
Posts: 2
3676     0

Hi folks,

 

I have a lot of host records of the form:

 

www.blah.example.com

fileserve.blah.example.com

ftp.blah.example.com

 

as well as some CNAMEs that look like

 

smile.example.com  CNAME smile.blah.example.com

frown.example.com CNAME frown.blah.example.com

 

etc.  blah.example.com is not actually a proper

subdomain.  The host part on these records is

actually www.blah and smile.blah.

 

What we'd like to do is create a proper subdomain

blah.ucsc.edu.  The question is, what is the easiest

way to proceed?  I assume I will not be able to create

the subdomain as long as the above records exist,

so presumably they have to all be deleted and then

readded.  I'm guessing reconstituting the records using

a CSV that has been modified to account for the new

subdomain would be a good way to accomplish this.

 

Is there some other approach that would be simpler

or less disruptive (since deleting records means DNS

stops working for this stuff until the records are put

back in place)?

 

Thanks in advance for any advice,

mark

Re: Creating a subdomain when host records already exist

[ Edited ]
TTiscareno Community Manager
Community Manager
Posts: 360
3677     0

Hi Mark,

 

Subdomains can be created at any time without impacting existing services, though they won't start serving until services are restarted. Records in existing zones that fall under the new zone will be automatically reparented for you, with the one exception that per the DNS specification (RFC), CNAME records cannot share the same name as the zone name.

 

Regards,

Tony

Re: Creating a subdomain when host records already exist

Adviser
Posts: 86
3677     0

I just tested this scenario where I:

 

1. Created an auth domain called example.com

2. Populated with an A record called smile.blah.example.com and a CNAME pointing to said record called smile.example.com

3. I ran a script to continuously dig the above two records

4. Created a subdomain called blah.example.com

5. As soon as I did this (before even hitting the restart services button) the dig responses failed (which I find odd as it should not do this). After hitting the restart services it started to resolve queries again within 2-5 seconds. 

 

The end result:

- Creating the subdomain subsumed and auto-created/moved the smile.blah.example.com record under the blah.example.com subdomain. The A record effectively became "smile" under the blah.example.com domain.

- The CNAME smile.example.com obviously remained in the parent domain "example.com" and still points to "smile.blah.example.com", which works just as it should.

 

Lessons learned:

- There will be a brief outage when creating the new subdomain, until services restart. So you will want to do this after hours obviously

- If you have a lot of these changes to make you'll probably want to automate this via CSV and/or scripts to auto-service restart

- You should consider downstream name servers that cache your previous response. Assuming the target IPs haven't changed, I can't think of any adverse effects this might have. 

 

Hope this helps.

Jasper

Re: Creating a subdomain when host records already exist

MBoolootian
New Member
Posts: 2
3677     0

 

Sorry for the lag in responding on this.  Thanks to you both for the response, and I tremendously appreciate the time and energy you (Jasper) spent in responding to this.  Very, very helpful!

 

best,

mark

Showing results for 
Search instead for 
Do you mean 

Recommended for You