This shows you the differences between two versions of the page.

Link to this comparison view

twodhcpservers [2006/06/25 07:45] (current)
stockholm created, slightly rewritten from old wiki
Line 1: Line 1:
 +==== 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 [[http://​www.ltsp.org/​|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: 
 +<​file>​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?</​file>​
 +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
 +<​file>​filename "/​lts/​vmlinuz.ltsp";​
 +option root-path "​​opt/​ltsp/​i386";​
 +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 "​​opt/​ltsp/​i386"; ​
 +filename "/​lts/​vmlinuz.ltsp"; ​
 +shared-network WORKSTATIONS { 
 +subnet netmask { 
 +host thinclient1 { 
 +hardware ethernet DE:​AD:​BE:​EF:​40:​07; ​
 +fixed-address; ​
 +# 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)