[Dnsmasq-discuss] Feature request: make dnsmasq able to work as a proxydhcp

Guilherme Moro guilherme.moro at gmail.com
Mon Mar 30 23:23:15 BST 2009


hello all,

You implemented the pxe menu system (really messy spec), great work !

for the proxyDHCP, cant make it work here, what exactly to add to
dnsmasq.conf ( never used the dnsmasq before ) ?

I put only :

interface=eth0
dhcp-range=192.168.1.0,proxy
log-dhcp

it output something showing the received packet, but dont respond to the
DISCOVER, the output :

dnsmasq-dhcp: DHCP packet: transaction-id is 2735344808
dnsmasq-dhcp: Available DHCP subnet: 192.168.1.0/255.255.255.0
dnsmasq-dhcp: Vendor class: PXEClient:Arch:00000:UNDI:002001

About the 4011 port, the first version of my proxy responded only the
DISCOVER with an OFFER, as you described, but some clients (specifically the
3com client of some cards I have here) follows the spec strictly, and if
detect a proxyDHCP, they only accept to boot from a filename that come from
a REQUEST on port 4011 , they just thrown away the empty IP OFFER that he
get on the DISCOVER.

Guilherme Moro

2009/3/30 Simon Kelley <simon at thekelleys.org.uk>

> Άλκης Γεωργόπουλος wrote:
> > Στις 26-03-2009, ημέρα Πεμ, και ώρα 16:48 +0000, ο/η Simon Kelley
> > έγραψε:
> >> Alkis,
> >>
> >> Why is pxe <http://www.kano.org.uk/projects/pxe/> not suitable to do
> this?
> >
> > This project is only suitable for the first scenario that Guilherme
> > described - meaning that the server it provides only listens on port
> > 4011.
> > So the existing DHCP server must be modified to send the string
> > "PXEClient".
> >
> > This cannot be done if we don't have control over the DHCP server (and
> > we wouldn't really need a proxydhcp if we did), or if the DHCP server
> > doesn't support sending custom strings (e.g. a cheap
> > modem/router/dhcp-server that cannot be substituted by a proper PC-based
> > dhcp server for policy reasons).
> >
> > So someone would have to modify this project to be suitable for the
> > second scenario (=actually the only needed one): to listen for
> > broadcasted DHCPDISCOVERs on port 67 and answer with an empty DHCPOFFER
> > with PXEclient as the vendor identifier. And of course he would have to
> > maintain the project (last version = 2004).
> >
> > And then we would have to install dnsmasq as well for the tftp and maybe
> > the dns server.
> >
> >
> > So if you could make dnsmasq (also) act as a proxydhcp, you'd be
> > providing us with a clean solution (actually AFAIK the only open source
> > working solution), and doing us a great favor... :-)
> >
> >
>
> OK, I got a little obsessed by this over the weekend. PXE is badly
> designed, implemented worse and documented worst of all. But once I got
> my head round it (don't read the docs, use Wireshark) it turned out to
> be possible to implement a PXE service, with proxyDHCP, in only 300
> lines of extra code. I've not included support for BIS (checksumming
> images) or multicast-TFTP which keeps everything simpler.
>
> The following config is enough to show a simple menu on boot and boot
> /var/ftpd/pxelinux.0 when selected
>
> enable-tftp
> tftp-root=/var/ftpd
> dhcp-option=vendor:PXEClient,6,2b # kill multicast
> pxe-prompt="What shall I do now?"
> pxe-service=X86PC, "Netboot PXELINUX", pxelinux
> pxe-service=X86PC, "Local boot", 0
>
> It's possible to add a timeout to the prompt:
> pxe-prompt="Press F8 for boot menu", 60
>
> and it should be possible to hand-off booting to other boot servers
> (I've not tested this, as I don't have access to any at the moment)
> pxe-service=x86PC, "Install windows from RIS server", 1
>
> For Alkis, to enable proxy-DHCP for a subnet:
> dhcp-range=192.168.0.0,proxy
>
>
> I tested on three different PXE ROMs, one really old (like AMD-K6 old)
> and two much newer. The really old one isn't reliable for proxy-DHCP,
> but they all work OK otherwise.
>
> Guilherme, it turns out that proxy-DHCP from a second server doesn't
> need port 4011 at all, just reply to DHCPDISCOVER with a DHCPOFFER
> containing option 60 "PXEClient" and the correct stuff in option 43 and
> nothing else, and it just works.
>
> http://www.thekelleys.org.uk/dnsmasq/test-releases/dnsmasq-2.48test8.tar.gz
>
> It would be great if anyone with an interest could test this. There's a
> lot of buggy PXE clients out there that might need working around.
>
>
> Cheers,
>
> Simon.
>
>
>
>
>
>
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20090330/3438105c/attachment.htm


More information about the Dnsmasq-discuss mailing list