DHCP HA Howto (no need for balancing)

墨泪 ruohan.chen at alibaba-inc.com
Wed Jan 22 17:32:40 UTC 2014


Sorry for that, I just think it may reference the same question, so I treat my situation as a supplement for the post.

Here is my origin post:

> I have the nearly the same problem. I need DHCP HA, but not DHCP load balancing. here is my situation:
> 
> 1. I have a 8C network split to two 4C’s subnet
> 2. Both subnet set the `ip helper address` to one IP(suppose 192.168.2.1 here) on the switcher
> 3. DHCP servers (suppose two DHCP server) runing in the first 4C’s subnet (so DHCP server can receive all DHCPDISCOVER request in the first 4C’s subnet, but only the server who has ip 192.168.2.1 can receive DISCOVER request in the second subnet)
> 4. use DHCP failover protocol to keep dhcpd.leases db file in sync
> 5. use `Keepalived` to KEEP VIP 192.168.2.1 for routing
> 
> Then the bad things happen. Every thing works fine in the first 4C, because each server received all DISCOVER request, and response in order. But requests from the second 4C have some trouble in server response:
> 
> 1. suppose I have two dhcp server names `A` and `B`
> 2. `A` is the main server, and it hold the ip 192.168.2.1 by default.
> 3. DHCP pool split by 128 (half half)
> 4. `A` server receive request `a` and response fine.
> 5. `A` server receive request `b` and it think `B` server should response for this request, then `A` omitted this request.
> 6. Unfortunately Server `B` doesn’t receive this request (because of ip helper address settings and the Keepalived settings)
> 7. Pool little `b` request again and again, but nobody response
> 
> So how can I fix this problem?

I’m looking for a feasible solution for a huge DHCP network. In fact, we have managed a dynamic ip pool for at least 2 B class network. Network is split in to several subnet and distributed in several Data Center. Our busiest DHCP server serve for more than 20,000 servers and still run in a low system load, so load balancing is not the problem we are facing to.

The true problem is, network is enough complicated to confuse any NetOPS. Changing all subnet’s ip helper to two server ip is some kinds of risky and uncontrollable. And some old switcher even cannot support for more than one ip helper in a subnet.

I’m trying to take off dhcp failover config and use `keepalived with DRBD` to sync leases db file. Is anyone give that a try?

On Jan 23, 2014, at 12:56 AM, Steven Carr <sjcarr at gmail.com> wrote:

> On 22 January 2014 16:29, 墨泪 <ruohan.chen at alibaba-inc.com> wrote:
>> 1. suppose I have two dhcp server names `A` and `B`
>> 2. `A` is the main server, and it hold the ip 192.168.2.1 by default.
>> 3. DHCP pool split by 128 (half half)
>> 4. `A` server receive request `a` and response fine.
>> 5. `A` server receive request `b` and it think `B` server should response
>> for this request, then `A` omitted this request.
>> 6. Unfortunately Server `B` doesn’t receive this request (because of ip
>> helper address settings and the Keepalived settings)
>> 7. Pool little `b` request again and again, but nobody response
>> 
>> So how can I fix this problem?
> 
> Please don't hijack threads in future, please post a new thread.
> 
> In response to your issue stop using keepalived. DHCP failover
> requires that BOTH dhcp servers receive the broadcast messages, so
> your IP helpers must point to BOTH dhcp servers. Once you fix that
> dhcp failover will work as expected.
> 
> Steve
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users



More information about the dhcp-users mailing list