maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   Link-local IP address, I think it is a software bug... (https://talk.maemo.org/showthread.php?t=8689)

AdamWu 2007-08-10 02:31

Link-local IP address, I think it is a software bug...
 
My 770 WLAN works fine at work where it is granted a public IP address upon connection. But at home where my router assigns private IP addresses, it always say the IP is "Link-local" and the browser or music player refuse to connect to the internet (even the connection manager always show both gateway and DNS servers addresses are acquired).

I went deeper into probing the problem by setting up a web server on a computer on the same "local" subnet. I used the 770 browser to visit the local web server, and it works fine. This confirms to me that it is not a hardware issue - neither the wifi signal is bad, nor the router being incompatible.

Then I noticed in advances settings on the 770, one can set up "proxy" for a connection. So, I think, becuase 770 seems to only talk to local machines, how about set up a local proxy?

I installed tinyproxy on a local machine, and set my 770 to use that proxy, and guess what... everything works again... the brower, music player are all able to connect to the internet via the local proxy...

My guess is that, there may be a bug in the connection managing software, when the ethernet interface is assigned a local ip address (even if by DHCP), it always thinks acquiring IP has failed, and did not set up proper default routing (even if a getway is provided).


Here is my configurations in detail:

A. No Proxy, refuse to connect to Internet:

Router / Gateway: 169.254.32.32
DNS: 169.254.32.32
770 IP: 169.254.32.15

(770 "sees" all above configurations, but cries "Link-local" and does even try to use the gateway...)



B. With proxy, Internet works:

Router / Gateway: 169.254.32.32
DNS: 169.254.32.32
770 IP: 169.254.32.15
Proxy Machine: 169.254.32.16

iball 2007-08-10 03:19

Re: Link-local IP address, I think it is a software bug...
 
Three things:

1) Are you running the most recent firmware update on your N770? If not, upgrade it now. Search in here and over at nokia's site for the latest firmware. If I were you I would search around for "2007HE", the 2007 Hacker Edition firmware for the N770.

2) Posting here isn't going to help you if it's a real bug. https://bugs.maemo.org/

3) Considering Nokia isn't really working on the N770 all that much anymore, if it is a real bug then I wouldn't expect a fix any time soon.

Now that all that is out of the way, I'm thinking it's a problem with your wi-fi router setup and not the IT. I've seen it before where sometimes the SSID of the router has to be set to broadcast or WPA2 "dumbed down" to just WPA, or sometimes the router is in b/g mixed-mode and for some odd reason THAT is causing the problem and it needs to be set to G-only. It can also be a problem if your router is using a wi-fi channel/freq that is subject to heavy interference in the area you're in. An engineering friend of mine once built a handheld 2.4Ghz wi-fi jammer as an experiment and would routinely walk around the local wi-fi-enabled park dropping people off the net within a 60 foot radius around him just for sick, twisted kicks.
Or your router is setup for MAC-address filtering or something like that. Many, many things to look at and since we don't see where you've stated that any other wi-fi devices work flawlessly or what the router's settings are, we can't really help you.

Milhouse 2007-08-10 03:50

Re: Link-local IP address, I think it is a software bug...
 
Adam - I'm confused... why are you using link-local IP addresses on your LAN? This is surely wrong, even if you have managed to make it work. :)

You talk about issuing private IP addresses on your home LAN - by this do you mean 192.168.x.x or 10.x.x.x type addresses, and do you have a working DHCP server operating within your home LAN?

You actually seem to have assigned a link-local address to your router, which may be fooling your 770 into thinking it's picked up a link-local address!

I would recommend you reconfigure your router/gateway on a 192.168.x.x subnet (eg. 192.168.0.1) and ensure your DHCP server is giving out addresses within the same subnet and see if the situation improves thereafter.

AdamWu 2007-08-10 04:24

Re: Link-local IP address, I think it is a software bug...
 
To iball:

