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

Home > Articles > Apple > Operating Systems

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

Dynamic Host Configuration Protocol

DHCP is a protocol for dynamically configuring a host machine. While most people associate DHCP with receiving an IP address, the configuration information provided to a machine can be much more than an IP address. Typically DHCP provides IP address assignment along with a valid subnet mask, router, DNS server, and domain name. DHCP can provide other host configuration information, such as the default information for connecting to a NetInfo directory. Mac OS X Server also provides a convenient way to configure the Lightweight Directory Access Protocol (LDAP) information to be sent to a requesting computer.

The process of the server granting an address to the client is well documented. In the illustration below, the interaction occurs in the following order:

  1. A host iBook on the network is set to obtain network configuration information via DHCP. It sends a request to the network to see if a valid DHCP server is available.
  2. A DHCP server receives the request from the iBook and responds with the appropriate information. In this case, the DHCP server responds with an IP address of, a subnet mask and router, a DNS server address of, and an LDAP server of The iBook then formally requests what the DHCP server offers. At this time, the iBook has a valid IP address and can start using the network.
  3. As other devices come on the network and request configuration information via DHCP, they receive the appropriate information. In this case, the PowerBook receives the next available IP address of as well as the same DNS and LDAP information.
  4. As the eMac joins the network, it also receives appropriate DHCP information.

A key benefit that the DHCP server provides in this example is the assignment of configuration information to each host on the network. You do not have to manually enter this information from each machine under the “Manual” setting option. Use of the DHCP server also guarantees that users do not have network problems caused by incorrectly typed information, such as duplicate IP addresses, subnet, or DNS settings. If an organization has set up its network appropriately, a new user can take a new Macintosh computer out of the box, plug it into the network, and automatically be set up with appropriate IP, DNS, NetInfo, and LDAP information. This user can then authenticate against the company LDAP or NetInfo directory and access appropriate network services without doing any configuration. This capability provides an organization with an extremely simple way to set up and administer computers.

Configuring DHCP

Before you configure DHCP, you should know about the options available to you.

Server Admin is the tool that is used to configure DHCP on Mac OS X Server. You can configure multiple DHCP ranges, or subnets as they are called in Server Admin, as long as you don't allow the IP ranges to overlap. Use the Add Subnet button to set up DHCP ranges and enter all appropriate information.

To configure DHCP:

  1. In Server Admin, select DHCP and click Settings to configure Mac OS X Server's DHCP service.

    The list of currently configured DHCP subnets appears.

  2. Click the Add Subnet (+) button to set up a new subnet configuration. Either double-click a subnet or select it and click the Edit (pen) button to edit an existing subnet.

DHCP Subnet Information

You can configure multiple subnet ranges on Mac OS X Server in the Subnets pane. You could add an additional subnet range for a second range on an existing port, as shown below, or for a range on a different port. You might need to configure subnet ranges on multiple ports when using an Apple Xserve server with dual Ethernet ports or when using a computer that contains a four-port Ethernet card.

DHCP General Information

In the General pane, you can configure the IP settings that the DHCP server provides for a specific subnet. (You must be editing a subnet to see the General pane.) Enter an appropriate name for the subnet and select the network interface to be used for the range of addresses. Then enter the appropriate IP addresses to define the IP range in the Starting IP Address and Ending IP Address fields. This IP range must be unique and must not overlap with another DHCP subnet range being served. Next enter the appropriate subnet mask and router settings.

DHCP servers also use a range of IP addresses to lease an IP address to computers for a temporary period, known as the lease time. Leasing enables an organization to support a larger number of computers than there are available IP addresses by reusing IP addresses over time. For example, members of a sales force using portable computers may not all need IP addresses in the local sales office if many sales reps are not in the office each day. DCHP would be an ideal way to administer such an office: A host receives the IP address for the assigned lease time and relinquishes it when the network interface is no longer in use, such as when the machine shuts down. If a machine is still using the IP address, it can request an extended lease time.

Set the length of the lease time depending upon the needs of your organization.

DHCP DNS Information

In addition to providing an IP address, DHCP can also provide additional network configuration information, such as the addresses for DNS servers. In the DNS pane, you set the DNS information that the DHCP server provides. DNS is discussed later in this lesson.

DHCP LDAP Information

LDAP is a network-based directory service designed to provide information to the client. The LDAP pane is where the administrator enters the LDAP configuration information that will be sent to clients. Clients that receive this information can connect to the LDAP server and be configured automatically to use that server's directory services. Mac OS X makes deploying LDAP easy by sending the configuration information to clients with the DHCP response over Option 95, which is the standard defined by the Internet Assigned Numbers Authority (IANA).

