iPXE discussion forum
A problem of DHCP in iPXE - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: A problem of DHCP in iPXE (/showthread.php?tid=7603)

A problem of DHCP in iPXE - naruto - 2015-01-31 05:29


I have configure a DHCP server in machine called Server, and I have about eight machines booting by using iPXE called Client1 ...-> Client8. I tried to reboot Server and eight clients at the same time. In total of about 20 times reboot, there are sometimes I see that iPXE in some clients gets the same IP address. For ex,

Assumption that Client1 -> Client8 receives IP1 -> IP8 from DHCP

In successful case, after rebooting all machines, Clien1 to Client8 can receive IP1-IP8 correspondingly and iPXE can get boot correct dump for every client by boot file name option in DHCP server configuration.

In fail case, after rebooting all machine, from the DHCP server log, I see that when Client1 sends DHCPDISCOVER to Server, Server sends DHCPOFFER with IP1 for Client1. Meanwhile Client5 also sends DHCPDISCOVER, server sends DHCPOFFER with IP5 for Client5. In the next step in the dhcp log, I see that Client1 surprisingly sends DHCPREQUEST for IP5 (not IP1), so Server sends DHCPNAK to Client1 as IP5 is reserved for Client5. Client5 also sends DHCPREQUEST to Server and Server returns DHCPACK for successful lease. At this time, tftp starts to download dump and amazingly Client1 and Client5 tries to download dump of Client5. Client1 should download the dump for it but maybe it receives the wrong DHCPOFFER and tries to download dump of Client 5 through the boot file name option in DHCPOFFER package.

My question is why iPXE on Client1 is replying to wrong DHCPOFFER?.The second question is that why Client1 is (probably) ignoring he DHCPNAK received from the Server and start tftp to download dump?. Is it a really problem in DHCP implement of iPXE.

I make sure that DHCP server configuration is correct. This problem I see is about five times in 20 times rebooting.

I am using undionly.kkpxe to boot.

Thanks alot

RE: A problem of DHCP in iPXE - robinsmidsrod - 2015-02-04 09:10

It seems to me that you have dynamic leases in your DHCP setup, but expect static leases for each client. TO be able to debug this we'd need to look at a packet capture of the DHCP transactions. You should be able to capture on the DHCP server using the method explained in http://ipxe.org/howto/pcap. Once you have the .pcap file, you can upload it to https://appliance.cloudshark.org/upload/ so that we can have a closer look. You should filter your log to only include communication between the DHCP server and the clients. Be aware that security sensitive information (like usernames or password) could be present in you packet capture files.

RE: A problem of DHCP in iPXE - granath - 2016-06-27 16:41


I am experiencing exactly the same problem as naruto.
Did anyone mange to get to the root cause?


RE: A problem of DHCP in iPXE - mcb30 - 2016-07-04 10:04

(2016-06-27 16:41)granath Wrote:  I am experiencing exactly the same problem as naruto.
Did anyone mange to get to the root cause?

Do you have a packet capture taken from the DHCP server, showing the erroneous behaviour?



RE: A problem of DHCP in iPXE - granath - 2016-09-26 16:18


I have sent a pcap file to ipxe-devel@lists.ipxe.org.