Having more than one DHCP server on a network

It seems to be a common setup to have a DSL-router or similar device that has an integrated dhcp-server (which for one or another reason may not be turned off). For setting up a second dhcp server (e.g. for LTSP, handing out filenames, root-path's etc per gusto), it is reasonable to make it “not authoritative” and only hand out offers to several, hand-configured thin clients. Read the mail below, from LTSP mailing list:

how can I configure ltsp to be a second DHCP. I do need to get the
client IP-adress from the original DHCP (a Netgear DSL-Router) but
the TFTP-Parameter from the ltsp-server. Is this possible? And how
can I do this?

First: Getting the IP from the original dhcp is imho far too complicated. Tell the netgear, if you have e.g the 10.0.3.* network, not to hand out addresses with 10.0.3.x, x > 200, and use that addresses for your thin clients. I haven't seen such a LAN router yet that wouldn't allow to delimit it's ip range far simpler than setting up a second stage dhcp setup. Of course if you can configure your LAN router to send

filename "/lts/vmlinuz.ltsp";
option root-path "";

that will do the trick: This simply asks the dhcp client to fetch any tftp stuff from this next-server. Assuming that is not possible (which is quite common for the cheaper LAN routers), proceed like this:

At least the recent etherboot versions ignore DHCP offers without “filename” (and your netgear router probably does not send out filename if not especially configured to do so). Then setup your second dhcp server to be “not authoritative” and only accept offers from your known clients. The second stage dhcp process (of LTSP dhclient) will probably ignore that netgear offers too as they don't contain a root-path (iirc you need a recent initrd-kit for that, this is only true for newer initial ramdisks).

Your dhcpd.conf might look vaguely like

------ BEGIN dhcpd.conf 
ddns-update-style none; 
not authoritative; 
default-lease-time 600; 
max-lease-time 7200; 
option domain-name "test.augustinnetz.de"; 
option subnet-mask; 
option broadcast-address; 
option routers; 
option domain-name-servers; 
option root-path ""; 
filename "/lts/vmlinuz.ltsp"; 
shared-network WORKSTATIONS { 
subnet netmask { 
host thinclient1 { 
hardware ethernet DE:AD:BE:EF:40:07; 
# insert one statement per thinclient here 
# give them ip-adresses that the netgear will never hand out 
------ END dhcpd.conf

QR Code
QR Code twodhcpservers (generated for current page)