LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   sometimes udhcpc cannot NEVER grab dhcp ip address unless reboot (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/sometimes-udhcpc-cannot-never-grab-dhcp-ip-address-unless-reboot-4175431148/)

5883 10-08-2012 10:44 AM

sometimes udhcpc cannot NEVER grab dhcp ip address unless reboot
 
hi, we do this at /etc/init.d,

udhcpc --retries 4 -n -q -i eth0

if it fails, our app will run it again till we get a valid ip.
most of the time it works.
but for the case it doesn't, we never get ip unless power cycle the board.

so what could be wrong here ?
thanks very much !

theNbomr 10-09-2012 01:41 PM

I think the first line of diagnosis would be to see whether the problem is on the client or on the server, and whether it is in sending or receiving. An easy check is to see whether the DHCP server is reporting requests from your host, and whether it is saying it responds to the requests. This can probably be determined by looking in the server's system log files, probably /var/log/messages. If you don't have access to this, then I suggest setting up a temporary server on an isolated network to perform some testing.
I have not used udhcpc; I assume it is not part of the ISC DHCP package. Perhaps try using the ISC DHCP client, which provide the dhclient tool.
What exactly do you mean by 'our app will run it'? In my experience, most dhcp clients are run as a daemon process.

--- rod.


All times are GMT -5. The time now is 06:24 PM.