[Q] Determine DHCP server in Android - Android Software/Hacking General [Developers Only]

Hello,
How can I find the IP address for the DHCP server my Nexus One is attached to?
I am having a dual-DHCP server conflict but I do not know what the second server is and I do not know how to find the DHCP server IP address on my android phone.
Thanks,
Phil

2 DHCP servers in one Local network (Wired, Wireless or hybrid) will cause many problems, if you are the SysAdmin Disable one of them
anyway ,
you cant really determine what is the DHCP server unless its the same device as the router, in this case your Default gateway is the DHCP server

Related

Specifying DNS Servers for WiFi Connection

Hi Folks,
I have set up my wife's SPV E650 to hook up to our wireless network at home so she can connect to the internet through the home wireless network. We have static IP's on our LAN. Although I have specified a static IP for the E650's wireless connection, I cannot find out where I specify the DNS servers to allow her to connect to the internet via our ISP, (I know the DNS server IPs, I just can't find out where I enter that info on the E650). So at the moment, I can connect to the home network, but cannot get onto t'internet!
It is quite likely that I am being a spaz and am missing something obvious... regardless, if you can help me, let me know!
Cheers
MW
even if you have a static IP you should not have to specify a static DNS because your default gateway should be your router IP address and your router should automatically give the DNS servers to any device that pulls that ip address
Disabled said:
even if you have a static IP you should not have to specify a static DNS because your default gateway should be your router IP address and your router should automatically give the DNS servers to any device that pulls that ip address
Click to expand...
Click to collapse
Thanks for your response.
All the other devices on my home network (laptop, PC, Xbox 360, SPV M3100) ask for the DNS server to be specified in a static IP environment, and they all connect to the internet just fine through the wireless network.
I am sure you are right, but I know that none of the above mentioned devices connect to the internet without the DNS servers specified.
So, question remains, how do I specify the DNS servers on the E650? Maybe a registry entry?
@mortalwombat,
i have the same problem with my htc s710.
Even though I run the wireless network with static IPs, I set my HTC S710 to get the IP "from a server" (= dynamic IP setting).
I did this after I tried with an IP Adress within my IP Adress Range.
So what happened is that my S710 somehow gets an IP Adress from my router that is almost in my regular IP Range.
You can try to set an static IP Adress within your Range first and then switch to dynamic IP Adress on you device..
Marcus

DNS Server Settings

In my office I've had problems connecting my SPV 650 (VOX) to the wireless router.
I recently got a HTC Tattoo, and had the same problem. Eventually I stopped using the routers DHCP server, and assigned it myself, and I changed the DNS to work with the correct DNS server settings. This worked a treat.
However, on my SPV, if I assign the IP addresses etc, I have trouble with the DNS server. There is no where to set it, all I can change is the device's IP address, the gateway and the subnet mask...
Anyone know if I can set the primary and secondary DNS servers in the registry? Its doing my head in.
Thanks, Chris

[Q] wifi is connected but no internet access

