Installation guide
Chapter 16. Berkeley Internet Name Domain (BIND) 237
over others. The MX resource record with the lowest preference-value is preferred over
the others, but you can set multiple email servers with the same value to distribute email traffic
between them.
The
email-server-name may be a hostname or FQDN, as long as it points to the correct
system.
IN MX 10 mail.domain.com.
IN MX 20 mail2.domain.com.
In this example, the first mail.domain.com email server is preferred to the mail2.domain.com
email server when receiving email destined for the domain.com domain.
• NS — NameServer record, which announces the authoritative nameservers for a particular zone.
This is an example of an NS record:
IN NS
nameserver-name
The nameserver-name should be a FQDN.
Next, two nameservers are listed as authoritative for the domain. It is not important whether these
nameservers are slaves or if one is a master; they are both still considered authoritative.
IN NS dns1.domain.com.
IN NS dns2.domain.com.
• PTR — PoinTeR record, designed to point to another part of the namespace.
PTR records are primarily used for reverse name resolution, as they point IP addresses back to a
particular name. See Section 16.2.2.4 for more examples of PTR records in use.
• SOA — Start Of Authority record, proclaims important authoritative information about a namespace
to the nameserver.
Located after the directives, an SOA resource record is the first resource record in a zone file.
The following example shows the basic structure of an SOA record:
@ IN SOA
primary-name-server hostmaster-email (
serial-number
time-to-refresh
time-to-retry
time-to-expire
minimum-TTL )
The @ symbol places the $ORIGIN directive (or the zone’s name, if the $ORIGIN directive is not
set) as the namespace being defined by this SOA resource record. The primary nameserver that is
authoritative for this domain is used for the primary-name-server , and the email of the
person to contact about this namespace is substituted for the
hostmaster-email .
The serial-number is incremented every time you change the zone file so that named will
know that it should reload this zone. The
time-to-refresh tells any slave servers how
long to wait before asking the master nameserver if any changes have been made to the zone. The
serial-number value is used by the slave to determine if it is using outdated zone data and
should refresh it.
The
time-to-retry tells the slave nameserver the interval to wait before issuing another
refresh request, if the master nameserver is not answering. If the master has not replied to a refresh
request before the time-to-expire elapses, the slave stops responding as an authority for
requests concerning that namespace.
The
minimum-TTL requests that other nameservers cache the zone’s information for at least
this amount of time (in seconds).
With BIND, all times refer to seconds. However, you can also use abbreviations for other units of
time other than seconds, such as minutes (M), hours (H), days (D), and weeks (W). The table in Table
16-1 shows an amount of time in seconds and the equivalent time in another format.