file zone syntax

Kevin Darcy kcd at daimlerchrysler.com
Wed Jul 12 04:09:37 UTC 2000


Jim Reid wrote:

> >>>>> "John" == John Smith <bind at tucows.speedme.com> writes:
>
>     John> i'm trying to setup NS server and i have this question.. I'm
>     John> not sure if it's okay to ask here .. i hope it's okay:)
>
> It is OK, but you should have provided the real domain name and IP
> addresses. You should ALWAYS do this when posting questions here.
> FYI mydomain.com is a real domain name. Are you the real owner of that
> name or just using that as a bogus name to hide your actual domain
> name and confuse everyone?
>
>     John> in file zone I have
>
>     John> Begining of Example 1
>
>     John> www.mydomain.com IN A 192.168.0.1
>     John> www.mydomain.com IN A 192.168.0.2
>     John> www.mydomain.com IN A 192.168.0.3
>
>     John> End of Example 1
>
>     John> or would be just right to have something like this
>
>     John> Begining of Example 2
>
>     John> mydomain.com IN A 192.168.0.1
>     John> mydomain.com IN A 192.168.0.2
>     John> mydomain.com IN A 192.168.0.3
>     John> mydomain.com IN CNAME www.mydomain.com
>
>     John> End of Example 2
>
>     John> which one would be "more" right example 1 or example2
>
> The first. Presumably mydomain.com is a real domain name. It will
> therefore have NS records and a SOA record. If so, you cannot have a
> CNAME for mydomain.com. A name that exists as a CNAME cannot exist as
> any other record type unless you're doing DNSSEC in which case SIG,
> KEY and NXT records for CNAMEs are OK.
>
>     John> i have MX Records
>
>     John> mydomain.com. IN MX 10 192.168.0.1
>     John> mydomain.com. IN MX 10 192.168.0.2
>     John> mydomain.com. IN MX 20 192.168.0.3
>
>     John> would that be right?
>
> No.
>
>     John> i want traffic to be shared between first two ips and if
>     John> they wont handle it traffic will switch to 3rd ip
>
> That's not what happens. First of all the target of an MX record is a
> hostname - something that exists as an A record - not a dotted-decimal
> IP address. Secondly, mail gets delivered to the host that has the
> lowest preference value. When there are two or more hosts of the same
> preference values, mail can be delivered to either of them. [This will
> tend to load balance because name servers round-robin their answers.
> So if there were two equal preference values, half the answers would
> list serverA first and half would list serverB first. Most mail
> programs will just connect to the first hostname in the answer - all
> other things being equal - so mail delivery gets split equally between
> the two servers.]

Actually, according to RFC 1123, Section 5.3.4 (1), when faced with MX
targets of equal preference, the sender-SMTP "SHOULD" choose the first one
_randomly_, all other things being equal. (Oddly enough, the RFC says
nothing about how to choose the second through "n"th choices when there
are more than 2 records at the same preference, but I've always assumed
that these were to be chosen at random also). So, for mailers that obey
the RFC in this regard (sendmail does, last time I looked), the
round-robin behavior of DNS has no effect on MX target selection.


- Kevin




More information about the bind-users mailing list