file zone syntax

John Smith bind at tucows.speedme.com
Wed Jul 12 04:24:52 UTC 2000


sorry everyone, I sure didn't mean to confuse anyone

mydomain.com and 192.168.0.* was used just as an example of hostname and ip
address
plus i do have NS and SOA records i just post one small portions of zone
file..

-----Original Message-----
From: Jim Reid [mailto:jim at rfc1035.com]
Sent: Tuesday, July 11, 2000 11:47 PM
To: John Smith
Cc: bind-users at isc.org
Subject: Re: file zone syntax


>>>>> "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.] If mail can't be delivered to the hostname with the
lowest MX preference value, the host with the next highest preference
value is tried. And so on. If mail is sent to one of these hosts, it
should be stored and forwarded to the lowest precedence value MX
record once it accepts mail again. After all, that host is by
definition the ultimate destination for that mail.

BTW, all of the host/domain names in the above examples probably
should be fully qualified and dot-terminated domain names. If the name
is not dot-terminated, the name server will automatically and silently
append its idea of the current domain name to those unterminated names.




More information about the bind-users mailing list