hello, I'm using an htc inspire 4g. I connect to wifi but no internet access. other devices connect to the router. I tried resetting the phone and it still doesn't work. Can someone help me fix this???
here's the software information.
Android version 2.3.5
Htc sense version: 3.0
Software number: 3.20.502.52 710RD
Kernel version:2.6.35.10-ga 375925
Baseband version: 12.69a.29u_26.17.14.11_M
Build number: 3.20.502.CL380259 release keys
Browser version: webKit/533.1
You should check the settings for the WiFi network. Make sure gateway is set to the address of the router, DNS server is set to the address provided by your ISP (unless your router is providing a DNS service), and select DHCP as the means to get an IP address, or specify a static address if desired.
Sent from my Inspire 4G using xda app-developers app
---------- Post added at 10:50 PM ---------- Previous post was at 10:44 PM ----------
And subnet mask should most likely be set to 255.255.255.0
Sent from my Inspire 4G using xda app-developers app
Still not working
:crying:
MidnightJava said:
You should check the settings for the WiFi network. Make sure gateway is set to the address of the router, DNS server is set to the address provided by your ISP (unless your router is providing a DNS service), and select DHCP as the means to get an IP address, or specify a static address if desired.
Sent from my Inspire 4G using xda app-developers app
---------- Post added at 10:50 PM ---------- Previous post was at 10:44 PM ----------
And subnet mask should most likely be set to 255.255.255.0
Sent from my Inspire 4G using xda app-developers app
Click to expand...
Click to collapse
could u break it a down a bit more. The netmask was empty so i eneterd the one you gave me. i also type in the IP address that came up under the wifi that I'm connect to. I entered the IP at the gateway address. It's still not working.
Click to expand...
Click to collapse
The IP address you enter for the gateway address needs to be the local address and not the Internet address. Your router has one address that it presents to other hosts on the Internet, and one that it presents locally to systems on your home network. The former is your public IP address, and it will be assigned by your ISP. If you google "whats my IP address" on a working system on your network, and click one of the links in the result, you'll see your public IP address displayed. This is NOT what you want to enter for gateway address in your network configuration on your HTC.
You need the private address of the router. It probably starts with 192.168, and 192.168.1.1 would be a good guess. You need to consult your router documentation to see what it is. Also note that it could have been changed through the web interface to the router, by whomever configured your router. To verify you have the correct private LAN address, type http://<some IP address> in your browser, and you should see a router configuration screen, probably prompting you for a password. If you can't figure out the LAN address, post the make and model of your wireless router, and we can tell you the default LAN address, or you could google for that info also.
What do you have selected for how the IP address is specified? I guess the precise wording varies from ROM to ROM, but you can either define your own (static) IP address or select to have the router's DHCP server assign an IP address. You should select the latter, as it's simpler to configure. Then you need to make sure you have the correct DNS address. You can probably set this to the router's LAN address, which will work if the router is configured to pass through DNS requests. If that doesn't work, your ISP should somewhere tell you what DNS addresses (prime and backup) you should be using. You could also look at the network config of a working system on your LAN, and copy those settings on your HTC.
When all these settings are made, see if there is a selection to renew the DHCP lease, and do that if you find it. If you don't have that option, and it's still not working, select to "forget" the network, then connect to it again and enter all the settings from scratch and submit it.
Since you're connected to WiFi, it sounds like you have the correct password and security type set. The fact that you're connected to WiFi and not Internet suggests something is wrong with your IP configuration. Hopefully one of the things mentioned above will get you going.
It worked... Thank you
MidnightJava said:
The IP address you enter for the gateway address needs to be the local address and not the Internet address. Your router has one address that it presents to other hosts on the Internet, and one that it presents locally to systems on your home network. The former is your public IP address, and it will be assigned by your ISP. If you google "whats my IP address" on a working system on your network, and click one of the links in the result, you'll see your public IP address displayed. This is NOT what you want to enter for gateway address in your network configuration on your HTC.
You need the private address of the router. It probably starts with 192.168, and 192.168.1.1 would be a good guess. You need to consult your router documentation to see what it is. Also note that it could have been changed through the web interface to the router, by whomever configured your router. To verify you have the correct private LAN address, type in your browser, and you should see a router configuration screen, probably prompting you for a password. If you can't figure out the LAN address, post the make and model of your wireless router, and we can tell you the default LAN address, or you could google for that info also.
What do you have selected for how the IP address is specified? I guess the precise wording varies from ROM to ROM, but you can either define your own (static) IP address or select to have the router's DHCP server assign an IP address. You should select the latter, as it's simpler to configure. Then you need to make sure you have the correct DNS address. You can probably set this to the router's LAN address, which will work if the router is configured to pass through DNS requests. If that doesn't work, your ISP should somewhere tell you what DNS addresses (prime and backup) you should be using. You could also look at the network config of a working system on your LAN, and copy those settings on your HTC.
When all these settings are made, see if there is a selection to renew the DHCP lease, and do that if you find it. If you don't have that option, and it's still not working, select to "forget" the network, then connect to it again and enter all the settings from scratch and submit it.
Since you're connected to WiFi, it sounds like you have the correct password and security type set. The fact that you're connected to WiFi and not Internet suggests something is wrong with your IP configuration. Hopefully one of the things mentioned above will get you going.
Click to expand...
Click to collapse
Thank you very much it is working now. I reset the phone again and then enter the IP address, gateway address and DNS 1 and DNS 2. I"m so gratfeul. Thanks again.I used the info from the PC I am using
Click to expand...
Click to collapse
You're welcome. Glad to hear it's working.

DHCP Client not assigning the Auto IP

