Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Browser hostnames does not get resolved if domain name is not appended [closed]

I am trying open a site hosted on my localhost using machine name in an android browser. When I type in machine name on a desktop browser , it gets resolved, but in an android device I get webpage not available. Server has been configured to handle DNS correctly and we do not see any errors.Please help.

Thank you

like image 797
user1110790 Avatar asked Dec 28 '11 01:12

user1110790


People also ask

How does a domain name get resolved?

The resolution of the domain name is done by the DNS server. Domain resolution is also called domain pointing, server settings, domain configuration, reverse IP registration, and so on. To put it simply, the easy-to-remember domain name is resolved into IP.

What is hostname and domain name?

A host, or website, on the Internet is identified by a host name, such as www.example.com . Host names are sometimes called domain names. Host names are mapped to IP addresses, but a host name and an IP address do not have a one-to-one relationship. A host name is used when a web client makes an HTTP request to a host.

How do I resolve a domain name locally?

Domain names or IP addresses on a local computer can be resolved by adding entries in the local hosts file on a computer. Entries in the local hosts file have the added advantage that the system can run the application server, even when disconnected from the network.


2 Answers

There's two things at play here...

1: How is your machine name getting resolved? There are several mechanisms for this.

Windows machines use a combination of NetBIOS/WINS/ActiveDirectory to discover other machines on the local network. (Linux/Mac machines can access this data SAMBA, assuming it's enabled.)

Macs use Bonjour/Zeroconf to find each other.

Some home routers (e.g. routers running Tomato) will add an entry to a local DNS server when a DHCP lease is granted, based on the machine name being reported.

Android doesn't have SAMBA or Zeroconf services installed, so we have to rely on what's provided by your DNS server.

2: Assuming your DNS server automatically updates itself to reflect DHCP leases, there is a known issue where Android devices don't use the DNS search path provided by DHCP. As a result, only fully qualified doman names are resolved.

Here's the bug report: http://code.google.com/p/android/issues/detail?id=8030

As a workaround, try to find the FQDN for the devices you're trying to access.

like image 183
Trevor Johns Avatar answered Oct 11 '22 11:10

Trevor Johns


The problem with that work-around is that it does not change the real problem. The real problem is one of corporate stupidity and shortsightedness.

Mobile computing is only as good as your ability to easily and seamlessly find your data, no matter where you are. Your smart phone, and your tablet PCs, all MUST use networking in the very same manner as your desktop and laptop.

Any that do not do so are doomed to fail the moment that any competitor DOES.

fact -

A huge number of average people have small networks in their homes which they use with their phones (or try to), laptops, media streamers, SAMBA shares, wireless printers, etc. They use routers used in home networks with floating IPs to share their networks wirelessly.

Corporate computing has evolved and exist already. Existed before the new tablets came out. The tablets and smart phone creators are ignoring (at extreme peril) the standards in place.

see also - they are stupid and do not listen

The existing world uses standard DNS when it uses TCP. It uses it and needs to have it just to function. That is not going to change just for these people. They must adapt or they will fail.

Fact : all of the Android and Apple OS tablets (and SMART phones) run on operating systems that lack fully functional DNS.

  • You can't dynamically explore the network.
  • you can't access you network shares by HOSTNAME and SHARE name
  • You cannot search and see a list of all connected workgroups, HOSTNAMEs and domains you have access to
  • You cannot specify a HOSTNAME for your phone or tablet and have it stick to your floating IP properly with a short name that resolves
  • you cannot get HOSTNAMES to resolve like they do everywhere else (since the 1970s).

ANDROID and the MAC tablets have pushed us all back into a BAD world in which we must all maintain our own HOSTS files again. I feel like I am trying to fix an improperly configured copy of SCO UNIX

and this is a big MISTAKE FAR LARGER THAN A DRIVER ISSUE, OR HAVING "flash" or some obscure piece of JAVA. The very first competitor that gets the entire network functioning RIGHT and seamlessly right out of the box (no root the phone into a brick) will smash the competition rapidly if they are at all affordable.

A shame really as I like both devices for what they COULD do if their OS was not broken.

like image 22
barleysinger Avatar answered Oct 11 '22 10:10

barleysinger