create_dhcp_static_mapping
Creates a DHCP static mapping that reserves a fixed IP address for a specific MAC address on a pfSense interface, so devices like servers and printers receive consistent network settings.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"interface": "<interface>",
"mac_address": "<mac_address>",
"ip_address": "<ip_address>"
},
"name": "create_dhcp_static_mapping"
}
}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 | |||