Navigation

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

    Configure DHCP manually

    DHCP and DNS
    2
    5
    2608
    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

      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
      • GruensFroeschli
        GruensFroeschli last edited by

        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

          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
          • GruensFroeschli
            GruensFroeschli last edited by

            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

              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
              • First post
                Last post