Skip to content
AnswerWell geo Documentation

Research · 7 min read · Answerwell

DHCP Server Custom Options, Relay, DNS, and Reservations

How to run DHCP server or relay on a WAN edge appliance: pools, multiple DNS, PXE options, reservations, and validation limits.

This page summarises Cloudflare documentation on DHCP for the Cloudflare One Appliance (formerly Magic WAN Connector) on branch LANs. The appliance can obtain its own WAN address via DHCP, act as a DHCP server, forward discovers with DHCP relay, reserve addresses by MAC, and attach custom DHCP options to leases for PXE, VoIP, and vendor-specific clients.

DHCP modes: when the appliance is server, relay, or client

Section titled “DHCP modes: when the appliance is server, relay, or client”

On a LAN with static addressing, the Cloudflare One Appliance supports several DHCP-related roles. The Configure hardware Appliance and Configure Virtual Appliance guides list what you can enable per LAN:

  • Connect to an upstream DHCP server or use a static IP on the appliance interface.
  • Act as a DHCP server for clients on that LAN.
  • Use DHCP relay to reach a DHCP server outside the local broadcast domain.
  • Reserve IP addresses for specific devices.

Custom DHCP server options apply only when the appliance is the DHCP server for that LAN; they have no effect in relay mode, as stated in DHCP server options.

DHCP server: pool, DNS, and multiple DNS server IPs

Section titled “DHCP server: pool, DNS, and multiple DNS server IPs”

When the LAN uses a static IP on the appliance, you can make the Cloudflare One Appliance the DHCP server. In the dashboard, open the appliance profile under Network Configuration → LAN configuration, edit the LAN, enable This is a DHCP Server, and set the DNS server address(es), DHCP pool start, and DHCP pool end. Step-by-step UI paths are in DHCP server.

The same settings can be pushed with a LAN PUT via the Cloudflare API (dhcp_server with dhcp_pool_start, dhcp_pool_end, and dns_server).

Branch sites often need more than one resolver. Cloudflare added support for multiple DNS server IP addresses in the DHCP pool:

Cloudflare One Appliance DHCP server settings now support specifying multiple DNS server IP addresses in the DHCP pool.

Previously, customers could only configure a single DNS server per DHCP pool. With this update, you can specify multiple DNS servers to provide redundancy for clients at branch locations.

— Cloudflare, Cloudflare One Appliance supports multiple DNS server IPs

In the dashboard, use Add DNS Server for each address, as described in DHCP server.

Custom DHCP options: PXE, VoIP, and vendor configuration

Section titled “Custom DHCP options: PXE, VoIP, and vendor configuration”

When the appliance issues leases as the DHCP server, you can attach custom DHCP options to those leases:

When the Cloudflare One Appliance is acting as the DHCP server for a LAN, you can now configure custom DHCP options on the leases it issues. This unlocks workflows such as PXE / iPXE boot, VoIP phone provisioning, and vendor-specific client configuration.

— Cloudflare, Custom DHCP options on Cloudflare One Appliance

DHCP server options groups typical uses:

Use case Example option codes
Network boot (PXE, PXELINUX, iPXE) 43, 60, 66, 67, 175, 209, 210
VoIP provisioning (TFTP server) 66
Vendor-specific data 43 (vendor sub-options)

You can configure options in the dashboard under DHCP server options on the LAN:

You can now configure custom DHCP options directly from the dashboard when the Cloudflare One Appliance is acting as the DHCP server for a LAN.

In LAN configuration, under DHCP server options, select Add DHCP option to choose from common options for PXE / iPXE boot, VoIP phone provisioning, and vendor-specific configuration, or select Add custom option to enter your own option code, type, and value. This complements the existing API and Terraform workflow for configuring DHCP options.

— Cloudflare, Configure DHCP options from the dashboard on Cloudflare One Appliance

API and Terraform use the dhcp_options field on the LAN dhcp_server object; see the example in DHCP server options.

Option format, reserved codes, and duplicates

Section titled “Option format, reserved codes, and duplicates”

Each option has code, type, and value:

