[Dnsmasq-discuss] How does proxy-dhcp work ?
simon at thekelleys.org.uk
Tue Dec 17 21:32:10 GMT 2013
On 17/12/13 18:19, Robert M. Albrecht wrote:
> I'm trying to setup a dnsmasq adding some pxe-stuff in a network with an
> uncooperative DHCP-server.
> Even for this problem dnsmasq has a solution, really the
> swiss-army-knife for DNS/DHCP stuff !
> But I don't unterstand how this works. Perhaps someone could enlighten me.
> A proxy usually sitzs between server and client and does some magic like
> filtering or caching. But of both (dhcp-server and dhcp-client) are in
> the same broadcast-domain (local link whatever you might call it) so the
> dhcp-server could simply answer the request and dnsmasq would not come
> into the game.
> Or is there some logic in the pxe-clients to ask a second time, when the
> pxe-stuff was missing in the first answer ?
> I'm slightly confused how this works.
First of all, be aware that there are two different things called a
proxy in this context. The first is a DHCP proxy, often called a DHCP
helper or DHCP relay. That's a proxy as you understand it, it sits in a
broadcast domain and receives DHCP requests which it then sends on to a
server which is not in the broadcast domain. Very new versions of
dnsmasq can do this.
For the PXE stuff, a proxy is different. If you control the DHCP server,
then the PXE protocol is quite straightforward: extra PXE data is
included in the DHCP packets, and then that causes the PXE client to do
the right thing. But PXE is designed to work with non-cooperative DHCP
servers. The DHCP server works as usual, allocating the address. In
parallel the PXE-proxy hears the same broadcasts as the DHCP server, and
when is sees a broadcast from a PXE client, it replies as well as the
DHCP server. The PXE client then talks to both servers in parallel, to
do the address allocation(DHCP server) and the fancy netboot stuff (PXE
The whole spec is here
Figure 2-4 is useful in this context.
More information about the Dnsmasq-discuss