Use of the @-symbol in zone files.

Joseph S D Yao jsdy at cospo.osis.gov
Wed Aug 8 14:32:04 UTC 2001


On Wed, Aug 08, 2001 at 03:04:53PM +0100, Bjorn Johansson wrote:
...
> Up to now, when I've wanted to make both www.domain.dom and domain.dom,
> point to the same place, I've made two entries in my zone files that
> look like this:
> 
> www     IN      A       111.111.111.111  (IP number just an example IP)
>         IN      A       111.111.111.111

This will, of course, NOT WORK.  The "blank" first field means to use
the same first field as the previous record.  That is, both records
refer to www.WHATEVER.DOMAIN.

> This has always worked fine, so I have no problems with this in
> principal.

Then your "blank" record must have been closer after the SOA record.

...
> www     IN      A       111.111.111.111  (IP number just an example IP)
> @       IN      A       111.111.111.111
> 
> As far as my testing shows, this does what I want it to do, but I just
> wanted to check if this is O.K., or if it may cause problems.
...

This is a perfectly reasonable way to set the domain name to have a
specific IP address.

Note, of course, that the "@" value changes if you use a "$ORIGIN"
directive.

-- 
Joe Yao				jsdy at cospo.osis.gov - Joseph S. D. Yao
OSIS Center Computer Support					EMT-B
-----------------------------------------------------------------------
This message is not an official statement of COSPO policies.


More information about the bind-users mailing list