Re: [Dnsmasq-discuss] specifying dhcp options in proxy mode
On 05/26/2017 10:43 AM, Andriy Gapon wrote: That actually made sense as the DHCP sever could be configured to provide different information depending on the PXE client. That's how my environment is setup: dnsmasq offers a menu of boot options (via pxe-service + pxe-prompt) to a client that's built into network cards, but provides root-path, etc, to pxeboot. That may work for some limited use-cases. But I don't think it's a very good solution, as you can only have one FreeBSD item in your menu that way, and not multiple with different root-paths. Think a better long term solution would be if some effort was made to add support in iPXE to boot FreeBSD kernels directly without pxeboot, and pass parameters to them, like is possible with Linux kernels. Can then create a menu using an ipxe script. iPXE's menu support is a lot more capable then the limited menu functionality offered by normal PXE through dnsmasq. Yours sincerely, Floris Bos ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] proxy for pxe - intro
On 25/05/2017 20:16, Carl Karsten wrote: > Andriy's questions have me interested, maybe this will help when I want to pxe > boot a machine but don't have access to the dhcp server. > > like if I have 2 laptops B (proxy) and C (pxe client) both plugged into a lan > with dhcp server A and gateway G. I want C to get IP/subnet/gateway assigned > by > A, but also next-server/filename assigned by B. > > I am assuming there is some trick to tell C to only work with proxy B and > ignore > responses from A? > > can it be done with settings or do I need to physically (or switch config) > isolate C from A? > > feel free to point me at a doc that explains this I simple Google query for "dnsmasq pxe proxy" returns very useful results right at the top (at least, it does for me). E.g.: https://n0dy.com/blog/2014/09/14/network-booting-with-dnsmasq-in-proxy-mode/ https://wiki.fogproject.org/wiki/index.php?title=ProxyDHCP_with_dnsmasq https://manski.net/2016/09/pxe-server-on-existing-network-dhcp-proxy-on-ubuntu/ http://danielboca.blogspot.com/2012/02/boot-linux-from-network-using-pxe-and.html -- Andriy Gapon ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] specifying dhcp options in proxy mode
On 25/05/2017 20:48, Floris Bos wrote: > I am pretty sure it didn't send any additional DHCP packets itself in the > past. Looks like it is the other way around. I am using an older version of FreeBSD and it does send those packates because I see them with Wireshark. > And code seems to reflect that. > It copies the cached packet from the initial PXE client to a variable > bootp_response here: > > https://github.com/freebsd/freebsd/blob/master/sys/boot/i386/libi386/pxe.c#L231 In the FreeBSD that I use this code path is always taken: https://github.com/freebsd/freebsd/blob/stable/11/sys/boot/i386/libi386/pxe.c#L288 if (rootip.s_addr == 0) { /* * Do a bootp/dhcp request to find out where our * NFS/TFTP server is. Even if we dont get back * the proper information, fall back to the server * which brought us to life and a default rootpath. */ bootp(pxe_sock, BOOTP_PXE); The code does retrieve the cached information, but performs DHCP discovery anyway and uses the cached information only as a fallback if the discovery fail. That actually made sense as the DHCP sever could be configured to provide different information depending on the PXE client. That's how my environment is setup: dnsmasq offers a menu of boot options (via pxe-service + pxe-prompt) to a client that's built into network cards, but provides root-path, etc, to pxeboot. Thank you for pointing me to the new code. -- Andriy Gapon ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss