Page 117 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 117
Unit 6: Domain Name System
DNS records (aka zone records) for a domain are stored in the domain’s zone file on the notes
authoritative DNS servers. Naturally, it is stored on the DNS servers of whatever Web hosting
service is hosting your domain’s Web site. However, if you have your own Web server (rather
than using a Web hosting service) the DNS records could be hosted by you using your own
authoritative DNS servers (as in MIT’s case), or by a third party like EasyDNS.
In short, the name servers you specified in your domain record host the domain’s zone file
consisting the zone records. The name servers, whether they be your Web hosting provider’s, those
of a third party like EasyDNS, or your own, which host the domain’s zone file are auhoritative
DNS servers for the domain.
Because DNS is so imperative to the operation of the Internet, when you register a domain name
you must specify a minimum of two name servers. If you set up your own authoritative DNS
servers for your domain you must set up a minimum of two of them (for redundency) and these
would be the servers you specify in your domain record. While the multiple servers you specify
in your domain record are authoritative for your domain, only one DNS server can be the primary
DNS server for a domain. Any others are “secondary” servers. The zone file on the primary DNS
server is “replicated” (transferred) to all secondary servers. As a result, any changes made to
DNS records must be made on the primary DNS server. The zone files on secondary servers
are read-only. If you made changes to the records in a zone file on a secondary DNS server they
would simply be overwritten at the next replication. As you will see below, the primary server
for a domain and the replication frequency are specified in a special type of zone record.
Early on in this page we said that the DNS zone records are stored in a DNS database which we
now know is called a zone file. The term “database” is used quite loosely. The zone file is actually
just a text file which you can edit with any text editor. A zone file is domain-specific. That is, each
domain has its own zone file. Actually, there are two zone files for each domain but we’re only
concerned with one right now. The DNS servers for a Web hosting provider will have many zone
files, two for each domain it’s hosting zone records for. A zone “record” is, in most cases, nothing
more than a single line in the text zone file.
There are different types of DNS zone records. These several record types give you flexibility in
setting up the servers in your domain. The most common types of zone records are:
1. An A (Address) record is a “host record” and it is the most ordinary type. It is simply a
static mapping of a hostname to an IP address. A common hostname for a Web server is
‘www’ so the A record for this server gives the IP address for this server in the domain.
2. An MX (Mail eXchanger) record is specially for mail servers. It’s a special type of service-
specifier record. It identifies a mail server for the domain. That’s why you don’t have to
enter a hostname like ‘www’ in an e-mail address. If you’re running Sendmail (mail server)
and Apache (Web server) on the same system (i.e. the same system is acting as both your
Web server and e-mail server), both the A record for the system and the MX record would
refer to the same server. To offer some fail-over protection for e-mail, MX records also
have a Priority field (numeric). You can enter two or three MX records each pointing to a
different mail server, but the server specified in the record with the highest priority (lowest
number) will be chosen first. A mail server with a priority of 10 in the MX record will
receive e-mail before a server with a priority of 20 in its MX record. Note that we are only
talking about receiving mail from other Internet mail servers here. When a mail server is
sending mail, it acts like a desktop PC when it comes to DNS. The mail server looks at the
domain name in the recipient’s e-mail address and the mail server then contacts its local
DNS server (specified in the resolv.conf file) to get the IP address for the mail server in the
recipient’s domain. When an authoriative DNS server for the recipient’s domain receives
the query from the sender’s DNS server it sends back the IP addresses from the MX records
it has in that domain’s zone file.
LoveLy professionaL university 111