[Question/Request] DHCP IP assignment timeout - Nexus One Q&A, Help & Troubleshooting

Hey coders,
I have a question regarding the networking subsystem in Android.
I know that dhclient.conf in linux will allow a "timeout" parameter that lets you set the DHCP request timeout. I'm wondering if there's some way to do that in Android. It's not immediately obvious to me, so that's why I'm asking.
Before, when I was stock, my phone had no issues connecting to my work's wireless SSID--even though it would sometimes take a long time to obtain an IP address, it would eventually connect.
Now, I've flashed CyanogenMod 5.0.5.3-N1, and I can still associate with my work's wireless network, but it appears to timeout the attempt to obtain an IP address too soon. My Palm Pre and my laptop can connect to the same, and I've verified that my stock ROM can also still connect, but when I flash to CM, I can no longer obtain an IP address successfully anymore.
I'm wondering how difficult it would be to modify the DHCP obtain IP timeout?
Thanks everyone!
--Hans

same problem here as well also on cm5.0.3.1 and 5.0.6.test2...

Haven't tried modifying it, but you can look at /system/etc/dhcpcd/dhcpcd.conf. Here's a man page.

Doesn't seem to help. I added "timeout 360" to the bottom of dhcpcd.conf and it doesn't increase the time that passes between "obtaining IP Address from <SSID>" and "unsuccessful".
Must be something else in android?

Related

Ip address problem 169.254.x.x can't connect to wifi network

I'm currently running wm5 ivan w/rd
i keep having this problem where i try to connect to a network, and it connects, but i can't do anything.
When i open up my ipconfig it shows the network ip address as 169.254.x.x where x is always something different. My router shows the mac address on the network but it's unreachable.
Does anyone have any idea where this ip is coming from? I've tried different radio versions, and it happens so far with 1.1.13 and 1.1.15 on both wm5 AND wm3.
169.254.xxx.xxx is a class of ip addresses set automatically to a device, when this can't connect the dhcp server. is a reserved network.
if your router is set as dhcp server, you must verify the link connection with pda. else you must configure the correct ip address manually to the pda.
download and run vxIPconfig and use that to release and renew a new IP from the DHCP server
Nine times out of ten this is caused by bad encryption settings. If you put in the wrong WEP key for example this is what you would see. You don't get error messages when it's wrong, which is kind-of by design and desirable for security reasons.
I'm downloading vxipconfig right now. I did a search last night and was reminded of 169.254.x.x coming up on machines when winsock is corrupt.
Another web site said something about how a pda will connect to the first computer with activesync through wifi under this ip address and try to sync, and then it will get a normal ip address. I don't know if this is true with this device.
@closer what do you mean verify the link connection? The router shows the pda's ip address in it's connection manager, but for any computer or pda i don't know a way to "verify the link" other than look at it. There's no command for this. The router is set up to correctly assign dhcp as i have 2 computers and 2 xbox's connected through lines, and 2 computers through wifi. I know i can manualy set the ip, which i often do for everything but the laptop, but this is a pain in the ass to try and find out the gateway of every single router when i'm out in town. That's a workaround, not a fix.
@Black6spdz I was using Myipconfig and it would release and renew to just a different 169.254.x.x. I'm going to try vxipconfig when this happens again.
--Well, last night i got pissed and abandoned working on it. Low and behold when i wake up today it's working fine and has the correct ip address. That sucks, because now i have no idea what was wrong.
so...
-It's time to go connect to some other networks and see if it resolves correctly.
-Then i'm going to go through the 3 different radio versions and see how they affect it.
when I had that problem it was because my settings were set up incorrectly.. If i were to use gprs, it'd work fine. But wifi would not. So i had to make a seperate setting with generic entries and not set up proxies. then wifi would work. sort of a pain. but it would work...

reverse tether, ad-hoc, on mac filtered network?

