Cloudflare Docs
Magic WAN
Edit this page
Give us feedback
Set theme to dark (⇧+D)

DHCP static address reservation

If you configure your Connector to be a DHCP server, you can also assign IP addresses to specific devices on your network. To reserve IP addresses:

  1. Configure your Connector to be a DHCP server.
  2. Select Add DHCP Reservation.
  3. In Hardware Address enter the MAC address for the device you want a specific IP address for.
  4. In IP Address, enter the IP address for that device.
  5. (Optional) If you need to reserve more IP addresses, select Add DHCP Reservation as many times as needed, and enter the new values.

Create a PUT request to update the LAN where you want to reserve addresses:

Example:

curl --request PUT \
--url https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Email: <EMAIL>' \
--header 'X-Auth-Key: <API_KEY>' \
--data '{
"lan": {
"static_addressing": {
"dhcp_server": {
"reservations": {
"<HARDWARE_MAC_ADDRESS>": "<IP_ADDRESS>",
"<HARDWARE_MAC_ADDRESS_2>": "<IP_ADDRESS>"
}
}
}
}
}'