create_dhcp_static_mapping
Reserve a fixed IP for a device on a pfSense interface by creating a DHCP static reservation based on its MAC address, ensuring consistent lease assignment.
Instructions
Create a DHCP static mapping (reservation)
Lease times are not optional in effect: the API package materialises defaultleasetime 7200 and maxleasetime 86400 whenever the field is absent from the request, and a later PATCH sending an explicit null returns 200 but reads back unchanged. Pass the values you want at create time.
Whether the DHCP daemon acts on the per-host values is unverified. On an ISC deployment they were present in config.xml but absent from the generated dhcpd.conf; the Kea config was not readable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | Optional domain name | |
| gateway | No | Optional gateway override | |
| hostname | No | Optional hostname | |
| interface | Yes | Interface/DHCP pool (e.g., "lan") | |
| dns_server | No | Optional DNS server override | |
| ip_address | Yes | IP address to assign | |
| description | No | Optional description | |
| mac_address | Yes | MAC address to reserve for | |
| max_lease_time | No | Per-host maximum lease time in seconds. Omitted from the request when unset, in which case the API package applies its own default of 86400. | |
| apply_immediately | No | Whether to apply changes immediately | |
| default_lease_time | No | Per-host default lease time in seconds. Omitted from the request when unset, in which case the API package applies its own default of 7200. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||