2

I've been adding about 10 DNS A records a week for the past 2 weeks. After updating a record using nsupdate it occurred to me that maybe I should find a way to separate the DNS A records from the other records in the Zone File. Is this possible? Or do always have to have all the A records in the same zone file.

I guess I could have multiple zone files. Yet if I add these A records using nsupdate it would be alot easier to add a 100 DNS records to one file, have the zone file reference the A record file and then create a new A record. Instead of creating multiple zone files

All of this is in theory and it might not work. Any suggestions?

  • Can you clarify what you're trying to improve with this change? Do you mean moving to smaller component files so that you could add new files instead of editing exist files? – Shane Madden Mar 26 '15 at 21:10
  • Yes smaller component files 1.) Trying to see if it's possible. 2.) Thinking that smaller component files will help organize the A records. 3.) Really trying to understand what larger companies with tons of A records are doing? Are all their A records in one zone file? – Benjamin Jones Mar 26 '15 at 21:18
  • 1
    No, they use a different backend (a relational DB, LDAP, etc) for the DNS server, and maybe even different DNS software. – Florin Asăvoaie Mar 26 '15 at 21:19
1

You can do this using $INCLUDE in your zone file, which will allow you to split the contents of the zone to multiple component files arbitrarily.

See here for more info.

  • Since nsupdate is involved, won't the $INCLUDE get replaced with the contents of its file the next time the zone is frozen and the database is written back to the plaintext file? – Andrew B Mar 26 '15 at 22:07
  • I guess that could work if $INCLUDE directives are allowed as input to the nsupdate client, which I wasn't aware of. If you meant the server though, I'm pretty sure the $INCLUDE will get parsed into its contents at some point. – Andrew B Mar 26 '15 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.