How to delay dhcp server response?

  • How can I delay a dhcp server's response to a lease request on the slave machine in a carp cluster?

    I'm running two carp-coupled pfSense 2.1, each having the dhcp server enabled. They have their failover ip configured correctly, and the adv skew is configured to 0 and 100. I see DHCP leases being served from both servers fine, but the client's name is only registered on the server that responded; the other will register the lease as well but without the client's hostname.

    As a consequence, dnsmasq will resolve the client name only if it initially registered to the same machine's dhcp server, not the other. Apparently the dhcp server response is quite random, sometimes the carp master will be the first, sometimes the carp slave. If the master was the winner, dnsmasq will resolve the client's name, otherwise the client hostname will be unknown.

    Making the client hostname known to the master dnsmasq if the slave's dhcp server issued the lease might be difficult, but as an easy fix I'd like to delay the slave's dhcp server responsiveness. If it answers with a 1 second delay, the master will usually win the lease race and client hostname resolution will be fine (obviously until there's a carp failover making the slave dnsmasq the source)

    Any suggestion?


Log in to reply