[Dnsmasq-discuss] I want to try and set up a DHCP "server" to handle one subnet

Simon Kelley simon at thekelleys.org.uk
Wed Jan 4 21:59:18 GMT 2012


On 04/01/12 20:56, Dan White wrote:
> I am working in an environment where I build Linux servers.
> I want to use Cobbler which uses PXE-boot which requires DHCP to work.
> 
> This build environment is on one subnet.  I would like to run my own DHCP on this subnet using dnsmasq.
> 
> This is because the "main" DNS/DHCP, on another subnet, is running on a Windows machine and the admin thereof is not Linux-tolerant/friendly/cooperative.
> 
> The information I am looking for is :
> 
> How to restrict my server's DHCP offerings to a single subnet.
> 
> How must the Other DHCP server and routers be modified to permit this.
> ?? Disable DHCP relay to/from this subnet ??

That's it. DHCP won't go outside a "broadcast domain" without a DHCP
relay, so if the main DHCP server is on another subnet, then there must
be a DHCP relay. Stop that and there will be no DHCP service from the
main DHCP server on your subnet.

Note that in almost all circumstances, a DHCP relay is "one way", so you
can't affect other subnets by running a local DHCP server on your subnet.

> 
> Basically, how can I separate my DHCP needs from the folks who do not want to "play nice" ?

Another option you could consider is PXE-proxy. This gets complex,
partially because when people say "PXE-boot", they aften actually mean
"netboot, done with a PXE boot ROM". That doesn't actually need any PXE
support from the DHCP server; it just supplies a TFTP server address and
a filename as DHCP options. The actually PXE protocol is a much more
complex way of working, it supports interactive menus, multiple download
servers and even multicast. What relevant in this case is that is also
support a mode where the client gets it's IP address from a DHCP server
as normal, but the extra information needed to netboot comes from a
separate PXE server. So you could leave the existing DHCP arrangements
unaltered, and just add a proxy-PXE server to enable netbooting.

Dnsmasq supports this, you need something like


dhcp-range = 192.168.0.0, proxy

to enable PXE-proxy on a subnet (give the address of your subnet there,
obviously) and

pxe-service=x86PC, Cobbler, <filename>, <TFTP server IP>

to specify the file and TFTP server of the netboot download. ( the TFTP
server can be omitted if you're using dnsmasq as the TFTP server, the
filename shouldn't include the trailing ".0", PXE adds that back itself.)

The man-page has more details.


HTH

Simon.





> Thanks.
> 
> “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
> Bill Waterson (Calvin & Hobbes)
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss




More information about the Dnsmasq-discuss mailing list