Domain same as host name

Kevin Darcy kcd at daimlerchrysler.com
Sat Dec 18 00:08:15 UTC 1999


dharris at kcp.com wrote:

> I have inherited a db file with an entry in it which I do not understand.
> In the db.os file there are entries
>
> @    IN   SOA  homer.os.kcp.com. dtheilen.homer.os.kcp.com. (
>           3014 ; serial
>           3600 ; refresh
>           300  ; retry
>           3600000   ; expire
>           3600 ); minimum
> @    IN   NS   homer.os.kcp.com.
> @    IN   NS   topten.os.kcp.com.
>
> "a bunch of A records"
>
> os.kcp.com.    IN   MX   10   homer.os.kcp.com.
> os.kcp.com.    IN   A    198.62.69.70
>
> It looks like the originator wasn't sure whether to use an MX record or an
> A record to make e-mail addressed to somebody at os.kcp.com go to the right
> place.

No, it looks more like the A record is there for purposes other than mail.
Mailers will prefer the MX record over an A record, but most other protocols
only know about A records. Why have an MX record at all then? Maybe the
originator set things up this way because it was more efficient in the days
when sendmail used to do an MX query, and then if it wasn't found, an A query
(nowadays it does a single ANY query which will get either or both). Or maybe
they did it to smooth the transition, should "homer" ever change its address.

> My question is whether this file will "confuse" named in some way or if I
> can leave it like this until I can untangle my predecessor's actions.

Why would named get confused? It already has SOA and NS associated with the
same name, associating an additional A and a MX record isn't going to faze it
at all.

As a matter of style, however, I prefer to put the A and MX records near the
top of the zone file (near the SOA and NS records), just so it's glaringly
obvious what name they're for. And there's no need to repeat the "@" or
explicitly specify the domain name either: just use leading white space to
"repeat" the (possibly implicit) "@" from the previous line(s). In other
words:

@      IN  SOA homer.os.kcp.com. dtheilen.homer.os.kcp.com. (
                3014 ; serial
                3600 ; refresh
                 300 ; retry
             3600000 ; expire
                3600 ; minimum
       )
       IN  NS  homer.os.kcp.com.
       IN  NS  topten.os.kcp.com.
       IN  A   198.62.69.70
       IN  MX  10   homer.os.kcp.com.
;
homer  IN  A   192.62.69.70
(etc.)

I find this more readable. (Descriptive comments would help, too, especially
when your heir is trying to figure out why you did something a certain way
:-)


- Kevin




More information about the bind-users mailing list