Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Location of Static DHCP Lease File?

    Problems Installing or Upgrading pfSense Software
    2
    3
    2.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      ultrajones
      last edited by

      I would like to add about 55 static DHCP leases into pfSense.  Can someone point me to the location of the file so I can add them?

      Regards,
      Ultrajones

      1 Reply Last reply Reply Quote 0
      • U
        ultrajones
        last edited by

        I found it.  Looks like I need to download the DHCP config, add my entries and upload the config.

        Regards,
        Ultrajones

        1 Reply Last reply Reply Quote 0
        • P
          phil.davis
          last edited by

          Yes, all the settings are stored in config.xml - so yyou need to get the dhcpd section of that and add your static mappings in the same format as an existing one. For example, here is a tpyical DHCPD section of config.xml:

          	 <dhcpd><lan><range><from>10.99.0.200</from>
          				<to>10.99.0.239</to></range> 
          			 <defaultleasetime><maxleasetime><netmask><failover_peerip><gateway><domain><domainsearchlist><ddnsdomain><tftp><ldap><nextserver><filename><rootpath><dhcpleaseinlocaltime><numberoptions><enable><staticmap><mac>00:9c:02:07:89:1e</mac>
          				<ipaddr>10.99.0.25</ipaddr>
          				<hostname>PRINTER-01</hostname>
          
          				 <filename><rootpath></rootpath></filename></staticmap> 
          			 <staticmap><mac>00:1d:e0:03:46:21</mac>
          				<ipaddr>10.99.0.81</ipaddr>
          				<hostname>ADMIN-PC-01</hostname>
          
          				 <filename><rootpath></rootpath></filename></staticmap> 
          			 <mac_allow><mac_deny></mac_deny></mac_allow></enable></numberoptions></dhcpleaseinlocaltime></rootpath></filename></nextserver></ldap></tftp></ddnsdomain></domainsearchlist></domain></gateway></failover_peerip></netmask></maxleasetime></defaultleasetime></lan> 
          		 <opt1><range><from>10.99.1.192</from>
          				<to>10.99.1.223</to></range> 
          			 <defaultleasetime><maxleasetime><netmask><failover_peerip><gateway><domain>extralan.mydomain</domain>
          			 <domainsearchlist><enable><ddnsdomain><tftp><ldap><nextserver><filename><rootpath><dhcpleaseinlocaltime><numberoptions><staticmap><mac>00:1d:09:56:78:13</mac>
          				<ipaddr>10.99.1.50</ipaddr>
          				<hostname>HR-PC-01</hostname>
          
          				 <filename><rootpath></rootpath></filename></staticmap> 
          			 <mac_allow><mac_deny></mac_deny></mac_allow></numberoptions></dhcpleaseinlocaltime></rootpath></filename></nextserver></ldap></tftp></ddnsdomain></enable></domainsearchlist></gateway></failover_peerip></netmask></maxleasetime></defaultleasetime></opt1></dhcpd> 
          

          As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
          If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.