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

Adding a lot of DHCP Static Mapping entries via CLI

Scheduled Pinned Locked Moved DHCP and DNS
2 Posts 2 Posters 2.3k 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.
  • E
    Eddie55
    last edited by Oct 17, 2016, 2:08 AM Oct 17, 2016, 2:01 AM

    Hello all im moving from Toastman's Tomato firmware to PFSense.
    I have lots of DHCP Static Mappings that i entered via the CLI and have saved in notepad.
    This is the following format used by Toastman's Tomato firmware

    nvram set dhcpd_static="XX:XX:XX:XX:XX:XX<192.168.1.2<computer#2<1>YY:YY:YY:YY:YY:YY<192.168.1.3<computer#3<1>"

    I have around 50 entries saved in notepad

    Is there a similar method in doing this in PFSense?

    I searched around and couldnt find much

    Nothing in the manual
    https://doc.pfsense.org/index.php/DHCP_Server#Static_IP_Mappings

    Nothing in the forum search that helped
    https://forum.pfsense.org/index.php?action=search2

    Thanks in advance</computer#3<1></computer#2<1>

    1 Reply Last reply Reply Quote 0
    • M
      muswellhillbilly
      last edited by Oct 17, 2016, 9:53 AM

      I made mention of this a couple of posts back. Your firewall config is held in /cf/conf/config.xml. The DHCP section has entries for 'staticmap', which define all the DHCP static mappings set within the firewall. You can edit this directly, following the formatting shown in any existing examples you can find in the config (if not, create a test static map entry to see what this looks like). Once you have finished editing the config file, you can run /etc/rc.reload_all to activate the changes you've made.

      I probably don't need to mention that you should take a backup of your config.xml file before making any direct changes.

      1 Reply Last reply Reply Quote 0
      1 out of 2
      • First post
        1/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received