Hi,
I am working on a project and i need a local private network to do some testing for WiFi. I am trying to connect to a Router which is not having the DHCP server .I have manually changed the settings of Router. Since the DHCP server is not running in the Router, the DHCP client will not be able get the IP address . As I know, if there is no DHCP server in the network the DHCP client should assign an Auto IP in the series 169.254.xx.xx according to the Zeroconf logic. But this is not working. The DHCP client is getting timed out and connection is getting reset. I am using the DHCP client version 5.2.10 from Roy Marples.
Does this DHCP client support the Zeroconf? If DHCP client supports, how to enable the Auto IP ?

Assigning a static IP address to a phones hotspot

How can I assign a static IP address to my phones hotspot?
I use the hotspot on my Samsung M31 to connect my laptop running Windows 10 to the internet.
I also have Oracle's Virtual Box VM running a few test websites on the laptop on Ubuntu Server 22.04, which need a static IP address to access.
A few days back when I ran ipconfig at the Windows command prompt, it showed my wireless IP address as 192.168.166.135. Today, it show as 192.168.35.125. Meaning, all my sites are now broken. Is there a way to stop the hotspot from changing IP addresses?
Can someone please help?
Thanks,
normanscr said:
How can I assign a static IP address to my phones hotspot?
I use the hotspot on my Samsung M31 to connect my laptop running Windows 10 to the internet.
I also have Oracle's Virtual Box VM running a few test websites on the laptop on Ubuntu Server 22.04, which need a static IP address to access.
A few days back when I ran ipconfig at the Windows command prompt, it showed my wireless IP address as 192.168.166.135. Today, it show as 192.168.35.125. Meaning, all my sites are now broken. Is there a way to stop the hotspot from changing IP addresses?
Can someone please help?
Thanks,
Click to expand...
Click to collapse
I don't know the answer to your question directly as your situation is more complicated than is mine but I will try to help in so much as you can at least check what your current settings are.
My setup is only similar to yours in that I have apps (such as vysor & scrcpy) on Windows which are expecting a static IP address from my phone. However, where my setup differs from yours is I'm not using my phone as a hotspot - the router is assigning the IP addresses.
However, maybe what I've learned by randomizing my MAC address on each connection can help you - where I say maybe - as I your situation is using the phone as a hotspot and mine is passively accepting the IP address handed to the phone by the router.
In Android 11, the phone's Wi-Fi radio MAC address can be randomized per SSID, in which case the "address reservation" feature of most routers (often incorrectly called "static" IP addresses) won't work as intended. Worse, in Android 12, in Developer options, you can set a switch to randomize the Wi-Fi radio MAC address of the phone on every connection, regardless of the SSID.
Hence, you have to set the "static" IP address request in the phone itself, so that the router will respect that request for a static IP address.
(As an extra complexity, my SSID broadcast is hidden for privacy reasons (not for security - but privacy), which complicates things only a tiny bit as you have to turn off auto-reconnect for privacy.)
See the images below where maybe (but maybe not!) this information will help you track down why in your (hotspot) case, this static IP address requrest isn't being honored in your hotstpot setup.
normanscr said:
How can I assign a static IP address to my phones hotspot?
I use the hotspot on my Samsung M31 to connect my laptop running Windows 10 to the internet.
I also have Oracle's Virtual Box VM running a few test websites on the laptop on Ubuntu Server 22.04, which need a static IP address to access.
A few days back when I ran ipconfig at the Windows command prompt, it showed my wireless IP address as 192.168.166.135. Today, it show as 192.168.35.125. Meaning, all my sites are now broken. Is there a way to stop the hotspot from changing IP addresses?
Can someone please help?
Thanks,
Click to expand...
Click to collapse
Hi ,
if You are the lucky owner of a rooted phone you can try this:
How do I assign a permanent static IP address to hotspot in Android 10
I would like to assign a permanent static IP address to hotspot in Android 10 (Unofficial LineageOS 17.1 for Natrium by LuK1337, rooted with Magisk v20.3 and updated to Jan 11, 2020 build). Now whenever I turn on the hotspot, it assigns a...
forum.xda-developers.com
To assign a static IP address to your phone's hotspot:
Go to your phone's settings and find the hotspot or tethering settings.
Look for the option to set the IP address as "Static" or "Manual."
Enter the desired IP address, subnet mask, gateway, and DNS server information.
Save the settings and restart the hotspot.
For more details, you can check out https://1921681.mobi/192-168-100-1/. Hope this helps.

Categories

Resources