Running Mac OS X's built-in DHCP server

April 10, 2011 | Mac OS X

It turns out that Mac OS X comes with a DHCP server built-in. There don't seem to be any good and simple instructions out there on how to use it. Or at least, there weren't any.... until now!

The server is called bootpd and does both DHCP and BOOTP. These instructions just describe using it for DHCP, however.

To start, you need to create a configuration file for the server. The file should be stored in /etc/bootpd.plist. Here's a sample configuration file:

<plist version="1.0">

This file sets up the DHCP server to run on the interface named en0, which is typically the (non-wireless) Ethernet port. It assumes that that port has been configured with the IP address, and dishes out addresses from to

To get more information on editing this file, take a look at the bootpd manfile:

man bootpd

To start the server, run the following command:


Stopping the server is very similar:


If you want to create static assignments, so that a given device always has the same IP address, you need to create a file called /etc/bootptab. There's a small sample of the file below. For more information, just do man bootptab

# machine entries have the following format:
# hostname hwtype hwaddr ipaddr bootfile
client2 1 00:a0:b2:ef:ff:0a

Make sure to include the %% at the top of the file. It's safe to leave the bootfile field empty because we're just using bootpd as a DHCP server, not a bootp server.