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

Location of Static DHCP Lease File?

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
3 Posts 2 Posters 2.5k Views
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 Feb 9, 2013, 4:39 PM

    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 Feb 9, 2013, 4:56 PM

      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 Feb 9, 2013, 5:08 PM

        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
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received