DHCP Failover questions

sthaug at nethelp.no sthaug at nethelp.no
Fri Nov 13 19:54:49 UTC 2009


> >> failover peer "dhcp0"
> > 
> > I think the failover peer in you config (failover peer definition and pool definition) is supposed to be the same on the primary and the secondary... That way they both sync for that pool. If they're different, they probably don't sync so they both respond as primary.
> 
> Hrm..  ok, I'll give that a shot.  I thought the identifier was only
> local to the server, and thus a name change wouldn't matter to the other
> server.

No. The failover peer "foo" name needs to be the same on primary and
secondary, and also needs to be the same as the failover peer "foo"
inside the pool declaration.

Note that you can have multiple failover associations. So for instance
server A at a main office can have a failover association (e.g. "AB")
with server B at one branch office, and another failover association
(e.g. "AC") with server C at a different branch office. Server B would
have failover peer "AB" inside the pool declaration(s) and also in the
failover declaration, while server C would have failover peer "AC"
inside the pool declaration(s) and in the failover declaration.

When the servers in a failover pair are communicating, you should expect
to see messages along the following lines in the logs:

Restarting one server, messages on this server:

Nov 13 06:56:10 dhcp2 dhcpd: failover peer dhcp1-dhcp2: I move from normal to startup
Nov 13 06:56:11 dhcp2 dhcpd: failover peer dhcp1-dhcp2: peer moves from normal to communications-interrupted
Nov 13 06:56:11 dhcp2 dhcpd: failover peer dhcp1-dhcp2: I move from startup to normal
Nov 13 06:56:11 dhcp2 dhcpd: failover peer dhcp1-dhcp2: peer moves from communications-interrupted to normal

and on the other server in the failover pair (you *do* have them NTP
synchronized, I hope):

Nov 13 06:56:03 dhcp1 dhcpd: failover peer dhcp1-dhcp2: I move from normal to communications-interrupted
Nov 13 06:56:11 dhcp1 dhcpd: failover peer dhcp1-dhcp2: peer moves from normal to normal
Nov 13 06:56:11 dhcp1 dhcpd: failover peer dhcp1-dhcp2: I move from communications-interrupted to normal

Note that *both* servers are expected to move to state "normal" - if
they don't, they aren't synchronized.

For the DHCPDISCOVER messages you should expect to see them in the logs
on both servers, with one of the servers saying "load balance to ...",
e.g.:

Nov 13 20:49:06 dhcp1 dhcpd: DHCPDISCOVER from 00:1c:df:3f:e6:ca via 81.191.80.1

Nov 13 20:49:06 dhcp2 dhcpd: DHCPDISCOVER from 00:1c:df:3f:e6:ca via 81.191.80.1: load balance to peer dhcp1-dhcp2

Steinar Haug, Nethelp consulting, sthaug at nethelp.no



More information about the dhcp-users mailing list