Field Description Example
code DHCP option code (1–254) 67
type Encoding: text, hex, ip, byte, short, integer text
value Value encoded per type boot/x64/pxelinux.0

— Cloudflare, DHCP server options — Option format

Restrictions from the same page:

  • Options 0 and 255 are reserved (RFC 2132) and cannot be set.
  • Options 3 (default gateway), 6 (DNS), and 51 (lease time) are managed by the appliance and cannot be overridden.
  • Each option code may appear once per LAN; duplicates are rejected.

Changelog text for API behaviour:

Each option is defined by option_number, value, and one of four value types: text, integer, hex, or ip. Configurations are validated on the appliance before being applied — invalid configurations are rejected and the underlying error is returned to the API caller, so a bad option will not disrupt the live DHCP service.

— Cloudflare, Custom DHCP options on Cloudflare One Appliance

Before new options go live, the appliance stages, validates against the underlying DHCP server, and either swaps configuration in without interrupting service or returns an error:

On failure, discards the change and returns the underlying validation error to the caller — shown as a field error in the dashboard, or in the API response for API and Terraform callers. The live DHCP service is never restarted with an unverified configuration.

— Cloudflare, DHCP server options — Validation and apply behavior

DHCP relay: reach an off-subnet DHCP server

Section titled “DHCP relay: reach an off-subnet DHCP server”

DHCP Relay lets clients on the LAN talk to a DHCP server that is not on the same broadcast domain:

DHCP Relay provides a way for DHCP clients to communicate with DHCP servers that are not available on the same local subnet/broadcast domain. When you enable DHCP Relay, Cloudflare One Appliance (formerly Magic WAN Connector) forwards DHCP discover messages to a predefined DHCP server, and routes the responses back to the original device that sent the discover message.

— Cloudflare, DHCP relay

Enable This is a DHCP Relay on the LAN, set Upstream DHCP server addresses, and add more upstreams with Add upstream DHCP server address if needed. API updates use dhcp_relay.server_addresses on the LAN object.

Do not enable custom DHCP server options on a LAN that only relays; they will not be sent to clients.

If the appliance is the DHCP server, you can pin addresses to hardware:

If you configure your Cloudflare One Appliance (formerly Magic WAN Connector) to be a DHCP server, you can also assign IP addresses to specific devices on your network.

— Cloudflare, DHCP static address reservation

Use Add DHCP Reservation, enter Hardware Address (MAC) and IP Address, and repeat as needed. The API maps MAC strings to IPs under dhcp_server.reservations.

Reservations require an active DHCP server role on that LAN; they do not replace defining pool start/end and DNS for dynamic leases.

Common mistakes when configuring appliance DHCP

Section titled “Common mistakes when configuring appliance DHCP”
  • Custom options on a relay LAN — Options apply only when This is a DHCP server is selected; relay mode ignores them (DHCP server options).
  • Overriding gateway, DNS, or lease time via custom options — Codes 3, 6, and 51 are appliance-managed; set DNS via Add DNS Server and pool settings instead.
  • Duplicate option codes — Two entries with the same code per LAN are rejected.
  • Relay to a server behind Cloudflare Tunnel — Use Cloudflare WAN IPsec/GRE or CNI per the relay doc caution.
  • Expecting relay to add PXE options — Push boot options from the upstream DHCP server, or run DHCP server mode on the appliance.

After LAN changes, Edit network settings describes saving updates under Network configuration for WAN or LAN.

  1. In the Cloudflare dashboard, open Networking → Connectors, choose Appliances → Profiles, and confirm the target LAN shows DHCP server or DHCP relay as intended (Edit network settings).
  2. For DHCP server LANs, verify pool range, DNS list (including multiple DNS if used), and any DHCP server options match DHCP server and DHCP server options.
  3. On a test client, renew DHCP (dhclient or OS network renew) and confirm assigned IP, gateway, DNS, and any custom options (for example TFTP or boot file for PXE).
  4. Open the appliance View analytics → DHCP leasing to see assigned leases and expiration (Troubleshooting — DHCP leasing).
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match your appliance or the linked Cloudflare documentation, email yimasynthetic@gmail.com with the page URL and the exact statement you believe is wrong or unclear.