Thanks for your advice, I am using the latest "official" OS 2006, freshly flashed in yesterday. I will report the bug, but as I also know, 770 is kind of "off support" now, so I hope some hacker here can make a quick hack... ^_^

I really don't think it is the router's problem becuase 1. the OS successfully acquired IP, gateway, as well as DNS information; 2. the tablet can connect directly to machines on the same subnet. 3. the tablet can use the local DNS to resolve domain names. These means the encryption works fine and radio signal is within acceptable range. (I actually tried *ALL* security configurations including no security, it shows the same sympton)

It seems the problem is that there is no "default" route setup for non-local IP addresses, so any Internet connection attempt result in error.


To Milhouse:

I have many equipments that share a single internet connection, so I have to use local IP addresses on them. I have a D-Link router that performs DHCP, as well as NAT.

I don't know why I use 169.254.x.x, honestly... :P Maybe I shouldn't, but it worked on every computer that I have (or have used), Windows, Linux (well, except the 770 OS, at least works for Redhat and SUSE). I see no reason it should not work... even if it is a link local address, if a getway is provided, why shouldn't the OS used it?

---------

> I would recommend you reconfigure your router/gateway on a
> 192.168.x.x subnet...

Yeah, I would like to try that. But I will save it for the weekend, becuase on some machines I have hand coded host files that also has to be changed...

iball 2007-08-10 05:54

Re: Link-local IP address, I think it is a software bug...
 
169.254.x.x is usually referred to as the APIPA range (Automatic Private IP Address) and is considered a DHCP failover option on many, many devices which is why the N800 is saying "Link-Local" because it recognizes that the IP address fed to it from the DHCP server is from the APIPA range.
Quote:

Originally Posted by Wikipedia
The technique for IPv4 is called IPv4 Link-Local (IPV4LL) in the RFC, however Microsoft refers to this as Automatic Private IP Addressing (APIPA) or Internet Protocol Automatic Configuration (IPAC).

In other words, you've misconfigured your router to use an IP range used for when there is not a DHCP server present.
No one should run a local subnet on that range as it's super-easy for an attacker to get in on it and is usually a sign of a lazy network admin.
As already suggested, jump your DHCP scope to somewhere in the 192.168.x.x range, but do NOT use the Linksys - and many other routers - default range of 192.168.1.x.

Hosts files? It's a lot easier to run a fairly secure mini-DNS system on your local subnet that would make things a lot easier.

munky261 2007-08-10 06:14

Re: Link-local IP address, I think it is a software bug...
 
I have a similar problem occasionally with my 800.... Ill connect to an open wifi signal and on some connections it will connect right away, sometimes it comes up link local and sometimes if i lose a signal i was connected to and i reconnect it comes up link local

iball 2007-08-10 06:22

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by munky261 (Post 67269)
I have a similar problem occasionally with my 800.... Ill connect to an open wifi signal and on some connections it will connect right away, sometimes it comes up link local and sometimes if i lose a signal i was connected to and i reconnect it comes up link local

I usually find that if the wi-fi router has DHCP disabled, which some skiddiot (script kiddie idiot) wannabes do to open routers with factory logins in an effort to seem "cool".
Other *****s do it because they think it somehow "protects" them from attack or other people using wi-fi access.

AdamWu 2007-08-10 08:04

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by iball (Post 67266)
No one should run a local subnet on that range as it's super-easy for an attacker to get in on it and is usually a sign of a lazy network admin.

Hmm, I thought hackers would assume everyone uses 192.168.x.x ... Maybe that is why I picked this werido net range at the very beginning ... but that was a couple of years ago, can't remember exactly why... :D

Quote:

Originally Posted by iball (Post 67266)
Hosts files? It's a lot easier to run a fairly secure mini-DNS system on your local subnet that would make things a lot easier.

