Author Topic: OpenDHCPServer issue  (Read 11517 times)

Offline alager

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
OpenDHCPServer issue
« on: November 10, 2009, 04:16:26 AM »
Has anyone used the OpenDHCPServer from SourceForge?
When we run ours we are getting a message regarding the uTasker based devices as follows:
DHCP Request from Client 10:65:a3:00:00:6a () without Discovery, ignored
and no IP address is being assigned to our devices.

Thanks for your help,
Aaron

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: OpenDHCPServer issue
« Reply #1 on: November 10, 2009, 02:17:26 PM »
Hi Aaron

I sent the following by email but am posting it here too to be sure:



I have downloaded the Opendhcp project from sourceforge and tried to find the error message.
However these errors don't seem to exist within the software - possibly the software actually reporting them is another software being started by Opendhcp (in the doc it states that it is designed to work with an external back-end - maybe the actual server is external?)

There seems to in fact be a single bit in the first byte of the MAC address which controls a mode - I stated that the first byte must be 00 to avoid this - if you can receive with your Mac address (which I expect since it has been assigned) this will not set the particular bit and thus not be a problem.

"DHCP Request from Client 00:11:22:33:44:ff () without Discover, ignored"


I understand this error to mean that there has been a DHCP request without first a DHCP discovery. In this case the request is being ignored.

This case occurs when the local IP address is known (non zero) and the DHCP client first "attempts" to get the address 'again'. Usually the DHCP server will send back a DHCP NAK, unless it decides that it wants to allocate this address 'again'.
In this case the client will switch back to full acquisition mode and go through the 'normal' process of first sending a discovery message.

My feeling is that the fact that the DHCP server is 'ignoring' rather than answering with NAK (the normal case) the DHCP client is repeating the request (with exponential back-off delays) several time - never getting an answer it like there being no server available. The DHCP client will send an event to its owner task "DHCP_MISSING_SERVER" once the delay increases to over 1 minute (about 4 attempts) and it is up to the application to decide how to continue. In the demo project this does the following:

            case DHCP_MISSING_SERVER:
                fnStopDHCP();                                            // DHCP server is missing so stop and continue with backup address (if available)
                break;



If the DHCP client is not stopped by the event the client will continue trying, but this will not help since the server will still ignore everything.
The only way around it is probably to use the FORCE flag (although I think that you had other problems with it?). Or restart the server with local IP address set to 0,0,0,0 (once the server has been started you can always copy back the backed up IP address, if required).

It is a shame that the Opendhcp server (or the back-end being used?) is not responding with DHCP NAK as is the normal case - the ignores (silently discard) look like there is no server in the network and so it is normal that it repeats in the hope of one being found....

See whether you can find a workaround based on this info. Good luck!!

Regards

Mark



Offline alager

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: OpenDHCPServer issue
« Reply #2 on: November 11, 2009, 12:26:59 PM »
Mark,

Thank you for looking at this.  Your email was a great help while researching a solution.  I did find the error message in the code.  It turns out that this DHCP server is a secondary server, which means that it relies on the primary server to do the NAK.   There is no option for making it a primary either.  I found another DHCP server by the same author which is much more popular (dual dhcp server), which has the same issue, and multiple people are confused by it's behavior according to its help forum.

Well at least I know now what to look for.  I found a different software: haneWin DHCP Server, which works great!

Thanks,
Aaron