DHCP restore
-
I don't see a specific forum for the backup/restore and as this is specifically related to the DHCP configuration it's landing here.
Mods, please redirect me to the correct location if I'm in error.I'm (still) trying to convert from an IPCcop setup to pfSense.
At present, I have configured IPV4 DHCP, (it appears to be woring fine) created a couple of static DHCP mappings and then backued up the "DHCP Server" area.
Examining the backup xml file it's pretty easyt o figure out the format, so I dumped my IPCop DHCP static mappings and wrote a scrript to create the appropriate xml wrappers for the data.When restoring the DHCP Server area, the backup aborts with the following message:
"XML error: MAC at line 27 cannot occur more than once"Inspection reveals this simply the second MAC address in the file. No duplicates exist.
Have I somehow completely missed the concept of backup/restore for pfSense?
This being somewhat urgent if anyone has any hints on this, I'd surely apprecaite it.
-
Post the relevant part of the file. I have hard time understanding "this simply the second MAC address". And which pfSense version?
-
Post the relevant part of the file. I have hard time understanding "this simply the second MAC address". And which pfSense version?
Sorry, coffee isn't helping today for some reason:
This "this simply the second MAC address". should read "this IS simply the second MAC address in the file".
This is the file used for the restore, up to the offending MAC address - I can post the entire thing if you want, it's just a bit much for the forum I think.
I manually entered a DHCP lease, then did a backup to a file, copied the file and edited it to include my 50 or so entries from my previous configuration and attempted the restore - to the Restore Area of DHCP Server.
<dhcpd><lan><enable><range><from>192.168.20.225</from> <to>192.168.20.250</to></range> <staticmap><mac>00:04:23:df:7e:da</mac> <cid><ipaddr>192.168.20.2</ipaddr> <hostname>PE850-www</hostname> <descr><filename><rootpath><defaultleasetime>7200</defaultleasetime> <maxleasetime>86400</maxleasetime> <gateway><domain>taftbbs.com</domain> <domainsearchlist><ddnsdomain><ddnsdomainprimary><ddnsdomainkeyname><ddnsdomainkey><tftp><ldap><mac>00:13:72:fc:17:a3</mac> <cid><ipaddr>192.168.20.3</ipaddr> <hostname>PE850-03</hostname> <descr><filename><rootpath><defaultleasetime>7200</defaultleasetime> <maxleasetime>86400</maxleasetime> <gateway><domain>taftbbs.com</domain> <domainsearchlist><ddnsdomain><ddnsdomainprimary><ddnsdomainkeyname><ddnsdomainkey><tftp><ldap></ldap></tftp></ddnsdomainkey></ddnsdomainkeyname></ddnsdomainprimary></ddnsdomain></domainsearchlist></gateway></rootpath></filename></descr></cid></ldap></tftp></ddnsdomainkey></ddnsdomainkeyname></ddnsdomainprimary></ddnsdomain></domainsearchlist></gateway></rootpath></filename></descr></cid></staticmap></enable></lan></dhcpd>
Almost forgot – pfSense verion:
2.2.4-RELEASE (amd64) built on Sat Jul 25 19:57:37 CDT 2015 FreeBSD 10.1-RELEASE-p15