The thing is, I am hosting some service for my personal daily use (internet radio, web, etc) and I have a domain name associated to my cable modem's IP, so I can always refer service by name instead of IP address. This is great, but the problem is when I am actually within the subnet, the name resolution would not work... what I can see are two solutions: 1. Host file; 2. Set up a small internal DNS.

I chose 1 becuase it is quick and dirty, for using method 2, I would also have to turn off the DHCP on my router, and set up a customizable DHCP server to push the internal DNS to the client, so that any machines connected to this net knows to first try the internal DNS. I admit #2 is the right thing to do, but #1 is a big time saver...

BTW, if you don't know what I'm talking about, there is my problem in detail with "pictures":

Code:

Internet
 \--> (public IP) cable modem (192.168.1.x)
                          \---> Router (169.254.1.x)
                                      \---> Machine 1 (169.254.1.11)
                                      \---> Machine 2 (169.254.1.12)
                                      \---> Machine 3 (169.254.1.13)

Suppose I am running music cast service on machine 3, and I have set up proper port forwarding in the router and cable modem. My blog has a link refering to this service using name http://music.name.com:1234

* When I am outside of this network, I click on the link, everything works;

* But when I am inside, on machine 1, I click on the link, it would not work, becuase the name resolves to the modem's public IP, but it really should be Machine 3's internal IP. So the packet got lost wondering around... >_<

----------

Maybe this weekend I would spend some time to apply solution #2 when I make the change to net range...

One thing you are absolutely right: I am a lazy admin... :P

Milhouse 2007-08-10 12:16

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by AdamWu (Post 67294)
Hmm, I thought hackers would assume everyone uses 192.168.x.x ... Maybe that is why I picked this werido net range at the very beginning ... but that was a couple of years ago, can't remember exactly why... :D

Provided you are behind a NAT router you can use any IP address range you like, even public IP addresses can be used on your internal LAN however you've chosen a specific range with a specific purpose and it's probably the worst range/purpose you could choose! :) I know a public Class C address that's not being used right now... 161.15.191.x which happened to belong to a defunct US investment bank, or just make one up (but check it doesn't have any special purpose first!) :)

Milhouse 2007-08-10 12:29

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by AdamWu (Post 67294)
* When I am outside of this network, I click on the link, everything works;

* But when I am inside, on machine 1, I click on the link, it would not work, becuase the name resolves to the modem's public IP, but it really should be Machine 3's internal IP. So the packet got lost wondering around... >_<

Even when you are inside your LAN, if the machine name resolves to a public IP address you should connect to you modem and from there connect to your internal machine. Granted it means you are going out onto the public internet and back into your own network which will involve a few miliseconds more latency (and add to your download limit if you have a capped connection) but in general it should work.

If it doesn't work, it's most likely because the loopback interface is not enabled on your router which is preventing internal connections from being routed back into your internal network via the WAN interface. If your router supports a loopback interface enable it and see if you can access your internal workstation via it's hostname (without using /etc/hosts).

sycohen 2007-08-10 14:06

Re: Link-local IP address, I think it is a software bug...
 
I've been having a similar problem with my 770. This problem always occurs in public wifi hot spots. If, when trying to connect, the 770 says that it has make a "local link" connection to the WiFi network in question, it will never allow access.

Yesterday evening we were at bar/restaurant in New Brunswick, NJ (Stuff Yer Face) and I attempted to get on line. On my first try, I connected thru the "local link" and, of course nothing worked. There was a question mark next to the WiFi symbol at the top of the screen. Then I tried it again, and it connected without indicating anything about local link. The connection worked fine. I was able to surf and get my email without any problem.

Does anybody know what's going on here?

Thanks

AdamWu 2007-08-10 19:28

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by sycohen (Post 67374)
Does anybody know what's going on here?

Yeah, even if I put my 770 next to my router, 1/4 of the chance it cannot acquire IP on the first try. I have to re-connect to get the IP / gateway / DNS by DHCP.

