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

    How do I move a DHCP table to another interface?

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 2 Posters 911 Views 2 Watching
    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.
    • S Offline
      skorpio
      last edited by

      I am trying to setup a LAGG for my LAN interface, I don't really have extra interfaces to play with, I have 2 interfaces I want to associate with a LAGG but one is already in use as my existing LAN interface. Basically I want that and another interface to be the LAGG members. So I have already created a LAGG and assigned the one free interface to it, but in order to add the other I need to unassign it which I assume will blow away a pretty extensive static DHCP table. Can I move that table to another interface, specifically the newly created LAGG interface? Or maybe restore a backup of it to that interface?

      Also this is a CARP cluster although if I do both in isolation from each other I'm not sure that matters as long as things are consistent between the two, is that correct? Basically unplug the link between them, redo what ever it takes to do this, then reestablish the link?

      1 Reply Last reply Reply Quote 0
      • D Offline
        darcey
        last edited by darcey

        I did something similar a while ago, albeit with a standalone instance of pfsense:

        • Exported the config xml prior to redefining interfaces.
        • Modified interface assignments in pfsense UI.
        • Exported the new config and copied in to it each <staticmap></staticmap> element (under the desired <dhcpd><interface>).
        • Imported the modified config and rebooted.

        The static leases appeared under the new interface's dhcpd config.

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          skorpio @darcey
          last edited by

          @darcey Oh, hmm, right the backup is just an XML file, so looks like I can just do a dhcpd backup, edit the interface name and restore it. I'm not sure that is what you were eluding to, but that seems like that's the answer.

          I'm looking at the XML and well, pretty simple:
          <dhcpd>
          <interface name>
          stuff...
          </interface name>
          </dhcpd>

          Just edit the backup and change interface name to the new name and restore. Looks like that'll work, and it's CARP so I have 2 shots at it :).

          D 1 Reply Last reply Reply Quote 0
          • D Offline
            darcey @skorpio
            last edited by darcey

            @skorpio said in How do I move a DHCP table to another interface?:

            Just edit the backup and change interface name to the new name and restore. Looks like that'll work, and it's CARP so I have 2 shots at it :).

            I imagine that will work fine. There are other xml nodes, at same level as the <staticmap> entries, under <dhcpcd><interfaceX>. One reason I suggested copying in each <staticmap> in to the new config. Then you have config under <dhcpdv6>, if applicable.

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              skorpio @darcey
              last edited by

              @darcey That's also all the stuff that needs to be carried over as well, looks like it is anyway, there's not all that much there that has any real parameters set. The idea is that the single interface just gets replaced with the LAGG (which has the old interface as one of it's members). Addressing and how that interface presents itself should all be the same, it's just that it'll have 2 connections to 2 different switches (stacked).

              The other issue is that "the process" involves making the firewall an island, well from a GUI perspective, while I move everything around to get all this back to the original subnet.

              Thanks for the reply BTW, my post had been hangin' out there for a while.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.