pt_configure_dhcp_server
Creates or edits a DHCP pool on a Server-PT, validates settings against the subnet, switches DHCP service on, and reads every pool back.
Instructions
Creates or edits a DHCP pool on a Server-PT (GUI: Services > DHCP), validated against
its subnet, switches the service on and reads every pool back. No CLI (a Server-PT has none).
Router DHCP: plan with dhcp=True or CLI ip dhcp pool. Exclusions or showing the page on
screen: pt_server_dhcp (same JS backend, server_dhcp_js).
The server needs a static IP inside the pool's subnet (else warning DHCP_SERVER_NO_IP). PT never leases the server's own IP but DOES lease the gateway's if the range covers it.
device: the Server-PT.
network / mask: pool subnet ("192.168.10.0", "255.255.255.0"). No network = read-only.
gateway / dns: what clients receive (empty dns = left alone).
start_ip: first IP handed out; empty = after a .1 gateway, else the first host.
max_users: number of IPs; 0 = to the end of the subnet.
pool_name: default "serverPool" (the factory pool the GUI shows); another name creates or edits that pool, never duplicates.
port: serving port (default FastEthernet0). enabled: service On/Off.
drop_factory_pool: with a custom pool_name, delete the factory serverPool if it was never configured (it would hand out .1, the gateway).
remove: delete pool_name instead. dry_run: validate and return the JS only.
Example: pt_configure_dhcp_server(device="DHCP-A", network="192.168.10.0", gateway="192.168.10.1", dns="8.8.8.8", start_ip="192.168.10.3")
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": {
"device": "<device>"
},
"name": "pt_configure_dhcp_server"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dns | No | ||
| mask | No | 255.255.255.0 | |
| port | No | FastEthernet0 | |
| device | Yes | ||
| remove | No | ||
| dry_run | No | ||
| enabled | No | ||
| gateway | No | ||
| network | No | ||
| start_ip | No | ||
| max_users | No | ||
| pool_name | No | serverPool | |
| drop_factory_pool | No |