AdamWu 2007-08-10 19:33

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by Milhouse (Post 67341)
Even when you are inside your LAN, if the machine name resolves to a public IP address you should connect to you modem and from there connect to your internal machine. Granted it means you are going out onto the public internet and back into your own network which will involve a few miliseconds more latency (and add to your download limit if you have a capped connection) but in general it should work.

If it doesn't work, it's most likely because the loopback interface is not enabled on your router which is preventing internal connections from being routed back into your internal network via the WAN interface. If your router supports a loopback interface enable it and see if you can access your internal workstation via it's hostname (without using /etc/hosts).

I don't see "loopback" anywhere on the setting pages (on any routers I have ever used). Granted my cable modem is a cheap one... :P but still I don't think what you described is how it is suppose to work...

Milhouse 2007-08-10 19:43

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by AdamWu (Post 67524)
I don't see "loopback" anywhere on the setting pages (on any routers I have ever used). Granted my cable modem is a cheap one... :P

Well that's the option on Linksys routers, I don't know about your router - it's possible it doesn't support this feature. You may have to use your imagination though and try differently named options that achieve the same result - any option to do with NAT for instance, eg. "Internet NAT Redirection" is another way of describing the loopback interface.

Quote:

Originally Posted by AdamWu (Post 67524)
but still I don't think what you described is how it is suppose to work...

Fair enough... but let's remember you are the guy using link-local IP addresses on his internal LAN! :p

glabifrons 2007-08-10 19:55

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by AdamWu (Post 67210)
...

Here is my configurations in detail:

A. No Proxy, refuse to connect to Internet:

Router / Gateway: 169.254.32.32
DNS: 169.254.32.32
770 IP: 169.254.32.15

(770 "sees" all above configurations, but cries "Link-local" and does even try to use the gateway...)



B. With proxy, Internet works:

Router / Gateway: 169.254.32.32
DNS: 169.254.32.32
770 IP: 169.254.32.15
Proxy Machine: 169.254.32.16


Not sure where you came up with that configuration, but it may be part of the problem.

From RFC3330:
Quote:

169.254.0.0/16 - This is the "link local" block. It is allocated for
communication between hosts on a single link. Hosts obtain these
addresses by auto-configuration, such as when a DHCP server may not
be found.
From RFC1918:
Quote:

3. Private Address Space

The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private internets:

10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

It's not a bug in the Nokia, it's a bug in your router's configuration.
Please change your subnet to one of the standard "private address space" subnets and try again.

AdamWu 2007-08-11 03:14

Re: Link-local IP address, I think it is a software bug...
 
OK, this is clear to me that probably using "link-local" IP range in DHCP settings is non-standard.

But, hey come on, the definition says absolutely nothing about "link-local" IP address cannot communicate with other machines outside the subnet. So, the behavior of 770 still deviates from the norm, and I think my suggestion about the software bug is still valid. (The de facto proof: the four other machines I have, plus over 5 other machine I have used on this network with many different flavored OS all connects to Internet with zero problem)

And if you still think my DHCP assigning link-local IP is annoying to you, here you go: I can throw DHCP away, just manually assign a link-local IP address, a gateway, and a DNS. By doing this I am now completely compliant with the definition - "no DHCP", and guess what? Of course 770 still refuse to connect to the Internet...


BTW, yeah, I don't think my dirt-cheap cable modem has that advance thingy... and, for the sake of doing the right thing, I will go for the "dual interfaced nameserver" scheme... ^_^

swing 2007-08-11 08:17

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by AdamWu (Post 67636)
But, hey come on, the definition says absolutely nothing about "link-local" IP address cannot communicate with other machines outside the subnet.

Surely "It is allocated for communication between hosts on a single link." covers that - you are trying to connect to an onward link (via the router), which according to the RFC definition is not what that range is designed for.

Given everything else works, I agree that the Nokia is not as friendly as your other devices, but as it is working within the definitions of the RFC, I doubt it'll change.

