4

I have a Wifi network to which I connect at work. The IP address has always been DHCP, but today the DHCP server is down. If I can figure out what IP address I had, I can set it statically (after checking to make sure another device hasn't already taken it, via ping from my desktop).

Does Android have a log anywhere of the IP addresses it is leased? I have root and thus can look at any file on my phone.

3

If you have USB debugging turned on, you can see the DHCP activity in the logcat. Unfortunately, without a working DHCP server, you're not going to see anything. And the logcat doesn't stick around long enough for you to see the previous day's successful negotiation. You can also see the currently-assigned IP address in Wi-Fi settings under the advanced menu. But again, this is only when everything is working right.

Without some inside knowledge about the subnet, you're reduced to guessing. Try 192.168.1.xx, 10.0.0.xx, 192.168.0.xx, etc. But you could also just check with one of your IT people.

If this happens often, I suggest checking your logcat or the settings menu when it's working and making note of the address. This will get you prepared for the next outage.

  • The DHCP server came back up, so I got the IP address. When I got home, I ran a several-hour-long recursive grep. In the end, I couldn't find a single file with that ip subnet. The logcat probably has the only reference, and as you said it is ephemeral. So I'm marking your answer as accepted. – Stephen Schrauger Oct 18 '14 at 2:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.