I have a rooted N1 with cyanogen 5.0.4.1 on it.
I'm studying abroad this semester, and the university I'm at seems to have done everything they could to prevent me from connecting my phone to the internet on their network.
There is a wireless network, but it doesn't reach my room, and there's a proxy; I haven't been able to get any of the various proxy apps to work with it, at all. On a somewhat related note, since moving to cyanogen I'm not able to connect to that network anymore (wpa enterprise, tls/pap/user+pass). No real loss, since it didn't work as I couldn't get the proxy going.
The rooms have ethernet, with a static IP and mac filtering, and of course the same proxy. In addition, on the wired network in the rooms you have to connect to a vpn in order get anything other than the school's intranet
With cyanogen's rom, I have been able to connect my phone to my computer's ad-hoc network by giving it the parameters (IP, gateway, netmask, dns), that were provided to me, but I can't download anything. My only guess as to why that's not working is their static IP/mac filtering combo is not playing nicely.
I haven't ever delved very deeply into networking type stuff such as proxies, ssh tunnels, etc, so these two ideas of mine could be completely unworkable, but what I've been able to come up with is:
1. Is there a way to have my laptop keep handling all the proxy/ip/vpn nonsense, and just route http data to and from my phone? I've never dealt with ssh or anything of that sort, but I run linux so it should be pretty trivial to get it set up on the laptop's side of the equation.
2. Failing that, I'm allowed to have 3 devices with 3 different mac addresses, each of which is given a separate IP address, so I give the people in charge of the network the mac address for my phone and get an IP address for it. Then, connect to my laptop's ad-hoc network, which is on IP #1, and go to the advanced wifi settings on my N1 and set up a static IP with IP #2. Does that work, at all? This of course doesn't account for the vpn at all, but if it does in fact work I'd then move on to that.
What a ****ing brain-buster. Goodluck!
As an update, I can use cyanogen's included tethering ability, in conjunction with ConnectBot, to ssh from my phone to my computer (got that working after a bit of work, and learned something new). However, when I try to set up port forwarding in ConnectBot, it doesn't work; I don't know which ones to forward, whether to choose local or remote, and if I try to forward something below 1024 it gives me an error because of that. Does anybody know what ports I need to forward, and how to do that properly with ConnectBot?

problem connecting to the house internet

