That means that this unterminated hostname example expands to example. We're referring to this hostname example as "unterminated" because it doesn't end in a dot. The next argument we see is IN , short for "Internet. There are other DNS record classes, but you can easily go your entire career without seeing one of them such as CH , for Chaos in production.
We recommend not omitting it, however, lest something change and all your zone files suddenly be broken after a BIND update! The next two arguments are FQDNs—at least, they look like it. Note that you can use unterminated hostnames here—for example, we could have just used ns1.
The second FQDN, hostmaster. Instead, it's a perverse way of rewriting an email address. It's incredibly common to see this screwed up in real-life zone files—thankfully, it doesn't much matter. We're not aware of literally anyone who actually uses this feature of a DNS zone to contact anyone. Moving on, we have serial , refresh , retry , expire , and negative TTL for the zone inside parentheses.
Note that the comments you see here labeling them are not required—and in real life, you'll rarely see them. We strongly prefer to put these comments in production zone files in order to make it easier to read them, but BIND itself doesn't care! One of the most common areas for confusion in the SOA record is what effect the refresh , retry , and expire arguments have. These arguments don't affect DNS resolvers at all—only secondary authoritative nameservers for the domain.
One final note: older versions of BIND required all of these times to be in seconds BIND9—released almost 20 years ago, in October —supports human-readable time sufffixes such as "m" for minutes, "h" for hours, and "d" for days. Please use these human readable suffixes when writing zone files; nobody should have to break out a calculator to figure out that 86, seconds is one day! In these two records, we define the hostnames, which are authoritative nameservers for our zone. Once again, we've used dot-terminated FQDNs for these records.
Once again, we could have used unterminated hostnames— ns1. Doing so would make the zone more confusing and difficult to read, though. Caching of negative answers can be set to a maximum of 3 hours that is, 3H. When configuring BIND, all times are specified in seconds. However, it is possible to use abbreviations when specifying units of time other than seconds, such as minutes M , hours H , days D , and weeks W.
Comment Tags. Additionally to resource records and directives, a zone file can also contain comments. Comments are ignored by the named service, but can prove useful when providing additional information to the user.
Any text after the semicolon character to the end of the line is considered a comment. For example:. Example Usage. A Simple Zone File. In this example, the authoritative nameservers are set as dns1. The email servers configured with the MX records point to mail and mail2 via A records.
Services available at the standard names, such as www. A reverse name resolution zone file is used to translate an IP address in a particular namespace into an fully qualified domain name FQDN.
It looks very similar to a standard zone file, except that the PTR resource records are used to link the IP addresses to a fully qualified domain name as shown in Example In this example, IP addresses There is very little difference between this example and a standard zone statement, except for the zone name. But it doubles the number of requests made to the nameserver, thus making it an inefficient way to do so.
Multiple MX records can exist if multiple mail servers are responsible for that domain. IN MX 10 mail. This is where Primary and Secondary servers are defined.
Stealth servers are intentionally omitted. IN NS ns. This is due to the server caching the query. Simply replace example. Change Also, create an A record for ns. If you make multiple changes before restarting BIND9, simply increment the serial once. Now, you can add DNS records to the bottom of the zone. A Reverse zone allows DNS to convert from an address to a name.
Also, name the zone file db. Now create the db. The serial number in the reverse zone needs to be incremented on each changes as well. FTP and Web services, available at the standard ftp. This zone file would be called into service with a zone statement in the named.
It looks very similar to a standard zone file, except that PTR resource records are used to link the IP addresses to a fully qualified domain name. In the following example, IP addresses There is very little difference between this example and a standard zone statement, except for the zone name. Note that a reverse name resolution zone requires the first three blocks of the IP address reversed followed by. This allows the single block of IP numbers used in the reverse name resolution zone file to be associated with the zone.
Zone File Directives. Zone File Resource Records. IN MX 10 mail. IN MX 20 mail2. NS This refers to the NameServer record, which announces the authoritative nameservers for a particular zone. IN NS dns1. IN NS dns2. SOA This refers to the Start Of Authority resource record, which proclaims important authoritative information about a namespace to the nameserver.
0コメント