[dns-operations] Adding CNAME for the root domain issue

Fred Morris m3047 at m3047.net
Fri Apr 29 16:42:07 UTC 2016


So in our last installment, it was seen that a CNAME for a "zone apex" looks 
ok (returns SOA, NS, MX, etc) but it doesn't work with subdomains (FQDNs 
under the apex); and DNAME works for stuff under the "apex" but doesn't look 
like a zone.

To round this out, today I'm going to create a true zone with DNAME... really 
truly is a zone... which doesn't solve the "I want to CNAME the apex" problem 
but it does round out the exercise.


(Why am I doing this? Quite frankly although I work with the DNS on a near 
daily basis, DNAMEs seldom if ever come over the transom. How do they work? 
What are they good for? I figure I'm probably not the only one, and I don't 
see them discussed much.)


So this exercise is a three-parter. In our previous examples we CNAMEd and 
DNAMEd foo.m3047 to bar.m3047, where bar.m3047 is a legitimate (sub) 
domain... err zone.

This time we're going to make foo.m3047 a real zone, which is DNAMEd at the 
apex to bar.m3047. (Zone files are at the bottom).

What we see is that it has valid SOA/MX/A -- it's a valid zone:

;; QUESTION SECTION:
;foo.m3047.                     IN      SOA

;; ANSWER SECTION:
foo.m3047.              600     IN      SOA     HERA.m3047. M3047.M3047.NET. 
120417016 600 60 86400 600


;; QUESTION SECTION:
;foo.m3047.                     IN      MX

;; ANSWER SECTION:
foo.m3047.              600     IN      MX      10 FLAME.m3047.


;; QUESTION SECTION:
;foo.m3047.                     IN      A

;; ANSWER SECTION:
foo.m3047.              600     IN      A       10.0.0.102

And any subdomains are properly rewritten because of the DNAME:

;; QUESTION SECTION:
;x.foo.m3047.                   IN      A

;; ANSWER SECTION:
foo.m3047.              600     IN      DNAME   BAR.M3047.
x.foo.m3047.            600     IN      CNAME   x.BAR.M3047.
x.BAR.M3047.            600     IN      A       10.0.0.111


Ok. Done.

--

Fred Morris

--

$ORIGIN .
$TTL 600        ; 10 minutes
FOO.M3047               IN SOA  HERA.M3047. M3047.M3047.NET. (
                                120417016  ; serial
                                600        ; refresh (10 minutes)
                                60         ; retry (1 minute)
                                86400      ; expire (1 day)
                                600        ; minimum (10 minutes)
                                )
                        NS      HERA.m3047.
                        DNAME   BAR.M3047.
                        MX      10 FLAME.M3047
                        A       10.0.0.102

--

$ORIGIN .
$TTL 600        ; 10 minutes
BAR.M3047               IN SOA  HERA.M3047. M3047.M3047.NET. (
                                120417016  ; serial
                                600        ; refresh (10 minutes)
                                60         ; retry (1 minute)
                                86400      ; expire (1 day)
                                600        ; minimum (10 minutes)
                                )
                        NS      HERA.m3047.
                        MX      0 FLAME.M3047.
                        A       10.0.0.112
$ORIGIN BAR.M3047.
X                       A       10.0.0.111

--




More information about the dns-operations mailing list