DHCP server
When you use a static IP address, Magic WAN Connector can also act as a DHCP server in your network. To enable this feature:
-
Log in to the Cloudflare dashboard ↗ and select your account.
-
Go to Magic WAN > Connector on-ramps (beta).
-
Select the Connector you want to configure > Edit.
-
Select Network Configuration, and scroll down to LAN configuration.
-
In LAN configuration, select the LAN where you want to enable DHCP server.
-
Select Edit.
-
Under Static addressing, select This is a DHCP Server. You also have to specify:
- The DNS server address
- The DHCP pool start
- The DHCP pool end
For example:
Create a PUT
request to update the LAN where you want to enable DHCP server:
Example:
curl --request PUT \https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id} \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>" \--header "Content-Type: application/json" \--data '{ "lan": { "static_addressing": { "dhcp_server": { "dhcp_pool_end": "<IP_ADDRESS>", "dhcp_pool_start": "<IP_ADDRESS>", "dns_server": "<IP_ADDRESS>" } } }}'
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark