LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   How To know if a host configured with DHCP has obtained IP address from DHCP server? (https://www.linuxquestions.org/questions/suse-opensuse-60/how-to-know-if-a-host-configured-with-dhcp-has-obtained-ip-address-from-dhcp-server-459391/)

Prassanta 06-29-2006 04:09 AM

How To know if a host configured with DHCP has obtained IP address from DHCP server?
 
Hi

How To know if a host configured with DHCP has obtained IP address from DHCP server? Is there any system call or any other way.The purpose is i will run my application which will listen on the IP(obtained from DHCP)on the host after DHCP obtained an IP address.


Regards
Prassanta

cdhgee 06-29-2006 09:48 AM

ifconfig will tell you if the host has an IP address. If it is configured for DHCP and the interface is up but it has not yet obtained an address, there will be no IP address listed although the interface itself will still be listed.


All times are GMT -5. The time now is 08:22 AM.