Negotiated HSPA DNS settings don't work

HSPA setup and configuration (for wireless networking, please use the 'Networking issue' forum)
fsm
Posts: 75
Joined: Thu Apr 01, 2010 10:46 pm
Location: Aus

Negotiated HSPA DNS settings don't work

Post by fsm » Fri Apr 02, 2010 4:22 am

I don't know if this should be in the FAQ thread or not:

Is it just me or do other people find that the DNS settings obtained from the PPP negotiation with their HSPA modem do not work. I get what I suppose is the standard Optus settings of 10.11.12.13 10.11.12.14 rather than the normal Exetel values and have to hardwire Exetel's addresses for it work. I'm using Linux with a Sierra Wireless modem if it matters.

When I was on Virgin, I found DNS services via the above addresses would drop out occasionally, so it was better to hardwire them but I found with Exetel the automatic settings did not work immediately from the first lookups of my initial connections. Does anyone know why and perhaps can shed some light is what is going on at lower level of the modem network interface? Should I open a ticket? I have an acceptable workaround - I'm just curious that's all and it may put off new users since its not readily documented.

User avatar
Dazzled
Volunteer Site Admin
Posts: 5992
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: Negotiated HSPA DNS settings don't work

Post by Dazzled » Fri Apr 02, 2010 8:42 am

The Linux laptop machine I use with HSPA has gone away for a short while so I can't check it, but those addresses are from the handshake with the modem (they are internal, not an ISP). For some reason you aren't going on to find the Exetel servers. Depending on your distro, you may find that the line: prepend domain-name-servers 220.233.0.4, 220.233.0.3; entered into /etc/dhcp3/dhclient.conf above the request line will do the trick for good. You can add public servers as well if you like. This will also change resolv.conf at boot. The Gnome Network Manager 0.7 that comes with Ubuntu etc is preconfigured for an Exetel connection. The Ubuntu based distros, for example, are always set up in resolv.conf to obtain a name server from the modem unless you change a setting like the above - there is no GUI.

cubic
Posts: 161
Joined: Tue Nov 16, 2004 11:19 am
Location: Lake Macquarie NSW

Re: Negotiated HSPA DNS settings don't work

Post by cubic » Fri Apr 02, 2010 11:37 am

