Re: DNS and CNAME

From: David Syzdek <syzdek@mosquitonet.com>
Date: Wed Nov 01 2006 - 19:18:21 AKST

Damien,

I think your problem stems from incorrect use of CNAME and NS records.
A NS record must refer to an A record, it cannot refer to a CNAME
record. The same is true for MX records. You might try this for your zone:

@ IN SOA ns1.testing-linux.com. dhull.testing-linux.com.
          2006110100 10800 900 604800 3600

        IN MX 10 mail.testing-linux.com.
        IN NS ns1.testing-linux.com.
        IN NS ns2.testing-linux.com.

        IN A 69.178.7.134

ns1 IN A 69.178.7.134
ns2 IN A 69.178.7.134
mail IN A 69.178.7.134
www IN CNAME testing-linux.com.

As for just showing CNAME records, try this:

syzdek@hagendaz$ dig @ns1.acsalaska.net controlpanel.acsalaska.net \
> CNAME +nocmd +nocomments +noauthority +nostat +noadditional

; <<>> DiG 9.2.2 <<>> @ns1.acsalaska.net controlpanel.acsalaska.net
CNAME +nocmd +nocomments +noauthority +nostat +noadditional
;; global options: printcmd
;controlpanel.acsalaska.net. IN CNAME
controlpanel.acsalaska.net. 3600 IN CNAME aws02.nwc.acsalaska.net.
syzdek@hagendaz$

--David Syzdek

Damien Hull wrote:
> It works when asking my DNS server.
>
> dhull@dhull-desktop:~$ dig testing-linux.com axfr
>
> ; <<>> DiG 9.3.2 <<>> testing-linux.com axfr
> ;; global options: printcmd
> testing-linux.com. 86400 IN SOA ns1.
> dhull.testing-linux.com. 2006102001 10800 900 604800 3600
> testing-linux.com. 86400 IN MX 10 mail.testing-linux.com.
> testing-linux.com. 86400 IN NS ns1.testing-linux.com.
> testing-linux.com. 86400 IN NS ns2.testing-linux.com.
> testing-linux.com. 86400 IN A 69.178.7.134
> mail.testing-linux.com. 86400 IN CNAME testing-linux.com.
> ns1.testing-linux.com. 86400 IN CNAME testing-linux.com.
> ns2.testing-linux.com. 86400 IN CNAME testing-linux.com.
> www.testing-linux.com. 86400 IN CNAME testing-linux.com.
> testing-linux.com. 86400 IN SOA ns1.
> dhull.testing-linux.com. 2006102001 10800 900 604800 3600
> ;; Query time: 30 msec
> ;; SERVER: 192.168.2.2#53(192.168.2.2)
> ;; WHEN: Wed Nov 1 17:47:46 2006
> ;; XFR size: 10 records (messages 1)
>
>
>
> It doesn't work when asking another server. It has something to do with
> the "r" option. Is there an option that just shows the CNAME?
>
>
> Royce Williams wrote:
>> Damien Hull wrote, on 11/1/2006 11:27 AM:
>>
>>> Can someone tell me if the "CNAME" record in DNS is still used?
>>>
>> Definitely. :)
>>
>>
>>> I've got CNAME entries in BIND so I know they work. The trouble I'm
>>> having is that when I do a "dig" on the domain I don't see them. It only
>>> shows "A" records. Either I'm doing something wrong with "dig" or I'll
>>> have to switch everything to an "A" record. I want to see all my DNS
>>> records when I run "dig".
>>>
>> What's the actual query you're using? If you're asking a full zone
>> transfer (dig @myservername example.net axfr), you'll get the whole
>> enchilada. If you only ask for your domain (dig example.net any),
>> you'll only get the stuff associated directly with your domain name
>> itself (MXes, NS records, and any A or CNAME tied to the domain
>> itself, but no "child" hosts within the domain).
>>
>> ... I think. :)
>>
>> Royce
>>
>>
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>

-- 
While anyone can admit to themselves they were wrong, the true test is
admission to someone else.
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Wed Nov 1 19:18:50 2006

This archive was generated by hypermail 2.1.8 : Wed Nov 01 2006 - 19:18:50 AKST