Milhouse 2007-08-12 12:33

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by AdamWu (Post 67636)
So, the behavior of 770 still deviates from the norm, and I think my suggestion about the software bug is still valid.

So file a bug in Maemo Bugzilla.

Chances are, Nokia have anally stuck to the RFC whereas other vendors may be a little more flexible... that certainly seems to be the way Nokia operate (to wit hidden SSIDs which Nokia refuse to list in a network scan yet hidden SSIDs are listed no problem on a Windows machine - who has the "bug" that explains the difference? Windows, probably)

In the mean time, it might be a good idea to fix your whacked out network. :)

gogol 2007-08-19 10:23

Re: Link-local IP address, I think it is a software bug...
 
Jesus, it doesn't seem that outrageous of a setup...

Seems what would fit nicely is to host a copy of privoxy (and maybe even Tor) on one of your local machines. Set it up to be available to all machines on your 169.254 subnet and set the 770 to proxy through it. Wahla, adblock (and even anonymity) without extra cpu cycles on the tablet :)

..although you'd probably need a separate proxy for voip / chat etc. Maybe it is a little whacked ;)

jackass124 2007-08-19 11:13

Re: Link-local IP address, I think it is a software bug...
 
so how do we avoid the link-local ip problem if travelling around the world and wanna connect to wi-fi networks???...is there some trick or settings which should be made to minimize or eliminate it?...and should we create some sort of link with our own home LAN network to do so??

Thanx!

Milhouse 2007-08-19 12:31

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by jackass124 (Post 69627)
so how do we avoid the link-local ip problem if travelling around the world and wanna connect to wi-fi networks???...is there some trick or settings which should be made to minimize or eliminate it?...and should we create some sort of link with our own home LAN network to do so??

Thanx!

Typically by configuring your N800/770 with a valid IP address (which means just about any IP address out of a possible 4 trillion+ apart from the link-local range and local host, and possibly a handful of others).

You can assign an IP address either manually (Control Panel -> Connectivity and edit the connection in the Advanced section of the wizard, you'll also need to assign appropriate DNS entires) or through DHCP which needs to be running on the network you're trying to connect to.

When connecting to a third-party WiFi LAN your best bet is to rely on DHCP (ie. automatic address assignment) as you're unlikely to know what subnet (addresses) are in use and which addresses are available for use.

There's no need (or point) configuring anything on your home LAN when you're trying to connect to a third-party WiFi LAN - in terms of obtaining a local IP address your remote home LAN will be of no help to you whatsoever.

:)

inventeur 2007-08-19 16:01

Re: Link-local IP address, I think it is a software bug...
 
I get assigned a link local IP address when I'm unable to obtain a DHCP lease (that is, an IP address and other network settings from the access point/router). This is because there is no DHCP server or, in most cases, because my link quality is very poor. Even though I'm able to 'see' the network, massive packetloss prevents me from communicating (and thus obtaining a DHCP lease) from the AP.

In the worst cases I will not get a link local IP address, but a connection error instead.

If you get a link local IP address, just keep moving around - closer to the AP. Keep trying to associate, until you are close enough so a successful connection can be made.... That's how I find and join open networks :) Love doing it!

iball 2007-08-19 16:37

Re: Link-local IP address, I think it is a software bug...
 
I've also seen some idiot wi-fi setups where there IS a DHCP "server" present to issue IP addresses but because the client isn't on the list of allowed MACs DHCP traffic is blocked.
Simple "hack" to get around that is to give it a 192.168.1.x IP address and you're in like Flynn since the MAC control doesn't block ALL traffic, just the DHCP reqs/acks.
Also seen some where DHCP is turned OFF and IP addresses are applied by hand.
Should be nothing more than cranking up Kismet on the N800/N770 to find them and get in.
Of course, these were most probably years-old early 802.11b wi-fi nets I was seeing.

barry99705 2007-08-19 19:06

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by jackass124 (Post 69627)
so how do we avoid the link-local ip problem if travelling around the world and wanna connect to wi-fi networks???...is there some trick or settings which should be made to minimize or eliminate it?...and should we create some sort of link with our own home LAN network to do so??

