opn_add_dnsmasq_range
Create and apply a new DHCP range for dnsmasq on OPNsense. Supports IPv4 and IPv6 address ranges with optional Router Advertisement configuration.
Instructions
Create a new dnsmasq DHCP range and apply the configuration.
Use this to add DHCPv4 or DHCPv6 address ranges with optional Router Advertisement (RA) configuration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| interface | Yes | Network interface name (e.g. 'lan', 'opt1', 'opt2'). | |
| start_addr | Yes | Start of address range. IPv4: '192.168.1.100'. IPv6: uses suffix notation — '::100' (OPNsense auto-prepends the delegated prefix from the interface config). | |
| end_addr | Yes | End of address range. IPv4: '192.168.1.200'. IPv6: '::200'. | |
| prefix_len | No | IPv6 prefix length (e.g. '64'). Include this for IPv6 ranges, omit for IPv4 ranges. | |
| ra_mode | No | Router Advertisement mode for IPv6. Options: - 'slaac' — clients use SLAAC (stateless autoconfiguration) - 'ra-stateless' — RA + stateless DHCPv6 (DNS via DHCP) - 'ra-only' — RA only, no DHCPv6 address assignment Omit for IPv4 ranges. | |
| lease_time | No | Lease duration (e.g. '24h', '1h', '12h'). Default: '24h'. | 24h |
| description | No | Optional description for this range. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||