[clue-tech] DHCP Server and Package Install Date

Chris Hirsch chris at base2technology.com
Fri Aug 22 09:20:46 MDT 2008


David L. Anselmi wrote:
> David L. Willson wrote:
>> How do I determine which DHCP server leased my address to me, without 
>> looking at
>> anything but my own machine?  Earlier, I had a machine that had a bad 
>> address, but I
>> blamed the wrong host for issuing the bad address.  I could have 
>> saved some time by
>> knowing which host issued the address.
>
> You shouldn't have multiple DHCP servers on the same subnet, the 
> protocol doesn't allow it (where are they at with failover, anyway?) 
> There's something to be said for paying attention to what you've done 
> and what you're doing.
What if I told you that DHCP failover seems to be the best kept secret
ever? Apparently it's been available for several years now and only
recently did *I* hear about it myself.

To do failover:

dhcp.conf (Master)
failover peer "dhcp-failover" {
 primary; # declare this to be the primary server
 address master.hostname.com;
 port 520;
 peer address slave.hostname.com;
 peer port 520;
 max-response-delay 60;
 max-unacked-updates 10;
mclt 600;
 split 128;
 load balance max seconds 3;
}

include "/etc/dhcpd.master";


and really thats about it. For the slave you revers the primary and
peer. I have a single include "/etc/dhcpd.master" which is
shared/rsynced/puppet to both machines.

My dhcpd.master looks sort of like this:
subnet 10.180.1.0 netmask 255.255.255.0 {
 pool {
   failover                    peer "dhcp-failover";
   range                       10.180.1.200 10.180.1.229;
   option domain-name-servers  10.180.1.10, 10.180.1.11;
   deny                        dynamic bootp clients;
   filename                   "pxelinux.0";
   next-server                 10.180.1.11;
   deny unknown-clients;

   host blah blah blah
   }
}

Very VERY easy to do and very reliable. I can take down a dhcp server
and my network never misses a beat!

If you have any questions let me know.




More information about the clue-tech mailing list