Use of the @-symbol in zone files.
Bjorn Johansson
bjorn at bitforge.com
Wed Aug 8 15:10:43 UTC 2001
In message <20010808103204.P18500 at washington.cospo.osis.gov>, Joseph S D
Yao <jsdy at cospo.osis.gov> writes
>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.
>
You are right, I oversimplified my example.
The 'blank' record was inserted after the name server records and before
any MX, A or CNAME records.
The zone files where used for multiple domains, so they where intended
to point www.whatever.domain and whatever.domain.
>...
>> 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.
>
If by this you mean, that if we have multiple records in our named.conf
file, say for domain1.dom and domain2.dom, which all point to the same
zone file.
When a query comes in for domain1.dom, it will return a response saying
that the IP No. for domain1.dom is 111.111.111.111 and when a query
comes in for domain2.dom, it will return a response saying that the IP
No. of domain2.dom is 111.111.111.111.
Then this is the correct behaviour.
Thanks for your comments.
Regards,
--
Bjorn Johansson
More information about the bind-users
mailing list