System Administration: Another Step toward the BIND - III
Before we take a look at a complete primary zone file, we need to cover background. Consider this background the context where the file itself is content.
Note: None of this may mean much to you until you see the entire text of a zone file. That's OK at this point because when you do see it tomorrow, you can refer back to this information to make sense of it. In the mean time, you may have to humor the editor.
The early information contained in the primary zone file exists to accommodate your secondary or slave server. That's BIND for you. When you look at the SOA entry you will see the information for the secondary server in lines 2 through 6.
The primary zone file contains the bulk of the configuration information DNS needs. The zone file for the example.org domain is pri.example.org. (The pri prefix exists to help you recognize that it's primary.)
If you're using the set of files that our Debian installation provides, you should name your own file after your domain. The file itself reads as follows with an explanation for each entry below it.
@ IN SOA server1.example.org. root.localhost. (
2006012103; serial
28800; refresh, seconds
7200; retry, seconds
604800; expire, seconds
86400 ); minimum, seconds
;SOA refers to "Start of Authority." This term applies to the concept of an authoritative server. By the time you write your part of the DNS distributed directory, the system has handed off authority for part of the entire database to you. So your zone file has to indicate where your authority starts—the domain you are serving.
NS server1.example.org.;
NS server2.example.org.;
;
The above record type specifies the name servers for the domain. These are the ones you specified at registration of the domain.
MX 10 server1.example.org.;
;
The MX record in this section of the file identifies the mail server for the domain.
example.org. A 70.158.253.42 www A 70.158.253.42 server1 A 70.158.253.42 server2 A 70.158.253.45
A record types map a name to an IP address.
The data field of the SOA record contains several components or fields. You need to provide data or answers in the record that will allow another server on the Internet to satisfy its query. I suggest you take some time and study these. The fields include:
Name
The root name of the zone, here just an @ sign. It's a shorthand reference to the current origin (zone) in the /etc/bind/named.conf file.
Class
A number of different DNS classes exist. We will use the IN or Internet class used when defining IP address mapping information for BIND. The other classes exist for non-Internet protocols and functions.
Type
The type of DNS resource record. In this case, this is an SOA resource record.
Name server
The fully qualified name of your primary name server. Must be followed by a period “.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- RSS Feeds
- New Products
- Tech Tip: Really Simple HTTP Server with Python
- Automatically updating Guest Additions
2 min 7 sec ago - I like your topic on android
48 min 35 sec ago - Reply to comment | Linux Journal
1 hour 9 min ago - This is the easiest tutorial
7 hours 24 min ago - Ahh, the Koolaid.
13 hours 2 min ago - git-annex assistant
19 hours 2 min ago - direct cable connection
19 hours 24 min ago - Agreed on AirDroid. With my
19 hours 35 min ago - I just learned this
19 hours 39 min ago - enterprise
20 hours 9 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.



Comments
2 errors in RR descriptions (SOA and A records)
I see two errors in your explaination of resource records. I think these are good articles for their intended audience, but I am concerned about letting these misunderstandings propagate.
(1) The last field in the SOA record is NOT a minimum/default TTL. It is the negative caching TTL, which means it is the TTL used by caching servers when your server answers that a particular name DOES NOT EXIST in your zone file. This is a common error that I think might be a holdover from something that changed in BIND.
The default TTL for resource records that do not include their own is specified at the beginning of the zone file with a $TTL directive.
See the BIND 9 Configuration Reference for additional explanation.
(2) You can have more than one A record for a particular hostname entry in DNS. When queried, the nameserver will return all of the A records for the hostname. However, each time it answers a query for the same hostname, it will change the order in which it returns the addresses. This is known as "round robin DNS" and is used for very simple load balancing.
You can run 'dig www.google.com' a few times in a row to see this in action.