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

    DHCP from Backup Node?

    Scheduled Pinned Locked Moved HA/CARP/VIPs
    5 Posts 2 Posters 980 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.
    • ?
      A Former User
      last edited by

      Hi all,

      I configured CARP and it appears nearly everything is working fine. When logged on on the master I can go into maintenance mode and the secondary takes control. Fine so far.

      But I am having an issue with DHCP.
      I have DHCP Server enabled on a CARP'ed Interface. I can not assign DHCP to the Virtual IP (is not offered) so dhcpd is listening on the interface.
      I configured DHCP to send DNS and Gateway as the Virtual IP. I configured HA to sync DHCP server settings to slave. So I expect the dhcp-client to have 192.168.21.254 as gateway address and the same as DNS server.

      DNS works (has .254) but gateway is .202 (IP of backup) instead of the Virtual IP.

      I can ping Virtual IP, ping master IP and ping secondary IP. But I can not reach any host outside my own network.

      Do you guys have any clue what ist going on here?

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by

        Just as addition:

        When I manually disable DHCP server on backup everything goes as expected.

        Isn't the service handled by CARP/ HA?

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User
          last edited by

          Realized meanwhile I have to set the slave IP to sync additional on the dhcp settings on master.

          It is not sufficient to have it configured on the HA/sync part...

          No the only not working is my Captive Portal.

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            You have to set the DHCP server to give the interface CARP VIP as the gateway to the clients. The same holds true for the DNS servers given to the clients if you are using pfSense for that.

            Yes, you have to add the address of the secondary node on that interface to enable shared DHCP between the two. This should do the right thing and add the address of the primary in the same place on the secondary.

            ISC DHCP HA is kind of a strange beast. Both nodes are actually answering queries using a portion of the pool. It is the only thing that I can think of that is close to active/active in pfSense HA (which is active/passive).

            If you view Status > DHCP Leases you should see normal/normal on both nodes. If not, something is wrong.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            ? 1 Reply Last reply Reply Quote 0
            • ?
              A Former User @Derelict
              last edited by A Former User

              @derelict said in DHCP from Backup Node?:

              If you view Status > DHCP Leases you should see normal/normal on both nodes. If not, something is wrong.

              Yes, I got it working so far, and yes I gave both gateway and DNs the CARP Virtual IP. After figuring out I have to add the slave IP there it started working.

              Unfortunately only on two of the interfaces, but not on the third.
              There it says "My state: recover" and "Peer State: unknown state"

              This is obvious not "normal", but how do I troubleshoot? I alread stopped both services and removed the dhcp-leases files on both servers, but no change.

              I can ping both addresses vice-versa. How can I troubleshoot?

              After re-configuring the dhcp service again and again it went finally to "normal/normal". So it is working now and I am fine.

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