• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1072
  • Last Modified:

DNAME aliases all hosts except domain's root record

I'm using BIND9, and I've got two domains, one of which I would like to completely alias to the other. For the sake of agrument, we'll call them domain.com, and domain.be. I've got multiple "A" records in the domain.com zone, and only one record in the domain.be zone, a DNAME pointing to domain.com.

i.e.:
=========================================
domain.com:
IN A 123.45.67.89
blah1 IN A 123.45.67.89
blah2 IN A 32.12.34.53
blah3 IN A 93.56.62.34

domain.be:
IN DNAME domain.com.

=========================================

This all works fine, I get responses when looking up blah1/2/3.domain.com, and blah1/2/3.domain.be. HOWEVER, I do NOT get a response when looking up domain.be (i.e., without a hostname, just the domain). Should this DNAME not alias the root record (RR) to domain.com as well? If not, why? And if it IS supposed to, any clue why it's not?

Also, if this is a normal occurrence, is there any way to alternatively point domain.be to domain.com, while keeping the DNAME in order to keep the dynamic aliasing?
0
SirParadox
Asked:
SirParadox
1 Solution
 
Chris DentPowerShell DeveloperCommented:

I believe this is behaviour by design. DNAME exists to map a subtree to a different zone.

Your need for it to map a record at the same level as the DNAME is not discussed at all.

Chris

References: http://www.ietf.org/rfc/rfc2672.txt
0
 
gheistCommented:
DNAME is a macro option (used by BIND) to synthesize CNAME RRs (RESOURCE records, no such thing as ROOT record)
CNAME records in turn do not work for SMTP (both MX and A fallback)
And for NS server names.
For DNS testing it would be useful if you tell your domain name and NS IPs so that we can test.

PS you cannot avoid setting at least 2xNS records for each domain name (one of them for 2nd time in SOA)
PPS for web you need named virtual host and redirect.
0
 
SirParadoxAuthor Commented:
I am aware that CNAME and DNAME can do sub domain elements, but is there a method to map an entire zone including the base domain (A, MX, NS) to another zone? Maybe in the BIND config somehwhere?
0
 
Jan SpringerCommented:
Yes.  In your named.conf zone section for domain.be, use the master file domain.com.

@        IN             A          <IP of domain.com>
host1    IN            A          <IP of host1>
host2     IN           CNAME   host2
host3    etc.
0
 
gheistCommented:
You can use same zone file for other domains.
i.e DNS on old names/addresses, considerations for other services already mentioned.
0

Featured Post

SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now