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:
- Configure your Connector to be a DHCP server.
- Select Add DHCP Reservation.
- In Hardware Address enter the MAC address for the device you want a specific IP address for.
- In IP Address, enter the IP address for that device.
- (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>" } } } }}'