DHCP Static Mapping

You can assign specific addresses to the computers on your network, if desired. This enables you to keep the ease of configuration of using DHCP while having some static servers or services. To assign an IP address to a computer, you will need the computer's Ethernet address (sometimes called its MAC address or hardware address). Each network interface has its own Ethernet address. If you have a computer that moves from being wired to the network to a wireless network, it uses two different Ethernet addresses—one for the wired connection and one for the wireless connection—so be sure to enter it twice if necessary.

To assign static IP addresses:

  1. Open the Static Maps pane for DHCP service and click the Add Static Map (+) button.
  2. Enter the Ethernet address of the computer, which will receive a static address and the IP address you want to assign to it. If desired, you can write a description or note related to this mapping. Click OK.

DHCP Logging

Within the Settings pane of Server Admin for DHCP, you can set the level of detail for logs. Click the Logging button to access the Log Level pop-up menu, then set the level of detail that will be provided to the DHCP logs. The Medium setting lists general DHCP warnings and errors; the Low setting lists only more serious entries, such as a notice that the DHCP server did not start up as expected.

The DHCP log entries are contained in the main system log file. You can view the system log using other utilities such as Console or System Profiler, but if you use the Log pane for the DHCP service in Server Admin, only the DHCP entries will be displayed.

You can also look for specific DHCP events by entering them in the Filter field. Note the specific DHCP entries and the general flow of events for DHCP:

  1. DHCP DISCOVER: A DHCP client sends a discover message to look for DHCP servers.

  2. OFFER: A DHCP server responds to a client DHCP DISCOVER message.

  3. DHCP REQUEST: A DHCP client requests DHCP configuration information from the DHCP server.

  4. ACK: A DHCP server responds with DHCP configuration information for the DHCP client.

You can remember this chain of events with the acronym DORA: Discover, Offer, Request, Acknowledge.

Addresses that are assigned can of course be reused. The client sends a DHCP RELEASE message to the server when it is being shut down. This message notifies the server that the address can be reassigned to another client.

You can use Server Admin to view detailed information about the DHCP clients associated with a DHCP server. To view the DHCP client information, click the Clients button at the bottom of the screen.

The DHCP Clients pane provides the following information:

  • Computer name
  • Hardware address (the MAC address associated with a specific DHCP client)
  • DHCP client ID
  • IP address assigned
  • Lease time remaining

A DHCP client can have a client ID, which may provide an administrator more information about which host is assigned a specific IP address. Some service providers may require a valid client ID before providing an IP address from their DHCP server. Use the Network pane of System Preferences in Mac OS X to configure the client ID. In the DHCP server for Mac OS X Server, the client ID is simply a convenient way for the administrator to track specific clients. You can't actually change the behavior of the DHCP server based on the client ID.

Create a DHCP Subnet

Follow these steps to create a DHCP subnet:

  1. On your server, click the Server Admin icon in the Dock or from your Mac OS X computer, launch Server Admin (/Applications/Server).
  2. If you have used Server Admin previously and added your information to your Keychain, your server will appear in the Computers & Services list on the left.

    If this is the first time you are using Server Admin, enter the server's IP address, local hostname, or DNS name (if the network is set up for DNS), or click Browse to select from a list of servers on your local network. You should be using Server17.local for this book. You can also choose your server from the Connect Recent list under the Server menu.

  3. Choose DHCP in the Computers & Services list, then click Settings at the bottom of the screen. You will use the Settings window to configure DHCP subnets (ranges) and determine how DHCP service messages will be logged.
  4. Click the Add Subnet (+) button at the bottom of the pane to create a subnet for the en0 interface.
  5. Enter the following values:
    • Subnet Name: Sales Network

    • Starting IP Address:

    • Ending IP Address:

    • Subnet Mask:

    • Router:

  6. Click the Lease Time pop-up menu to view the available options for lease time increments.
  7. Leave the Lease Time value set to 1 and the Lease Time menu set to Hours, reflecting a lease time of 1 hour.
  8. Click the DNS button adjacent to the General and LDAP buttons within the DHCP window. The Save Changes dialog appears. Click to save changes.
  9. Enter the following DNS information in the appropriate fields:
    • Default Domain:

    • Name Servers:

    This pane provides the DHCP client computer with the correct DNS information via DHCP, even though you have yet to configure DNS on your server.

  10. Click the LDAP button in the DHCP service pane.

    The LDAP pane contains fields for LDAP information that will be delivered to DHCP clients.

  11. Enter the following values:
    • Server Name:

    • Search Base: dc=pretendco,dc=com

    The LDAP server has not been configured yet, but sending the information in the DHCP packet causes no harm at this point. The client will simply ignore it.

  12. Click the Back button (the left arrow) to return to the Subnets pane.
  13. Select the Enable checkbox for the subnet you just edited.
  14. Click the Save button to save the new settings for this DHCP subnet name.

    Note that you can drag the Preferences icon (located above the Save button) to the desktop to create a backup of these settings.

  15. Click Start Service in the toolbar to start the DHCP service.
  16. Click the Log button.

    You can filter for specific entries in the log using the Filter field at the bottom right. For example, if you wanted to see whether your DHCP service was enabled, you could type enabled into the Filter field and see only the log entries that include that value.

  17. Verify that the DHCP service is running.

    If the indicator next to DHCP under Computers & Services is green, then the service is running.