Thanx!


Yea, ask the owner of the network what the settings are. Link-local is the same as a self assigned ip address. It's not seeing the access point, or the access point isn't talking to your nokia for some reason. Most likely mac authentication.

dmanrevived 2007-08-20 00:56

Re: Link-local IP address, I think it is a software bug...
 
I don't think the router at my parents' house is playing nice with my 770. I checked all the DHCP settings on the router and they're just fine. I even gave myself a static IP to my 770's mac address. After that, I got rid of the local link message by setting my 770 to that static IP. I'm still getting no luck with internet though. I can see that my router "leased out" the IP to my mac address indefinitely and that my 770 is listed under devices that are connected, but one weird thing is that my 770's device name is not registering properly under the connected devices lists.

iball 2007-08-20 01:03

Re: Link-local IP address, I think it is a software bug...
 
Quote:

Originally Posted by dmanrevived (Post 69733)
I don't think the router at my parents' house is playing nice with my 770. I checked all the DHCP settings on the router and they're just fine. I even gave myself a static IP to my 770's mac address. After that, I got rid of the local link message by setting my 770 to that static IP. I'm still getting no luck with internet though. I can see that my router "leased out" the IP to my mac address indefinitely and that my 770 is listed under devices that are connected, but one weird thing is that my 770's device name is not registering properly under the connected devices lists.

I do wish people would stop setting their DHCP server to lease IPs "indefinately" or for weeks at a time. That's silly and just winds up using all the IP space.
Set it for six hours or so, then about every three hours the client will check in and the lease time will jump out another six hours.
Applies to DHCP reservations as well.
You've probably got a boned router setting somewhere or a router/firmware that doesn't like the IT.

bholzman 2007-08-30 05:59

Re: Link-local IP address, I think it is a software bug...
 
I just found this comment on Nokia's site:

http://nokia770.com/forum/viewtopic....3d29168292530a

and repeated here from May 2006:

"Maybe my experiences connecting to WiFi access points will help.

First attempt worked straightaway. Connection Manager detected my father's WEP-enabled network with 64-bit encryption, so entered the key (remember to select HEX under WEP key type), and no problem thereafter.

Second attempt also worked straightaway with an unsecured network at a bed-and-breakfast.

Then, got home to the UK from the US and no luck! Could connect to my neighbor's unsecured network, but could not download Web pages (got the "Network problem" message even though Connection Manager showed bytes being sent and received).

Couldn't connect to my own WEP-enabled network either; it was detected, but no WEP key entry was enabled. Solution was to set up the connection manually. In Connection Manager, select menu (with hard key) -> Tools -> Connectivity Settings. Click the Connections button and select the network and click Edit or add it with the New button. On the first page, enter network name (if necessary) and select WLAN as the Connection Type. On the next page, select Infrastructure as the Network mode (Ad hoc did not work for me) and WEP for Security mode (if appropriate). On the next page, enter the WEP keys (remember to select HEX for WEP key type). On the next page, click Advanced settings and go to the IP Addresses panel - I used 'Auto-retrieve IP address' and 'Auto-retrieve DNS' (others suggest static IP address, but DHCP works for me). Click Finish.

I was pretty frustrated after two painless connections to fail with my own home network, but a little patience paid off.

I love my 770, and ignore the reviews that complain about what it can't do. I bought it to lie in bed or sit on the bog (toilet) and surf. It's a pity some people seem to give up after not connecting instantly the first time, and many of the problems and questions are to do with WEP keys, which are not specific to this device. Oh well.

Good luck!

Jerry"

This is a little preliminary but I just tried it with a neighbors unsecured WAP which I was getting the usual errors with and it worked! I am using the 770 with the latest 2006 OS.


All times are GMT. The time now is 18:22.

vBulletin® Version 3.8.8