Configure DHCP manually
-
Hi,
I've a long list of mac address to configure for dhcp.
Is there a file I can manually edit to configure them (rather than repeating the same manipulation under GUI for each mac) ?
Thank you.
(pfsense 1.2)
-
You can download the config.xml and edit it directly.
The format is like this:
<dhcpd><lan><enable><range><from>10.0.0.100</from>
<to>10.0.0.199</to></range>
<defaultleasetime><maxleasetime><netmask><failover_peerip><gateway><ddnsdomain><next-server><filename><staticmap><mac>00:50:8d:50:5f:36</mac>
<ipaddr>10.0.0.10</ipaddr>
<hostname>whitemage</hostname></staticmap>
<staticmap><mac>00:1a:92:82:43:29</mac>
<ipaddr>10.0.0.12</ipaddr>
<hostname>redmage</hostname></staticmap></filename></next-server></ddnsdomain></gateway></failover_peerip></netmask></maxleasetime></defaultleasetime></enable></lan>.
.
.
.</dhcpd> -
Worked fine.
Thank you for your fast help GruensFroeschli :)
NB : for information, file is located in : /conf/config.xml
NB : system needs to be rebooted after modifying config.xml for new mac to be listed under GUI -
An easier way to get the config.xml
Diagnostics –> Backup/RestoreAfter you've finished editing the .xml you can upload it there again.
pfSense will then reload the changes and only if neccessary reboot.
(afaik just adding the static mac entries would not force it to reboot) -
Indeed, your way is better (using Backup/Restore).
(afaik just adding the static mac entries would not force it to reboot)
It doesnt, it's just that using the "Edit File", new macs won't display until I reboot.
Thanks again.