0

I'm trying to fix an issue where Android fails to ping computers on the local network using the hostname instead of the IP. After research, the crux of the issue is that Android does not use DNS from the router and instead uses its own DNS servers.

What is not working / I am failing to understand is that force setting the DNS server as the router/gateway IP does not work on Android or Windows. This answer makes me think it should be possible to specify the DNS as the router (192.168.1.1).

So my thought was that setting the DNS to 192.168.1.1 in the Ipv4 options of my WiFi adapter should work, as so:

Windows IPv4 DNS Settings:

Screenshot.

Instead, local and external hostnames cannot be resolved at all.

My assumption has been that routers can act as DNS servers; they will try to resolve local hostnames and failing that query the DNS servers configured in the router themselves - thus it should be possible for connected devices to use them as a DNS.

Personally I thought if "Obtain DNS Server address autonomatically" is left ticked, then the router itself is used as the DNS because if not, how are local hostnames ever resolved if a different DNS server is used?

Simply put: can a router be used as a DNS server directly without setting up a separate DNS server on the network?

1
  • Check the general Android network settings and disable there the private DNS mode. Then the router should be used as DNS server again.
    – Robert
    Jan 16, 2022 at 20:45

1 Answer 1

0

If you leave the DNS server of Windows as "Obtain DNS server address automatically", it will use the router as its DNS server.

You can verify that by running the command ipconfig /all.
Here is an example of what it gives on my computer:

enter image description here

For Android, please post your question on Android Enthusiasts Stack Exchange. Android question are off-subject here, so this may get this post closed.

2
  • As stated in my post, this does not work in Windows, so the question is not pertaining to just Android. When setting the DNS in Windows to the router/gateway IP (as seen in the picture of my OP), local hostnames are no longer resolved. If it should be working, I guess something else is a factor.
    – Stefan
    Jan 16, 2022 at 22:24
  • There is no way that it won't work, unless your router is configured in a strange way. Try to factory-reset the router (some settings may be returned to default values).
    – harrymc
    Jan 17, 2022 at 8:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .