Archive > 21.7 Legacy Series

Migrate DHCP Leases from PFSense to OPNSense

(1/1)

Dowd:
So I am in the process of trying to fix our existing network, one of the moves we are making is migrating from our several year old pfsense install that wont update to opnsense. I have several things to fix post move, but I want to initially just migrate between the two instances and not have any issues in house with people (things like shared printers not working, etc).

To achieve that I want to move pfsense's dhcp leases to our opnsense instance. I did some research and it appears they are stored in /var/dhcpd/var/db/dhcpd.leases on pfsense. It appears the same file exists on opnsense as well with values.

Is there any issue with how opnsense works if I copy the values from this file and paste it into the same location on opnsense then restart? Would this work?

Dowd:
I didnt get any replies to this, but I am following up in case anyone has a similar question.

So I went ahead and copied the values from /var/dhcpd/var/db/dhcpd.leases in PFSense and copied them to OPNSense /var/dhcpd/var/db/dhcpd.leases. PFSense and OPNSense both have a server-duid value. I am not sure what the purpose of this value is, but I took the OPNSense server-duid value and pasted it into the PFSense dhcpd.leases file instead of the default pfsense one.

Rebooting the server afterwards showed all the DHCP leases from PFSense in OPNSense and we didn't have any issues so far, I confirmed all the DHCP devices retained their IPs after the router swap.

chemlud:
Sounds like a crude hack :-D

I would have tried to import this section of config.xml from pfsense. No guarantee this works though...

Have you tried exporting config.xml on your opnsense and see if there is the appropriate section for DHCP?

Dowd:

--- Quote from: chemlud on January 20, 2022, 03:34:11 pm ---Sounds like a crude hack :-D

I would have tried to import this section of config.xml from pfsense. No guarantee this works though...

Have you tried exporting config.xml on your opnsense and see if there is the appropriate section for DHCP?

--- End quote ---

I didn't, I thought there would be discrepancies between the configs and I wasn't sure if the non-static DHCP entries would show up. I am still not sure about the former, but the latter is confirmed from my export. I didn't want clients to get issued new IP addresses from the DHCP pool, but I also dont want to make static entries for every single device at this stage.

Navigation

[0] Message Index

Go to full version