REVERSE DNS HELP

Kevin Darcy kcd at daimlerchrysler.com
Tue Jul 3 23:55:33 UTC 2001


$GENERATE is just a convenience for eliminating repetition of records (typically reverse records) where only a numeric element is different from one record to the next. That $GENERATE directive is semantically equivalent to manually specifying "0 ptr 0.sb10.duracom.net" through "255 ptr 255.sb10.duracom.net".

Unless one actually intends to create a name which starts with "in" (e.g. in.3.2.1.in-addr.arpa), then those "IN"s are syntactically incorrect as you have shown them, i.e. on the very left-hand-side of the resource record. Presumably, there is some whitespace in front of those "IN"s (which you either overlooked or somehow got eaten by your editor/mailer), in which case the "IN" stands for the "INternet" class. Since the _default_ class is "IN", that
particular syntactic element is optional.

Note that whitespace at the beginning of a resource record denotes that the record should "inherit" whatever the last preceding non-whitespace name was. So the interpretation of the first two lines in your second example -- assuming that there is in fact supposed to be whitespace at the beginning of the line -- depends on what resource records preceded those lines.

"@" in a master zone file is shorthand for the zone's "origin", i.e. whatever you loaded the zone *as*. So if your "zone" definition in named.conf is, say:

zone "example.com" {
    type master;
    file "db.example";
};

then "@" in that zonefile stands for "example.com".

For a formal specification of master file syntax (but without the $GENERATE directive, which was added later), see RFC 1035, Section 5, or, for a more up-to-date (including $GENERATE), BIND-specific reference in HTML, see doc/html/master.html in the BIND 8 distribution.

In general, I would recommend obtaining a copy of the O'Reilly book _DNS_and_BIND_, currently in Fourth Edition. It covers all of this and much more, with respect to DNS and setting up and maintaining BIND nameservers.

                                                                                                                                            - Kevin

Kris McElroy wrote:

> I inherited a Linux DNS server.  I received a call today from a user and they said their emails were being rejected by a certain host.  I checked into the problem and found that it was a reverse DNS issue on our part.  My question is I have to styles of reverse dns files listed below:  which one is correct if either and what is the correct (proper) format for a reverse DNS file?  What is the difference between the @ and the IN?  I am very new to DNS!

>
>
> 1st style:
>
> @                       NS       Ns1.duracom.net
> @                       NS       ns2.duracom.net
> $Generate  0-255  $         PTR        $.sb10.duracom.net
>
> 2nd style:
>
> IN                        NS    ns1.duracom.net
> IN                        NS    ns2.duracom.net
> 21                        mail.whatever.com
> 22                        www.whatever.com





More information about the bind-users mailing list