Hi this is my first time on a site and I just wonder if anybody can solve my problem!
I,ve read a few posts and set my xda llI so that in connections my network card connects to work!Also have done all the rest and set it to internet just in case as well
My Isp in connections window is on the advanced tab and select networks on the network Management is set to My Isp.
my Wirles Lan Manager is status connected to network
My ssid is the one that all the house computors are set to,my mode is Infratructure and Tx is Auto.My channel is 6
my bssid is 00-18-2D etc etc.
My Mac is 00-09- etc ,etc.
My IP.169.254.168.73
signal quality is good
I,ve been onto the 192.168.0.1 website and added the mac address of the xda lli but when I try to get the internet on the xdalli to connect it justs says default page. I cannot seem to connect. is this normal or do I have to go through O2 to pay for another internet connection besides my home address one.Have I missed something out!Help would be greatly appreciated! thanks
Nilocsss
Hi,
Your IP of 169.x.x.x means that you are trying to use DHCP to get an ip address but haven't been supplied one by your router..
The ip addres of your router is 192.168.0.1, so it may be sensible to setup your router to allow a dynamic address range of 192.168.0.100 to 192.168.0.110 (say) - when anyone tries to connect using a dynamic address (using dhcp), they'll be given an address in this range.
So, initially check if DHCP is enabled.
Do you have a laptop that connects using a dynamic ip address (ie not static - ie not implicitly defined) - if so then DHCP _is_ already working and there's another problem.
If this is the case, I'd initially disable any kind of mac-filtering or security until you get a simple connection going..
Sorry, if this isn't too clear - I'm tired - what router are you using?
Kev
First hand it can depend on your router
I have had problems connecting with Virgin broadband routers for instance.
Have you tried connecting elsewhere?
Also what type of security do you have on your router?
One more thing to try
Check under the "Network Cards" settings when disconnected and select "the internet" from the drop down menu.
Hope this helps
clearing the way so that I understand correctly!
kevcal said:
Hi,
Your IP of 169.x.x.x means that you are trying to use DHCP to get an ip address but haven't been supplied one by your router..
The ip addres of your router is 192.168.0.1, so it may be sensible to setup your router to allow a dynamic address range of 192.168.0.100 to 192.168.0.110 (say) - when anyone tries to connect using a dynamic address (using dhcp), they'll be given an address in this range.
So, initially check if DHCP is enabled.
Do you have a laptop that connects using a dynamic ip address (ie not static - ie not implicitly defined) - if so then DHCP _is_ already working and there's another problem.
If this is the case, I'd initially disable any kind of mac-filtering or security until you get a simple connection going..
Sorry, if this isn't too clear - I'm tired - what router are you using?
Kev
Click to expand...
Click to collapse
Thanks Kev!
My router is a netgear dg834GT.I,ve looked at the range and the range for 192.168.0.1 actually goes from 192.168.0.2 upto 192.168.0.254 so the range should be there. how would I know if the router is DHCP, is there a way of seeing this? The filter would be set up where for the mac address?Is there a way of changing the isp on the phone so that its range is within the 192.168.0.1 range?the only security that I have is the routers own and the avg antivirus.would disabling the avg help!
thanks for your response!
voxshots said:
First hand it can depend on your router
I have had problems connecting with Virgin broadband routers for instance.
Have you tried connecting elsewhere?
Also what type of security do you have on your router?
One more thing to try
Check under the "Network Cards" settings when disconnected and select "the internet" from the drop down menu.
Hope this helps
Click to expand...
Click to collapse
thanks for replying ,my router is a netgear and the security is a wep key which I have disabled and i also tried the drop down menu "the internet" but still nothing! how would I find out on the phone what ethernet card it is running so that I can connect to that .
nilocsss said:
Thanks Kev!
My router is a netgear dg834GT.I,ve looked at the range and the range for 192.168.0.1 actually goes from 192.168.0.2 upto 192.168.0.254 so the range should be there. how would I know if the router is DHCP, is there a way of seeing this? The filter would be set up where for the mac address?Is there a way of changing the isp on the phone so that its range is within the 192.168.0.1 range?the only security that I have is the routers own and the avg antivirus.would disabling the avg help!
Click to expand...
Click to collapse
If you haven't set up mac filtering, then it won't be a problem.. if you have, then there should be an option to disable/remove any you've input - build security up from a working setup.
Have you (can you borrow) a laptop that you can setup wireless with a dynamic ip address and check that connects; if that's okay then the router is setup correctly.
So I the Alpine comes up with "connected to network" but the ip address is 169.x.x.x ..
This means that the Alpine has not been allocated a usable ip-address by the router for some reason and you'll get nowhere until this happens.
Your other PCs.. are they set to dynamic ip addresses - I guess so as you have no room for static addresses. You should probably check they're all dynamic as if (say) you've allocated a static ip address of 192.168.0.2 to one of them and then DHCP tries auto-allocating addresses, I guess there could be a conflict (don't know how clever dhcp is). Usually I would set the DHCP range to 192.168.0.100 -> 192.168.0.200 (allowing 100 different dynamic addresses).
Have you checked that authentication is set top 'Open' and Data Encryption 'Disabled' on the Alpine; and ensure you've disabled (temporarily) all router security..?
Kev
kevcal said:
If you haven't set up mac filtering, then it won't be a problem.. if you have, then there should be an option to disable/remove any you've input - build security up from a working setup.
Have you (can you borrow) a laptop that you can setup wireless with a dynamic ip address and check that connects; if that's okay then the router is setup correctly.
So I the Alpine comes up with "connected to network" but the ip address is 169.x.x.x ..
This means that the Alpine has not been allocated a usable ip-address by the router for some reason and you'll get nowhere until this happens.
Your other PCs.. are they set to dynamic ip addresses - I guess so as you have no room for static addresses. You should probably check they're all dynamic as if (say) you've allocated a static ip address of 192.168.0.2 to one of them and then DHCP tries auto-allocating addresses, I guess there could be a conflict (don't know how clever dhcp is). Usually I would set the DHCP range to 192.168.0.100 -> 192.168.0.200 (allowing 100 different dynamic addresses).
Have you checked that authentication is set top 'Open' and Data Encryption 'Disabled' on the Alpine; and ensure you've disabled (temporarily) all router security..?
Kev
Click to expand...
Click to collapse
Thanks kev for replying.
I have a hard wired lead to the router for one computor and 3 laptops connected by wifi and another computor connected by wifi.
the range or should I say the ip addresses are 192.168.0.3,192.168.0.4
upto 192.168.07.I,m at work at the moment but as soon as I get home tonight I'll set the wep key to disabled is there any other thing on the router that I need to do?
Can't think of anything else...
But at least you know DHCP is working if the other PCs are getting ip addresses okay.
And you know the wireless is working...
So it does look likely that it will be something to do with WEP/WPA encryption... (I guess you've got it setup at home), hence why the router isn't allocating you an ip-address.
If you can't get it going, it may be worthwhile doing some sceenshots of the router configuration pages (or config files)...
What I can tell you is that what you are doing looks correct and you have everything setup so you can go on the internet whilst at home using the Alpine. Mine uses the router whilst at home and GPRS whilst out.
nilocsss said:
Thanks Kev!
My router is a netgear dg834GT.I,ve looked at the range and the range for 192.168.0.1 actually goes from 192.168.0.2 upto 192.168.0.254 so the range should be there. how would I know if the router is DHCP, is there a way of seeing this? The filter would be set up where for the mac address?Is there a way of changing the isp on the phone so that its range is within the 192.168.0.1 range?the only security that I have is the routers own and the avg antivirus.would disabling the avg help!
Click to expand...
Click to collapse
The dg834GT is pretty much the one that Virgin use, like I said in my earlier post.
I have found these particular routers to be a problem (sometimes) with my Alpine.
You should try to update the firmware.
kevcal said:
Can't think of anything else...
But at least you know DHCP is working if the other PCs are getting ip addresses okay.
And you know the wireless is working...
So it does look likely that it will be something to do with WEP/WPA encryption... (I guess you've got it setup at home), hence why the router isn't allocating you an ip-address.
If you can't get it going, it may be worthwhile doing some sceenshots of the router configuration pages (or config files)...
What I can tell you is that what you are doing looks correct and you have everything setup so you can go on the internet whilst at home using the Alpine. Mine uses the router whilst at home and GPRS whilst out.
Click to expand...
Click to collapse
Well Done Kev!
It was the "open"on the phone and putting "open" on the router.I had to intiallely disable the wep key.then when I got connected,I reactivated the WEP key and I could not connect.So on the phone I unticked the automatically connect to my name of my router name and reput in my encryption key again and I was in and On line.Thanks to both of you(Kevcal and Voxshots) for helping me.Definately could not have done it without you Pair.I like the idea of using the screenshots so I,ll post a screenshot of all the settings on the phone and computor so that anybody else will be able to resolve there problems with all credits going to you people on the bottom!
Very happy to have helped and glad you sorted it out

REMOTE VNC Pro

hi
i have this application and whenever i try to set up and connect to the specified ip address it tells me socket is not connected
what does that mean and how can i fix it?
zidane said:
hi
i have this application and whenever i try to set up and connect to the specified ip address it tells me socket is not connected
what does that mean and how can i fix it?
Click to expand...
Click to collapse
Make sure that you open up the port on your computer's firewall, your router, and anything else that might have a say in your internet traffic.
I'm not going to explain it, but Google "port forwarding".
im in the campus dorms
i dont think i can do any port forwarding as i dont know how the whole lan thing is set up here
thanks
i am currently having the same problem ...i have forwarded the port 5900 on my router and opened up my firewall...could i possibly have to do something to the modem as well or could it be something else
i am on a I touch 3g slide and running windows xp home
i have also heard that port tunneling may be neccesary but i lack the knowledge to do so any help would be appreciated
its all about port forwarding because you have dynamic ip addresses on the LAN side and most likely you have a dynamic WAN ip also. Usually to do VNC you have to have a Public IP address. Home ADSL circuits provide one public ip address but out of a NAT pool so it will change. This could cause an issue unless you want to check the destinations ip address everyday. So instead of VNC to an ip address you can vnc to a host name. Dyndns provides a good service for free. So that solves the dynamic IP issue.
Now to the port issue. Since the internal LAN will assign each host a 192.xxx.xxx.xxx ip address (which are not publicly routed), you have to do port forwarding. To do this go to the command prompt (start>run>cmd) and type in "ipconfig /all" and press enter. Find the default gateway ip address (192.xxx.xxx.xxx). Type that into the web browser. That will log you into your router. I have a 2wire router provided by att so if you have different you will have to discover this on your on. Go to firewall settings and then add a new user-defined application. basically make a new application.
protocol tcp
port range 5900 (i believe that is right)
and then add it to the correct computer.
That should send all data on that port to that host.
Hope that has helped a little bit. if not, google it.
you can also try
http://forum.xda-developers.com/showthread.php?p=7004664
i figured it out and have it working fantastic. u were completely correct i just wish i could have had your advice sooner ...kinda forest gumped my way to the answer.
i do appreciate it tho and have a better understanding of the grander scale now. thanks to all on xda that give their time to help
zidane said:
im in the campus dorms
i dont think i can do any port forwarding as i dont know how the whole lan thing is set up here
thanks
Click to expand...
Click to collapse
You may want to give up with that and try out PhoneMyPC. I'm not 100% sure of how they do their tunneling, but I can tell you I've tested it a few times and it always manages to get through even if I purposely change WAN ip addresses and I don't do any port forwarding for it.
It also runs way faster (albeit lower resolution, i think) and more fluidly than either of the RDP or VNC solutions I tried out. I'm very impressed with it so far. I can even jump online with it and pull up my security camera software and actually see the live video feed from it, all running on my PC at home, even just over a 3G connection.

[Q] change ip address for WLAN tethering ?

Is it possible to change the ip-address range, so that a dhcp client receives an adress from a given subnet.
I looked for a dhcp server on the galaxy or dhcp settings but could not find it. There is only a dhcpcd.conf for the SGS as a WLAN client.
If someone knows, which config file I should look for, it would be great.
Background:
The SGS has a VPN connection and I want to share that connection with my notebook. Yes, I could establish another VPN connection from my notebook, but if that is not necessary it is nicer.
Thanks for any hints.
Gregor
Found another problem - the 192.168.34.xx can cause collisions within the company network if I run VPN.
Nobody with an idea ?
I'm still searching for a better way to it than recompiling everthing but at least this seems promissig https://code.google.com/p/android/issues/detail?id=11855
in my (very short) trys i wasn't able to configure a bridge for both interfaces so we may have to life at frist with 2 separat ip ranges but may can allow routing between the to interfaces. I assume that iptables is used to prevent this by default.

Categories

Resources