Dhcp Server For Macos

If you receive your IP address using DHCP, you can force your computer to renew your current IP address. In some cases, renewing the IP address resolves connection issues. You might need to do this periodically in an environment where many computers use the same DHCP server or the network administrator has set up a short DHCP lease time.

It should be noted that the next version of Server.app is removing the DHCP server option from the Server.app.


See - Prepare for changes to macOS Server - Apple Support


However the wording does seem to suggest the underlying function is still going to be present and therefore it should be possible to manually configure as described by TomHsiung but you may also have to manually activate the matching launchdaemon to start it.


Whilst the user interface is being removed from Server.app I also am presuming that using Internet Sharing will as before automate using the hidden underlying bootpd software.


Frankly - as Apple clearly intend I have already moved away from using Apple's 'server' software as much as possible including for DHCP.

Sep 14, 2018 9:04 AM

The first step to moving services from macOS Server for pretty much all services is to check out the old settings. The second step is to probably ask if where you’re going to put the service is a good idea. For example, these days I prefer to run DHCP services on a network appliance such as a Synology. And so let’s look at how to do that. Here, we’ll use the serveradmin command to view the settings of the DHCP service:
/Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin settings dhcp
The output is an array of subnets with different settings per subnet.
dhcp:static_maps = _empty_array
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:WINS_primary_server = '
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:dhcp_router = '10.15.40.1'
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:WINS_secondary_server = '
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:net_range_start = '10.15.40.2'
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:net_range_end = '10.15.43.253'
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:dhcp_domain_name = 'clients.msp.jamfsw.corp'
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:dhcp_domain_name_server:_array_index:0 = '8.8.8.8'
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:dhcp_domain_name_server:_array_index:1 = '4.4.4.4'
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:lease_max = 36000
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:net_mask = '255.255.252.0'
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:dhcp_ldap_url = _empty_array
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:WINS_node_type = 'NOT_SET'
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:dhcp_enabled = yes
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:WINS_NBDD_server = '
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:net_address = '10.15.40.0'
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:WINS_scope_id = '
dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:selected_port_name = 'en1'
dhcp:subnet_defaults:logVerbosity = 'MEDIUM'
dhcp:subnet_defaults:routers:en0 = '10.15.40.1'
dhcp:subnet_defaults:WINS_node_type_list:_array_index:0 = 'BROADCAST_B_NODE'
dhcp:subnet_defaults:WINS_node_type_list:_array_index:1 = 'HYBRID_H_NODE'
dhcp:subnet_defaults:WINS_node_type_list:_array_index:2 = 'NOT_SET'
dhcp:subnet_defaults:WINS_node_type_list:_array_index:3 = 'PEER_P_NODE'
dhcp:subnet_defaults:WINS_node_type_list:_array_index:4 = 'MIXED_M_NODE'
dhcp:subnet_defaults:WINS_node_type = 'NOT_SET'
dhcp:subnet_defaults:dhcp_domain_name = 'https://krypted.com/'
dhcp:subnet_defaults:logVerbosityList:_array_index:0 = 'LOW'
dhcp:subnet_defaults:logVerbosityList:_array_index:1 = 'MEDIUM'
dhcp:subnet_defaults:logVerbosityList:_array_index:2 = 'HIGH'
dhcp:subnet_defaults:dhcp_domain_name_server:_array_index:0 = '8.8.8.8'
dhcp:subnet_defaults:dhcp_domain_name_server:_array_index:1 = '4.4.4.4'
dhcp:subnet_defaults:selected_port_key = 'en0'
dhcp:subnet_defaults:selected_port_key_list:_array_index:0 = 'en0'
dhcp:subnet_defaults:selected_port_key_list:_array_index:1 = 'bridge0'
dhcp:logging_level = 'MEDIUM'

Next, we’ll setup a Synology NAS using the instructions found here:
Basic Synology NAS Setup

Once you’ve setup your Synology NAS, you can install a dhcp server on it, if you need to provide those services. To get started, first open Control Panel and then find DHCP Server in the Control Panel sidebar.


From here, click on the LAN port.
Because DHCP requires a subnet mask, and a pool of IP addresses that can be shared, the “Enable DHCP server” button will initially be greyed out. Click on the Edit button to define these.
Click on the checkbox for “Enable DHCP server” and enter the following settings:
  • Address lease time: The number of seconds the lease will be valid.
  • Primary DNS: The first DNS server provided to client computers.
  • Secondary DNS: The second DNS server provided to client computers.
  • Domain name: The automatic suffix applied to hostnames of clients (e.g. if you enter Synology in a web browser and this setting was https://krypted.com/ then you would be routed to Synology.krypted.com.
  • Enable Web Proxy Automatic Discovery: provide a PAC file (using DHCP options)
  • URL: The PAC file.
  • Subnetlist: Here you add subnets, which we’ll describe next.

Dhcp Server Macos Mojave

At the Create DHCP Subnet screen, you’ll be prompted for the following fields:
  • Start IP address: The first IP address in the pool that will be handed out.
  • End IP address: The last IP address in the pool that will be handed out (note that in my example, I’m handing out 192.168.55.40 to 192.168.55.50, so 11 addresses – make sure these don’t overlap with other devices that are already using addresses or with other DHCP pools or you will have sporadic device connectivity for some devices).
  • Netmask: The subnet mask to be given to devices along with their lease.
  • Gateway: The default gateway, or router for the network.
  • DHCP Options: I cover these in https://krypted.com//mac-os-x/replace-macos-server-dhcp-service-built-macos-dhcp-service/, but this list includes those supported on the Synology.

Dhcp Server For Mac

Once your settings are configured, click Create. You’ll then see your pool configured. Click the OK button.
ScopesYou’ll then see a list of subnets and settings. Click “Enable DHCP server” to start the service.

Reset Ip Address On Mac

Once started, click “Disable DHCP server” to stop the service or go back to the edit screen and click on the DHCP Clients tab to see what IP each client has been provided.