DNS configuration problem

Hi all,

I am a beginner in DNS service and I face difficult when configure DNS sub domain using "bind" version 8. So I would like to ask a question about this and hope someone can answer my question.

Is it possible to configure a sub domain in which the name of this sub domain is same as a server of it's parent domain? e.g. A sub domain "sub.example.com" is configured using a zone file and there is also a "A" record, "sub" in "example.com" zone file. If so, where should I place the "sub.example.com" to IP mapping, in "sub.example.com", "example.com" OR both?

Many thanks for your help :slight_smile:

Yes, you can have a sub-domain such as sub.example.com but you don't need to associate an "A" record with it.

You can add sub-domain delegations with the following type of command in the db.example.com zone file

sub    IN NS your-master-dns-servername.example.com.

Then, create a db.sub.example.com zone file which contains the names of servers in the sub.example.com sub-domain (the same as you would as if they were part of example.com).

Add your sub-domain to your conf file. Example, if you have in your named.conf

include "conf.example.com" ;

then in your conf.example.com file, you would need to list both the main zone

zone "example.com" in
        {
             type master;
             file "maps/example.com/db.example.com" ;
};

AND your sub-domains

zone "sub.example.com" in
       {
           type master;
           file "maps/example.com/db.sub.example.com" ;
};

All you are really doing is splitting it up to make it easier for you - DNS could have it all in one file with no issues.

Hi RTM,

The information is really useful to me in both my knownledge and working.
I had implemented the configuration successfully in my working.

Really appreciate and thanks very much to you. :smiley:

Best Regard,
Ray Lai