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

Configure DHCP manually

Scheduled Pinned Locked Moved DHCP and DNS
5 Posts 2 Posters 2.9k 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.
  • ?
    Guest
    last edited by Apr 23, 2008, 2:29 PM

    Hi,

    I've a long list of mac address to configure for dhcp.

    Is there a file I can manually edit to configure them (rather than repeating the same manipulation under GUI for each mac) ?

    Thank you.

    (pfsense 1.2)

    1 Reply Last reply Reply Quote 0
    • G
      GruensFroeschli
      last edited by Apr 23, 2008, 2:40 PM

      You can download the config.xml and edit it directly.

      The format is like this:
      <dhcpd><lan><enable><range><from>10.0.0.100</from>
      <to>10.0.0.199</to></range>
      <defaultleasetime><maxleasetime><netmask><failover_peerip><gateway><ddnsdomain><next-server><filename><staticmap><mac>00:50:8d:50:5f:36</mac>
      <ipaddr>10.0.0.10</ipaddr>
      <hostname>whitemage</hostname></staticmap>
      <staticmap><mac>00:1a:92:82:43:29</mac>
      <ipaddr>10.0.0.12</ipaddr>
      <hostname>redmage</hostname></staticmap></filename></next-server></ddnsdomain></gateway></failover_peerip></netmask></maxleasetime></defaultleasetime></enable></lan>

      .
      .
      .
      .</dhcpd>

      We do what we must, because we can.

      Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

      1 Reply Last reply Reply Quote 0
      • ?
        Guest
        last edited by Apr 23, 2008, 3:07 PM Apr 23, 2008, 3:03 PM

        Worked fine.

        Thank you for your fast help GruensFroeschli :)

        NB : for information, file is located in : /conf/config.xml
        NB : system needs to be rebooted after modifying config.xml for new mac to be listed under GUI

        1 Reply Last reply Reply Quote 0
        • G
          GruensFroeschli
          last edited by Apr 23, 2008, 3:15 PM

          An easier way to get the config.xml
          Diagnostics –> Backup/Restore

          After you've finished editing the .xml you can upload it there again.
          pfSense will then reload the changes and only if neccessary reboot.
          (afaik just adding the static mac entries would not force it to reboot)

          We do what we must, because we can.

          Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

          1 Reply Last reply Reply Quote 0
          • ?
            Guest
            last edited by Apr 23, 2008, 4:01 PM

            Indeed, your way is better (using Backup/Restore).

            (afaik just adding the static mac entries would not force it to reboot)

            It doesnt, it's just that using the "Edit File", new macs won't display until I reboot.

            Thanks again.

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