I've seen the negotiated resolver addresses come out blank intermittently and the default Ubuntu Exetel setup in NM doesn't (or at least didn't at the time) include the resolver addresses. Using the e169 this simply results in a blank resolv.conf - it looks like a Sierra thing to return these spurious resolvers instead.

There is a GUI to set resolvers manually though, specific to each connection - just go to NM edit connections, Mobile Broadband, Edit, IPv4 settings tab.
...the term 'Future Perfect' has been abandoned since it was discovered not to be - Douglas Adams

fsm
Posts: 75
Joined: Thu Apr 01, 2010 10:46 pm
Location: Aus

Re: Negotiated HSPA DNS settings don't work

Post by fsm » Tue Apr 06, 2010 1:37 am

As I mentioned, I got the weird DNS addresses with Virgin as well. It's just that on Virgin they would work for a while and then stop resolving. Some thread in Whirlpool suggests this was related to switching between UMTS and HSPA but that doesn't make sense to me. Any chance some other (Linux) users using default settings could post their PPP exchange? It just requires adding the 'debug' command to your PPP configuration.

User avatar
Dazzled
Volunteer Site Admin
Posts: 5992
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: Negotiated HSPA DNS settings don't work

Post by Dazzled » Tue Apr 06, 2010 9:01 am

Redhat has a bug report with comments that's been running for a couple of years on the DNS issue, mostly about Huawei - https://bugzilla.redhat.com/show_bug.cgi?id=467004

fsm
Posts: 75
Joined: Thu Apr 01, 2010 10:46 pm
Location: Aus

Re: Negotiated HSPA DNS settings don't work

Post by fsm » Wed Apr 07, 2010 9:52 pm

Thanks for the link. Looks like the network is not providing the DNS address in time and the version of PPP I have is not persistent enough in its negotiations so as to eventually get the correct address (the earlier address is apparently a lie from the modem), So it appears I could resolve the problem by updating my version of ppp. A firmware upgrade on my modem might also potentially do the trick if my vendor has changed the modem PPP behaviour. The bad news is that that it will likely increase the connect time. Why does it take the mobile network so long to set up a connection to the access point?

There was also some suggestion that the drivers for modems with Qualcomm chipsets have an alternative to PPP which makes them immune to the problem (and perhaps the intermittent problem I had with Virgin)

In my case, I could also load different firmware onto my modem and configure it to emulate a LAN interface, in which case I assume it spoofs DHCP.

tin
Posts: 173
Joined: Mon Jul 28, 2008 5:22 pm
Location: Northwest NSW
Contact:

Re: Negotiated HSPA DNS settings don't work

Post by tin » Tue Jul 27, 2010 11:37 am

I get the same odd DNS servers when I run a community build of Android on my Touch Pro (normally Windows Mobile, which doesn't get the weird addresses).

I had assumed it was simply a bug in the builds I was running - but this, and other reports like it, suggest it's a problem with the network itself... And probably one they won't want to bother looking at.
The above post is copyright, may be edited at any time, and should not be taken internally. Any breach of these terms may result in legal action or a sore tummy.

fsm
Posts: 75
Joined: Thu Apr 01, 2010 10:46 pm
Location: Aus

Re: Negotiated HSPA DNS settings don't work

Post by fsm » Mon Sep 13, 2010 2:26 am

Not so much of network problem but in the case of USB modems for example, the 3G WWAN uses is own method of allocating the DNS address which seems to take a significant amount of time, and the modem conveys it to the local networking stack via another method, e.g. the DNS fields in PPP. The usual(?) mapping from the WWAN to PPP for example, results in ambiguous PPP behaviour e.g. PPP provides the phoney 10.11.12.13-14 address first, probably before it has received anything from the network and provides the real address supplied from the network later. Recent Linux PPP implementations take the last supplied DNS address rather than the first one working around the problem. Although, you have a smartphone rather than a modem, I assume the hardware/software is still emulating a serial modem or possibly an ethernet interface to allow one of the automatic methods of IP configuration to work.

Anyway, the easiest workaround is simply to use static DNS addresses for your mobile provider. Unfortunately, the majority(?) of modem manufacturers give little thought to Linux compatibility.

tin
Posts: 173
Joined: Mon Jul 28, 2008 5:22 pm
Location: Northwest NSW
Contact:

Re: Negotiated HSPA DNS settings don't work

Post by tin » Thu Oct 28, 2010 12:08 pm

fsm wrote:Anyway, the easiest workaround is simply to use static DNS addresses for your mobile provider. Unfortunately, the majority(?) of modem manufacturers give little thought to Linux compatibility.
And I'm yet to find a way to do it with Android too... It's the only thing stopping me running Android on my Touch Pro as the primary OS.
The above post is copyright, may be edited at any time, and should not be taken internally. Any breach of these terms may result in legal action or a sore tummy.

fsm
Posts: 75
Joined: Thu Apr 01, 2010 10:46 pm
Location: Aus

Re: Negotiated HSPA DNS settings don't work

Post by fsm » Mon Nov 01, 2010 1:02 am

It's surpising if it is true that Android doesn't let you set static DNS addresses statically. I'm probably old fashioned or something, but I like to run small networks without DHCP and set up things statically. Just for reference the relatively old version of pppd that I'm running that does the right thing with a usb modem 2.4.5. I'm beginning to wonder if your smartphone models the WWAN interface as ppp layered over a Hayes modem like serial interface since its unlikely your ppp is that old. Can't you just fix up resolv.conf after pppd brings the interface up? Standard desktop Linux allows you to run a script when the network interface is brought up, or you could run a script or copy the correct file manually as a workaround.

User avatar
Dazzled
Volunteer Site Admin
Posts: 5992
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: Negotiated HSPA DNS settings don't work

Post by Dazzled » Mon Nov 01, 2010 11:06 am

I don't have an Android mobile, but I can get it up on a PC for a brief newbie's look. The usual Linux system files don't seem to work, or I haven't thought hard enough. The setprop ro.kernel.android.ndns and setprop net.dns1 commands seem to be for static settings on wireless routers, not 3G. I'm not going to spend time learning it but I hope amending init scripts isn't needed. Anyway you shouldn't need to spend time with the source and making images to use a phone.

fsm
Posts: 75
Joined: Thu Apr 01, 2010 10:46 pm
Location: Aus

Re: Negotiated HSPA DNS settings don't work

Post by fsm » Tue Nov 02, 2010 1:11 am

Dazzled wrote:The setprop ro.kernel.android.ndns and setprop net.dns1 commands seem to be for static settings on wireless routers, not 3G.
DNS addresses should be independent of the network technology.
... you shouldn't need to spend time with the source and making images to use a phone.
Agreed. I assume the community builds must lag behind the more official releases.

tin
Posts: 173
Joined: Mon Jul 28, 2008 5:22 pm
Location: Northwest NSW
Contact:

Re: Negotiated HSPA DNS settings don't work

Post by tin » Tue Nov 02, 2010 12:22 pm

Dazzled wrote:The setprop ro.kernel.android.ndns and setprop net.dns1 commands seem to be for static settings on wireless routers, not 3G.
setprop net.gprs.dns1 is for 3G, despite it's GPRS name.
And that works fine for fixing my Android problems, but it needs to be run every time it reconnects... IE very annoying.
The above post is copyright, may be edited at any time, and should not be taken internally. Any breach of these terms may result in legal action or a sore tummy.

User avatar
Dazzled
Volunteer Site Admin
Posts: 5992
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: Negotiated HSPA DNS settings don't work

Post by Dazzled » Tue Nov 02, 2010 1:32 pm

Tin, I suppose the conclusion is that the init scripts need altering to make a change stick, but that means working from source. When I looked, admittedly briefly, the usual DNS config files did not seem to be used, and the setprop commands appeared to be over-ridable (is that a word?).

Edit: Tin posted the temporary method here: viewtopic.php?f=308&t=35065
Edit: Any joy at the bottom of this? http://forum.xda-developers.com/showthread.php?t=812396 and this? http://wiki.openmoko.org/wiki/Android_usage

fsm
Posts: 75
Joined: Thu Apr 01, 2010 10:46 pm
Location: Aus

Re: Negotiated HSPA DNS settings don't work

Post by fsm » Wed Nov 03, 2010 3:03 am

tin wrote:setprop net.gprs.dns1 is for 3G, despite it's GPRS name.
Not entirely surprising since 3G modems look like a superset of a GPRS modem to a host.

Post Reply