DNS Records

Chip Old fold at bcpl.net
Fri Apr 6 20:45:51 UTC 2001


On Fri, 6 Apr 2001, Adam Lang wrote to bind-users at isc.org:

> You're correct about the MX and bush.  people will be sending mail to
> @rutgersinsurance.com and not to @mail.rutgersinsurance.com.
> So does that mean then
>
> bush     A    38.138.71.194
> www    cname    bush
> mail        cname    bush
>
> is ok?

Still not good.  You now have no MX record at all, so mail WON'T get
delivered to @rutgersinsurance.com.  You'll have to use specific machine
names in your addresses.  It's not completely clear what you're trying to
do since we don't know the SOA, but here's a workable example using the
CNAMEs you want:

$TTL 21600  ; Default TTL 6 hours
xyz.com.  IN  SOA  ns1.xyz.com.  dnsadmin.xyz.com. (
                             2001040600      ; Serial Number
                             21600   ; Refresh after 6 hours
                             3600    ; Retry after 1 hour
                             1728000 ; Expire after 20 days
                             3600 )  ; Minimum TTL 1 hour

             IN      NS      ns1.xyz.com.
             IN      NS      ns2.xyz.com.

             IN      MX      10      bush.xyz.com.
             IN      MX      100     somethingelse.xyz.com.

bush         IN      A       38.138.71.194
www          IN      CNAME   bush
mail         IN      CNAME   bush

The NS and MX records apply to all of xyz.com because they immediately
follow the SOA record.  If the MX record followed an A record (like the
"bush" one), it would apply only to that machine.  Mail addressed to
user at xyz.com wouldn't get delivered because the sending MTA woulnt's find
an MX record that applies to the whole domain.

After everything that has to apply to the whole zone has been declared,
THEN you start entering records for specific machine names.

You can use CNAME records for www and mail, as above.  Or you can use A
records, like this:

bush         IN      A       38.138.71.194
www          IN      A       38.138.71.194
mail         IN      A       38.138.71.194

There are valid arguments in favor of doing it both ways (and some
circumstances where only one way or the other is suitable), but for the
kind of thing I think you're trying to do most DNS admins prefer to use
CNAMES as shown in the first example, not multiple A records for the same
IP address.

-- 
Chip Old (Francis E. Old)               E-Mail:  fold at bcpl.net
Manager, BCPL Network Services          Voice:   410-887-6180
Manager, BCPL.NET Internet Services     FAX:     410-887-2091
320 York Road
Towson, Maryland 21204 U.S.A.



More information about the bind-users mailing list