Bulk import DHCP reservations into pfSense?

I’m wondering if there is a way to “bulk” import a list of DHCP reservations into pfSense? I don’t see anything in the UI about it but maybe there’s a back-door way? I don’t care what format is needed, I can massage my list into that format. Just easier than typing them all in to the “add” screen one at a time!

I don’t know if there is a way to do it via the CLI, but you could add one then backup the config. Since it’s just an XML file you can edit it using the one added as a template, once you’re done just import it. I’ve done this in the past for a huge list of aliases. Just make sure you don’t mess up the formatting and generate unique GUIDs if the are required etc.

Yes, you can use the XML file to add all the devices and do a selective restore of only the DHCP server under backup/restore.

1 Like

Confused… Everything I’ve read says that the DHCP in pfsense can not use a list of MAC addresses and create a list of IP addresses that DHCP will hand out to those MAC addresses? This is how a Windows DHCP handles “DHCP reservations”.

Is this possible with pfsense? The question has come up several times in the past month or two. Or is this a case where phrases have two different meanings?

As I answered in another thread it can do reservations, but they are called static mappings. It doesn’t work in the same way a Microsoft DHCP server does, where the reservation is within he DHCP scope. In pfSense the ‘reservations’ have to be outside of the scope, but they are handed out by the DHCP server, which is rather confusing! I think it is due to the way the module that does DHCP works, and I’ve noticed that one of the offices I manage has a SonicWall that works in the same way.

Thanks Tom. That’s what I was looking for!