Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

  • Print
  • + Share This
This chapter is from the book

Domain Name System

DNS is the method Internet computers use to map IP addresses to domain names. Computers use IP addresses to locate one another, but they are not easy for people to commit to memory. Domain names, such as or, are much easier to remember, but they need to be translated into the IP addresses that computers use. DNS performs this translation.

DNS Basics

Here's a simple example for understanding DNS. Imagine a user who wants to access a website such as Apple's training site. That user is connected to the appropriate server for Apple's training department by entering in a browser. Behind the scenes, the graphic on the following page depicts what is actually happening on the Internet to make this connection occur.

  1. A user enters
  2. The user's computer checks with a DNS server to find the IP address associated with the domain name The computer uses the DNS server configured in Network preferences to look up this information. This is referred to as a forward lookup or just lookup.
  3. The DNS server determines the IP address that corresponds to the domain name requested in the lookup. It returns this information to the user's computer.
  4. The user's computer then uses the IP address to request the training webpage by sending this IP address to its default Internet router.

This DNS scenario oversimplifies the true capabilities of DNS. The real power of DNS is that any valid Internet IP address in the world can be found quickly and easily, yet easily maintained. This is due to the global design of DNS.

DNS combines a global search space with a local, relatively easy way to maintain this search space. It does this through a hierarchical structure in which each organization is responsible for maintaining its own DNS information.

Reviewing the previous request for a webpage, imagine that the request was coming from a computer at a company in Japan. The Japanese company may maintain its own DNS server but have no idea of how DNS is assigned for companies in the United States. In this case, the local DNS server would contact a parent DNS server, looking for the information on If the parent DNS server does not have this information, it sends a request to a top-level “root” DNS server that can then contact appropriate servers to find the correct lookup information.

All valid DNS servers on the Internet can eventually find DNS information on any address by following the appropriate lookup through this top-level approach. In this case, the Japanese computer finds the appropriate DNS mapping by following the lookup process and eventually finding a DNS server in the United States that is responsible for mapping the address to the IP address

This process highlights the other key aspect of DNS—locally maintained DNS servers. For example, Apple maintains a list of computers for various web services. Apple can reassign IP addresses internally to meet its server needs, as long as Apple maintains a correct set of DNS files on its local DNS servers and has these DNS servers configured appropriately to be available to higher-level DNS servers that contact them.

The key to these DNS servers is correctly configured files containing the DNS information. These files are typically referred to as DNS configuration and zone files.

DNS Setup

Mac OS X Server includes DNS server functionality based on the standard UNIX-based implementation BIND (Berkeley Internet Name Domain). BIND is the most common implementation of DNS in use on the Internet today, and Mac OS X and Mac OS X Server currently include BIND version 9.2.2.

Most companies that use Mac OS X Server for services such as file, print, and web serving have already established appropriate DNS service. This service could be provided by dedicated DNS departments in their organizations or by an ISP. Companies running their own mail services would also want to ensure DNS service to correctly map IP addresses to their mail domains. If a company has not established DNS service yet, the following steps are required to configure DNS for Mac OS X Server:

  1. Register your domain name via any valid registrar, such as VeriSign.
  2. Configure BIND on Mac OS X Server by modifying the DNS configuration and zone files.
  3. Set up mail exchange (MX) records (optional).
  4. Start DNS service.

With Mac OS X Server, you can configure DNS zone files with Server Admin.

DNS Zones

Zones are the basic organizational unit of the DNS. Zones contain records, and are defined by how they acquire those records and how they respond to DNS requests. There are three kinds of zones:

  • A master zone has the master copy of the zone's records and provides authoritative answers to lookup requests.
  • A slave zone is a copy of a master zone stored on a slave or secondary name server. Each slave zone keeps a list of masters that it contacts to receive updates to records in the master zone. Slaves must be configured to request the copy of the master zone's data. Slave zones use zone transfers to get copies of the master zone data. Slave name servers can take lookup requests like master servers. By using several slave zones linked to one master, you can distribute DNS query loads across several computers and ensure that lookup requests are answered when the master name server is down.

    Slave zones also have a refresh interval that determines how often slave zones check for changes from the master zone. You can change this interval by using the BIND configuration file. See the BIND documentation for more information.

  • A forward zone directs all lookup requests for that zone to other DNS servers. Forward zones don't do zone transfers. Often, forward zone servers are used to provide DNS services to a private network behind a firewall. In this case, the DNS server must have access to the Internet and a DNS server outside the firewall. Finally, forward zones cache responses to the queries that they pass on. This can improve the performance of lookups by clients that use the forward zone.

