Adding DHCP hosts from the CLI

Started by talmage, July 16, 2024, 07:35:22 PM

Previous topic - Next topic
What's the way to add another host to isc-dhcp using the CLI?

My guess is that I can add a <staticmap> stanza for the new host to the <lan> section of <dhcp> in /conf/config.xml .

How do I tell Opnsense to re-read /conf/config.xml and reconfigure dhcpd?

Is this the right way?  Is there a better way via the CLI?

Stipulating that editing /conf/config.xml is the right thing to do, https://www.reddit.com/r/opnsense/comments/16g5z62/how_to_update_config_via_cli/ says that

configctl dhcpd restart

will tell dhcp about my changes.