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

How to Add bulk of Mac Address with IP address into DHCP server.

Scheduled Pinned Locked Moved DHCP and DNS
9 Posts 3 Posters 5.1k 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.
  • H
    hny1
    last edited by Nov 2, 2015, 8:30 AM

    i am new in this forum , my apologies if this question has already been asked before.
    i wan to Check "Deny unknown Clients" in DHCP server setting.
    want to add 100s of Mac addresses in this list below to allow the access to DHCP server.
    is there any to add all the Mac address Using .CVS file?

    1 Reply Last reply Reply Quote 0
    • M
      muswellhillbilly
      last edited by Nov 2, 2015, 8:50 AM

      Not directly, as I understand it. Although if you examine the /conf/config.xml file, you'll see that static entries are set up in the <dhcpd>section of the config file. You could write a short script which could take your CSV file and convert this into a text file with the corresponding entries formatted as XML, then just cut and paste these directly into the config.xml file.

      If you set up a test static entry and then examine the /conf/config.xml file you'll see how the format looks. (See below)

      <staticmap><mac>88:67:9a:1f:43:e8</mac>
                                      <ipaddr>172.16.16.242</ipaddr>
                                      <hostname>static1</hostname></staticmap></dhcpd>

      1 Reply Last reply Reply Quote 0
      • H
        hny1
        last edited by Nov 2, 2015, 9:56 AM

        thank you so much for your reply,
        i am almost done with this. please tell what does <netbootfile>means?</netbootfile>

        1 Reply Last reply Reply Quote 0
        • M
          muswellhillbilly
          last edited by Nov 2, 2015, 10:25 AM

          I believe netbootfile refers to the entry for the file the device you're entering for the static entry to boot from across the network. This is left blank in my cases, so the entry for <netbootfile>is just left there as a placeholder. From what I can gather, it is required for each entry, even if the device doesn't require the information. Though I'm not a developer so I can't speak with authority on that.</netbootfile>

          1 Reply Last reply Reply Quote 0
          • H
            hny1
            last edited by Nov 2, 2015, 10:34 AM

            ok i have done it. thank you once again.

            For others convenience i have used online converter to convert .CSV file to .XML .
            i don't know rather it is allowed to share the link here or not. everybody can google it.

            1 Reply Last reply Reply Quote 0
            • H
              hny1
              last edited by Nov 25, 2015, 11:51 AM

              Dear,
              I have conveted and copied it to config.xml file.
              Now do i need to refresh pfsense or something to update the arp table?
              If yes then how?

              Waiting for your kind reaponse .
              Thanx

              1 Reply Last reply Reply Quote 0
              • M
                muswellhillbilly
                last edited by Nov 26, 2015, 9:09 AM

                Assuming you've entered all the data correclty, just restore the file to the system (Diagnostics/Backup+Restore).

                Make sure you take a backup of your running config first before you restore the file you amended!**

                1 Reply Last reply Reply Quote 0
                • P
                  pozolero Rebel Alliance
                  last edited by May 5, 2016, 3:07 PM

                  @hny1:

                  ok i have done it. thank you once again.

                  For others convenience i have used online converter to convert .CSV file to .XML .
                  i don't know rather it is allowed to share the link here or not. everybody can google it.

                  How did you do your csv file to be converted as xml online?  would you post by inbox the url where you convert it?

                  This because i'm doing an excel file using columns as titles, and lines as values, but i think i'm doing wrong.  :-[

                  would you help, please?

                  Regards

                  1 Reply Last reply Reply Quote 0
                  • M
                    muswellhillbilly
                    last edited by May 5, 2016, 3:24 PM

                    @pozolero:

                    @hny1:

                    everybody can google it.

                    http://www.freeformatter.com/csv-to-xml-converter.html
                    http://xmlgrid.net/csvToXml.html
                    http://www.convertcsv.com/csv-to-xml.htm

                    …and so on...

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                      [[user:consent.lead]]
                      [[user:consent.not_received]]