1

I had to fly recently. The flight had in-flight entertainment through gogoinflight, but I couldn't access it on my phone while everyone around me could. I thought the problem was with the router but I couldn't access the public wifi in the destination airport, either. I couldn't even open the wifi login pages to accept the user agreements. Nothing seemed to work!

Cellular internet works fine. Wifi at home works fine.

On another recent flight, I also took my laptop so I could check network settings against my phone's settings.

# ip addr

yielded the same subnet and same gateway

# ip route

yielded the same routes, too. (from memory)

# ip route
172.19.131.141/23 dev wlan0 proto kernel dhcp scope link src 172.19.131.0

from my laptop, the login page, or airborne.gogoinflight.com was in the 172.19.134.x subnet, but that should be fine based on the route's mask (/23).

for good measure, I added a 0.0.0.0/0 route through wlan0 but still nothing. At this point, it looked like my phone knew how to get at IP addresses, but there was a problem with the DNS settings. I checked DNS settings in /etc/resolv.conf on my laptop:

/etc/resolv.conf
--------------------
nameserver 172.19.(something).(something)  <--essentially, the access point transmitted the DNS to my laptop correctly and I was able to resolve addresses without problems

on my android phone:

/system/etc/resolv.conf
------------------------
nameserver 8.8.8.8 <--because google and android...
nameserver 8.8.4.4 <--because google and android...
nameserver 172.19.(something).(something)  <--essentially, the access point transmitted the same DNS server to my phone when I connected.

Even though I know it doesn't matter, I removed the WAN dns entries to google for good measure and made the resolv.conf file match my laptop's, but to no avail! I tried multiple browsers (Chrome and Firefox), too, to make sure it wasn't a browser setting.

any ideas?

  • Android's bionic libc resolver doesn't use /etc/resolv.conf normally: androidxref.com/9.0.0_r3/xref/bionic/libc/dns/resolv/…. And ip route isn't enough to see Android's routing table. It only shows main (254) table, while Android uses table 97 for WiFi. – Irfan Latif Jul 10 at 16:46
  • Hi, Irfan. Thanks for your response. I am unfamiliar with libc's dns resolver. Glancing through the code, it looks like it's parsing a file called _PATH_RESCONF, which, as found in resolv_private.h, is defined as "/etc/resolv.conf" or "/etc/ppp/resolv.conf" (I don't know the value of ANDROID_CHANGES). My phone doesn't have a "/etc/ppp/resolv.conf" file, so that leads me to believe it uses "/etc/resolv.conf". This is contrary to what you suggested. What would it use if not /etc/resolv.conf? – jdoggsc Jul 12 at 4:46
  • Related: android.stackexchange.com/a/205740/218526. Android's DNS resolver uses nameserver values received from DHCP which the client doesn't save to /etc/resolv.conf or any other file. – Irfan Latif Jul 12 at 4:56

Your Answer

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

Browse other questions tagged or ask your own question.