DHCP does not set IP
Hy, i use the em1000ev and em1202ev, i try to use the dhcp and dhcp_and_setup code samples in the site, but my router doesn't set a ip to any of both EM's. My router as the ip 192.168.1.1 .
If before the dhcp Discovery i set the net.ip to 192.168.1.105 the dhcp code works and i get the first ip offered by the router 192.168.1.100. but.
If i let the net.ip equal to nothing, the discovery fase doesn ́t get any answer from the router.
I did not change nothing more in the code.
Does any one get the code to work?
Thanks again for any help.
If before the dhcp Discovery i set the net.ip to 192.168.1.105 the dhcp code works and i get the first ip offered by the router 192.168.1.100. but.
If i let the net.ip equal to nothing, the discovery fase doesn ́t get any answer from the router.
I did not change nothing more in the code.
Does any one get the code to work?
Thanks again for any help.
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?I believe that some DHCP servers need to have an initial IP before it will work correctly. In the code, the dhcp_ip variable is empty, it could have caused the problem. You have already tried to set an valid IP for the LAN before obtaining, maybe try to set something like 1.0.0.1 in place of the empty string for the dhcp_ip variable.
-
Inappropriate?In the topic "DHCP Issues" ezuk post this answer:
" Hi Ben!
Can you tell me which firmware version were you using?
I can think of a pretty basic work-around... It's a hack, though. Can you try the latest firmware, and then if it doesn't work, we'll (A) let the firmware guys know, and (B) can try the workaround I have in mind? "
What is this "Workaround"?
I wil try the ip 1.0.0.1 and post the results. -
Inappropriate?Hy,
I try the ip 1.0.0.1 an doesn't work,
i sniff the packet of dhcp discovery and is everithing ok. the only thing i think is not correct is the ip address, i think it should be 0.0.0.0 insteated of the 1.0.0.1
I also try the following: change the dhcp discovery code to be the same as my pc uses to get is IP, i snif the package and 'again' the packages are both the same (except the ip, checksums, mac address and the transaction IDs) also dont work.
What is this "Workaround" sugested by ezuk?
Loading Profile...