To add a new DNS zone, go to the Settings pane and click the Zones button. In the Zones list, you see two zones that are created by default. To add more zones, use the Add Zone (+) button. You can delete, edit, or duplicate zones. For each zone, you can add, edit, delete, and duplicate records. When you add a record, you are prompted for the type of record you want to add. After you add a record, it is displayed in the Records list for the zone.

DNS Zone Records

Each zone contains a number of records. These records are requested when a client computer needs to translate a domain name (like to an IP number. Web browsers, email clients, and other network applications rely on zone records to contact the appropriate server. You create records by adding machines to a zone in Server Admin.

Your master zone's records will be queried by others across the Internet so they can connect to your network services. There are several kinds of DNS records. Following are the records that are available for configuration by Server Admin's user interface:

  • Address (A): Stores the IP address associated with a domain name. An A record is created for each machine entry added to a zone.

  • Canonical Name (CNAME): Stores the “real name” of a server when given a nickname or alias. For example, might have a canonical name of A CNAME record is created for each entry in the Alias field when adding a machine to a zone.

  • Mail exchange (MX): Stores the domain name of the computer that is used for email in a zone. An MX record is created when you specify that a machine is a mail server.

  • Pointer (PTR): Stores the domain name of a given IP address (reverse lookup). A PTR record maps an IP address to a computer's DNS name. The pointer record contains the four octets of the IP address in reverse order followed by (For example, becomes

Mac OS X Server simplifies the creation of these records by focusing on the computer being added to the zone rather than the records themselves. As you add a computer record to a zone, Mac OS X Server creates the appropriate zone records that resolve to a certain computer address.

Add Records to a DNS Server

DNS is a complicated topic that covers a wide range of configuration options and settings. This lesson does not cover in-depth DNS configuration. You will add information to your DNS configuration that will enable you to associate a friendly name with your computer and see the effects of that change.

  1. On your server computer, open the Terminal application located on the Dock.

    If you are familiar with the Secure Shell (SSH) protocol, you can ssh into your server from your Mac OS X computer.

  2. In the Terminal window, enter cd /var/named to navigate to /var/named.
  3. List the contents of the ls -la folder.

    These are the default DNS configuration files.

  4. Leave the Terminal window open.
  5. Open Server Admin if it is not already open and connect to your server.
  6. Click the DNS service, click the Settings button, and click the Zones tab.
  7. In the Settings pane, click the Add Zone (+) button to create a zone.

    Enter the following settings:

    • Zone Name: (Make sure to enter the period at the end of the zone name.)

    • Server Name: server17<SHADE></SHADE>

    • Administrator email: (Make sure to enter the period at the end of the address.)

  8. Click Save, and then click Start Service in the toolbar to start the DNS service.
  9. Type ls –la in the Terminal window again, and note changes in the named folder.

    In this book, you will use Server Admin to make several changes that create and configure files on your disk. It's useful to be familiar with those file locations when troubleshooting. Review the contents of /var/named after you create the new zone.

    Note that the list now includes multiple settings files for the default zone you created.

  10. Now we will use the move comand to examine the content of the file.

    In the Terminal window, type more and press Return.

    This command displays the contents of your zone file. Entries with A to the left of the IP address are A records. You will see an A record for your server computer, created by default.

Enter the DNS Search Information

You now must enter DNS search information inside the Network preferences pane of both your Mac OS X Server and Mac OS X computers.

  1. On your server, open System Preferences, navigate to the Network preferences pane, and click Configure to continue.
  2. Enter the following values:
    • DNS Servers:

    • Search Domains:

  3. Click the Apply Now button and close System Preferences.
  4. Repeat this process on the Mac OS X computer.

Create a DNS Alias for Your Client Computer

In a DNS hierarchy, there are explicit hostnames that resolve to IP addresses. However, a DNS server can maintain a number of different names for computers, which are called aliases. Aliases by themselves are simply friendly names that point to an IP address, and are often used to reduce typing or perform server redirection.

  1. Return to Server Admin.

    You will add a machine alias to your DNS entry and observe the result.

  2. Select DNS and click the Stop Service button in the toolbar.
  3. Click the Stop Now button in the dialog that appears to stop the DNS service.
  4. Select the Settings tab of DNS and click the Machines button.

    You will see a list with your server computer, entered by default.

  5. Click the Add Machine (+) button to add a new entry, and enter the following information:
    • IP Address:

    • Name: user17

  6. Click the Add Alias (+) button to add a new alias.
  7. Type client17 in the Aliases field and click OK.
  8. Click the Save button and start the DNS service again.
  9. Note changes in by typing more again in the Terminal.

    This command will refresh the display of your zone file. You will see a new entry, with your student name associated with the IP address and an alias that points to your A Record.

  10. Check your file to ensure that it reflects the changes you just made.

    It is useful to understand how your zone files change over time.

Test the New Alias From Your Client Computer

The real test of any DNS change is when your DNS clients are able to use the new entry. Because of the limited number of services available, you will use ping from your client computer to see if its alias was configured properly.

  1. On your client computer, open Network Utility and click the Ping button.
  2. In the address field, type client17 and click Ping.

    The ping command should execute properly and resolve to

Monitoring DNS Activity

Within Server Admin, you can monitor DNS activity on Mac OS X Server using the Overview, Activity, and Log panes for DNS.

  • The Overview pane displays information such as DNS server status (Running/Stopped), DNS version (BIND 9.2.2), number of zones allocated, and query logging status (Off/On).
  • The Activity pane displays information on Source of Authority (SOA) queries and zone transfers.
  • The Log pane displays current information about start time and DNS queries (lookups).

DNS is an essential function in any running version of Mac OS X. Many services look for DNS information to find critical information. Examples of these services are the login window, server administration tools, directory services, Internet communications, and any direct web access. Incorrectly configured DNS could result in a long delay in these services completing their associated tasks.

DNS is a complicated and subtle protocol. Its distributed nature often makes it difficult to discern where a problem lies: Is it the client, the local DNS server, or some remote DNS server on the Internet? Advanced DNS issues will likely require an experienced system administrator. However, there are few quick checks you can make easily.

Perform DNS Lookups

The best graphical tool for troubleshooting DNS issues is Network Utility's Lookup pane, where you can perform DNS lookups. Perform the following checks when you troubleshoot DNS problems:

  • Check hardware and network issues.
  • Verify that network settings are correct in the Network pane of System Preferences.
  • Use Network Utility's Lookup pane to test your DNS server.
  • Use Network Utility's Ping pane to test direct IP connectivity, bypassing DNS.
  • Ping another computer on your subnet to test for basic IP connectivity, but also be sure to test the IP address that is listed as the DNS server in Network preferences.
  • Check with a network administrator to ensure that DNS servers are configured properly.

Isolate and Resolve DNS Issues

DNS issues can take many forms. You may have problems that are related to end users who misunderstand your DNS hierarchy, or typographic problems within your DNS aliases. A system administrator must be able to determine authoritatively where a DNS entry is being resolved.

You have already tested your alias with a successful ping. You will now look up DNS information.

  1. On your Mac OS X computer, in Network Utility, click Lookup.

    Lookup enables you to identify the server where DNS resolves for a particular value. You know that user17 and client17 were working, but now you should make sure you see how they resolve.

  2. In the address field, type and press Return.

    Lookup requires an FQDN, which is why you must add “”.

  3. Scroll the response so that you can see the Authority Section information.

    Your authority should be your server computer, This result shows that is resolved on your server computer, and the DNS service is working at that level.

  • + Share This
  • 🔖 Save To Your Account

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive:

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020