Request a DHCP Address and Set a Client ID

Although DHCP is running, you'll want to check your Mac OS X computer to make sure it received the proper address.

  1. On your Mac OS X computer, unplug the Ethernet cable, wait about 2 seconds, and plug it back in.

    This enables your machine to do a Discover and look for the DHCP server.

  2. Click the Refresh button in the Server Admin toolbar.

    You should see in the log file that your Mac OS X computer now has the IP address of

  3. On your Mac OS X computer, open System Preferences and choose the Network preferences pane. Select Built-in Ethernet from the Show drop-down menu.
  4. Enter your name in the DHCP Client ID field and click the Apply Now button.
  5. Click the Refresh button in the Server Admin toolbar and then click the Clients tab at the bottom of the window.

    You should see in the window that your Mac OS X computer now has a client ID associated with it.

    The pane shows a list of all computers currently receiving a DHCP address from this server computer. Because you limited the DHCP range to provide only one IP address, there should be only one computer listed.

The DHCP Clients pane lists information about DHCP address recipients. This information includes the computer name, hardware address (Ethernet ID), DHCP client ID (if used), IP address, and lease remaining.

Note the Hardware Address column, which helps system administrators identify computers using the active network interface's Ethernet ID.

Troubleshooting DHCP

It is important to keep the DHCP service healthy, as computers cannot interact with each other over the Internet without IP addresses (although Bonjour allows Mac OS X 10.2 through 10.4 computers to communicate without a DHCP server on a local network).

When you are troubleshooting DHCP issues for Mac OS X, check the following:

  • Is the machine configured correctly on the network? Check physical network issues, such as cabling, broken routers or hubs, and limitations of the physical subnet.
  • Can you establish any network connection? Can you ping another host? Can you see another host over AppleTalk?
  • Is the configuration set up properly? Are you using addresses assigned via DHCP or manually? If the problem is with DHCP, does a static address work?
  • Is an IP address assigned via DHCP or is the address self-assigned (169.254.x.x range)? Can you ping another host via both IP address and hostname? Can you perform a DNS lookup?

    From the client, you can see the DHCP packet information sent to it by using the Terminal application and typing ipconfig getpacket en0 and pressing Return.

When you are troubleshooting DHCP issues for Mac OS X Server, check the following:

  • Is the DHCP server configured correctly on the local network? Is the server reachable on the network via ping? Is a static address properly assigned to the server?
  • Is the DHCP service configured properly? Are the DHCP server subnet enabled and the DHCP service turned on?
  • Does Server Admin show the expected DHCP client activity?
  • Do the DHCP log entries match the expected activity for your server?

Turning Off DHCP Service

Now that you have tested DHCP, you must turn off DHCP service on your server and reconfigure your client computer to use a static IP address. You have already created a location for DHCP, so now you'll create a location for a static IP address.

  1. Use Server Admin to stop the DHCP services by clicking the Stop Service button in the toolbar.
  2. Click the Stop Now button on the confirmation dialog.
  3. On your Mac OS X computer, open System Preferences and choose the Network preferences pane.

    You will now configure the client machine to have a static IP address, since DHCP is now turned off on the server. Your current location is called XSE Book, so you will need to create a new location.

  4. Choose Edit Locations from the Location pop-up menu, select XSE Book, and click Duplicate.
  5. Rename the duplicated location XSE Book Static and click Done.
  6. Choose XSE Book Static from the Location pop-up menu. Press Apply.

    You may have already received a self-assigned address. These start with “169.254.” and are created by Mac OS X, not given out by Mac OS X Server.

  7. Choose Manually from the Configure IPv4 pop-up menu.
  8. Enter the following IP configuration:
    • IP Address:

    • Subnet Mask:

    • Router:

    • DNS Servers:

    You will be configuring DNS services in the next section.

  9. Click Apply Now and close System Preferences.
  • + 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