[ubuntu] have to reset router to get net connection
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[ubuntu] have to reset router to get net connection
Hello, all. I'm still kind of a linux newb, so I might just be missing a little bit of knowledge here, but I've been having some real problems getting my machine to connect to my wireless network under Ubuntu 9.04.
OSes: Windows XP Home Edition (on Maxtor internal drive)
Ubuntu 9.04 (on WD internal drive)
I don't think my video card would make any difference, so I won't list it on here...
Anyway, what happens is I try to connect (I select the network SSID from the pull-down list in the NetworkManager panel menu), and it seems to connect okay to the router, but I can't get out to the net. I can pull up a terminal and ping the router's address, but I get a "Destination Host Unreachable" message. It's as if, to the computer, the router isn't even there on that level, but it can still somehow connect to it.
Now, here's the strange part. If I reset the router from another (Windows) computer on the network (specifically, the one with a wired connection to it), then I can connect just fine and I can get out to the internet.
Is this a known issue? Has anyone ever experienced the same/similar problem? If so, and you know how to fix it, please post it here. Even if you don't know specifically, but have some good ideas as to what might work, that's fine too. I hate having to do this every day, as it affects everyone's internet connection. Granted, it's not like I'm in a strict business situation with tons of machines and multiple access points, but there are 3 of us in the house and we all share internet access from the same router (as I'm sure most people do), and I feel kind of guilty having to interrupt everyone's connection, if even only for about 30 seconds just so I can get a net connection under Linux.
Windows connects to the router/internet just fine, btw. No problems there. I'm also using a NetGear WN111 USB wireless adapter, with the Windows drivers under ndiswrapper. All else seems to work fine, except for the issue mentioned above.
lo no wireless extensions.
wlan0 IEEE 802.11g ESSID:"*************"
Mode:Managed Frequency:2.412 GHz Access Point: 00:24:B2:03:E1:EE
Bit Rate=300 Mb/s Sensitivity=-200 dBm
RTS thr=2346 B Fragment thr=2346 B
Power Management:off
Link Quality:60/100 Signal level:-57 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
vboxnet0 no wireless extensions.
pan0 no wireless extensions.
route -n:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
These were executed while connected properly. The router uses WPA2 encryption. I have NetworkManager set to use a manual connection, as I was having problems with DHCP (it would repeatedly send out DHCP requests, with no reply). As far as the exact settings on the router, I'm not sure exactly what would affect my connection, but I'll take a look and post the ones that I think might be of importance.
By the way, the ESSID isn't really a bunch of stars, i've just omitted it...
I have NetworkManager set to use a manual connection, as I was having problems with DHCP (it would repeatedly send out DHCP requests, with no reply).
Are you sure that the static IP address that you're assigning isn't in the range that DHCP could assign? Restarting the router could conceivably let you grab the IP address that you want before other IP addresses are assigned via DHCP, thereby avoiding a IP address conflict, whereas if you join the network after IP addresses have been assigned, you might get an IP address conflict.
Some of your other symptoms lead me to believe that this isn't what's going on (I'm guessing that an IP address conflict probably wouldn't give you a "Destination Host Unreachable" message, usually it just confuses the hell out of the two hosts with the same IP address). Nonetheless, always good to check the basics.
I'm also a little concerned that you can't connect via DHCP to begin with. That just sounds wonky to me. I'm not sure whether that's a symptom or a cause of what ails you, but it ain't right.
I've tried wicd in the past, but it didn't seem to make any real difference. As far as re-connecting the wireless on my end (I presume you mean on my end), at first I thought that was the problem, and so I was practically banging my head against the wall trying different ways of configuring the connection (DHCP, no DHCP, DHCP addresses only, different IP addresses, etc.). Re-connecting on my end with any configuration doesn't seem to do any good as far as I can tell...
Sorry if I seem like I'm shooting you down, I don't mean to offend. Perhaps I should have included this info in my first post.
EDIT: Ah, it seems someone posted before me. I'll try again with DHCP tomorrow, when I know I'll have to deal with the problem again (I'd rather not do it now and have to inconvenience others in the house). It has been a while since I tried it last... As far as IP addresses are concerned, our addresses are in the 192.168.1.x range, with the router at 192.168.1.1, and my computer at 192.168.1.4. I don't think any of the other machines have the same address as any others.
As far as IP addresses are concerned, our addresses are in the 192.168.1.x range, with the router at 192.168.1.1, and my computer at 192.168.1.4. I don't think any of the other machines have the same address as any others.
Typically consumer grade routers run a 192.168.0.x or 1.x subnet, and start assigning DHCP addresses starting at 100, so you should be ok. I would log in to the router to check these, just to be sure.
Typically consumer grade routers run a 192.168.0.x or 1.x subnet, and start assigning DHCP addresses starting at 100, so you should be ok.
Err, so would this mean that the addresses should be in the 192.168.1.10x range? I'm a bit confused...
Anyhow, I tried DHCP again eariler today and it did the same thing that it always has done...it'll appear to be attempting a connection, and I'll see little "blips" of network activity on my system monitor applet, and then after a while it'll disconnect me. I'm guessing the little "blips" are the machine trying to talk to the router, but the router's not replying.
Just to see if maybe it'll help diagnose the problem (maybe?), I'll post the output of running "ping 192.168.1.1" while resetting the router (I always do this to make sure that it's connecting properly):
Code:
...
From 192.168.1.4 icmp_seq=538 Destination Host Unreachable
From 192.168.1.4 icmp_seq=540 Destination Host Unreachable
From 192.168.1.4 icmp_seq=541 Destination Host Unreachable
From 192.168.1.4 icmp_seq=542 Destination Host Unreachable
From 192.168.1.4 icmp_seq=543 Destination Host Unreachable
From 192.168.1.4 icmp_seq=544 Destination Host Unreachable
From 192.168.1.4 icmp_seq=545 Destination Host Unreachable
From 192.168.1.4 icmp_seq=546 Destination Host Unreachable
From 192.168.1.4 icmp_seq=547 Destination Host Unreachable
From 192.168.1.4 icmp_seq=548 Destination Host Unreachable
From 192.168.1.4 icmp_seq=549 Destination Host Unreachable
From 192.168.1.4 icmp_seq=550 Destination Host Unreachable
From 192.168.1.4 icmp_seq=551 Destination Host Unreachable
From 192.168.1.4 icmp_seq=552 Destination Host Unreachable
From 192.168.1.4 icmp_seq=553 Destination Host Unreachable
From 192.168.1.4 icmp_seq=554 Destination Host Unreachable
From 192.168.1.4 icmp_seq=555 Destination Host Unreachable
From 192.168.1.4 icmp_seq=556 Destination Host Unreachable
From 192.168.1.4 icmp_seq=557 Destination Host Unreachable
From 192.168.1.4 icmp_seq=558 Destination Host Unreachable
From 192.168.1.4 icmp_seq=559 Destination Host Unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
From 192.168.1.4 icmp_seq=591 Destination Host Unreachable
From 192.168.1.4 icmp_seq=592 Destination Host Unreachable
From 192.168.1.4 icmp_seq=593 Destination Host Unreachable
From 192.168.1.4 icmp_seq=594 Destination Host Unreachable
From 192.168.1.4 icmp_seq=595 Destination Host Unreachable
From 192.168.1.4 icmp_seq=597 Destination Host Unreachable
From 192.168.1.4 icmp_seq=598 Destination Host Unreachable
From 192.168.1.4 icmp_seq=599 Destination Host Unreachable
From 192.168.1.4 icmp_seq=600 Destination Host Unreachable
From 192.168.1.4 icmp_seq=601 Destination Host Unreachable
64 bytes from 192.168.1.1: icmp_seq=602 ttl=64 time=10.7 ms
64 bytes from 192.168.1.1: icmp_seq=603 ttl=64 time=2.77 ms
64 bytes from 192.168.1.1: icmp_seq=604 ttl=64 time=4.00 ms
64 bytes from 192.168.1.1: icmp_seq=605 ttl=64 time=3.89 ms
64 bytes from 192.168.1.1: icmp_seq=606 ttl=64 time=2.41 ms
64 bytes from 192.168.1.1: icmp_seq=607 ttl=64 time=7.44 ms
^C
So, you can see that it shows a few lines of "Destination Host Unreachable" even after I've reset the router. I'm wondering if maybe it's just not fully "up and running" when that's happening, and it "is" when it starts pinging back?
...it'll appear to be attempting a connection, and I'll see little "blips" of network activity on my system monitor applet, and then after a while it'll disconnect me. I'm guessing the little "blips" are the machine trying to talk to the router, but the router's not replying.
You might try looking at what is going on with a packet sniffer like wireshark or tcpdump. If the interface is not already "up", you may have to select the "any" interface.
Thanks for the command, blackhole! I think tcpdump may be what I need. I'm not sure if it'll help when my real problem arises, but I'll definitely try looking at it tomorrow when I try connecting again. I figured there must be some way of viewing the communications between the local computer and others on the network (or the Internet)...
This was done while a ping to the router was running and spitting out screenfulls of "Destination Host Unreachable" messages.
Also, as a note, it will *sometimes* connect on its own after a while, as it did today... Not sure how, though.
From the looks of the output, would anyone say this could just be a signal strength issue? That could very well be the case, as the signal strength does tend to vary a little between 50% and 60% while I'm connected, whether it's "bogus" or not. Although I have tried using a USB extension cable and moving the adapter around, and it doesn't seem to do much good for the signal strength...
Sorry, I didn't manage to check into LQ yesterday ...
Quote:
Originally Posted by MrCode
From the looks of the output, would anyone say this could just be a signal strength issue?
Signal strength is a possibility ...
Here is my analysis of the output from tcpdump:
I was initially baffled by the presence of reverse DNS lookup attempts. Then I realized those were because you had not supplied the -n option. (This is just personal preference, but I usually supply -n because 1) it sometimes speeds things up, and 2) the output isn't cluttered with the lookups. Although the second point could usually be taken care of with filtering.)
EAP is Extensible Authentication Protocol. This is a little beyond my experience, but I gather that is an attempt (successful?) at authenticating with the router. I see those packets seem to be in pairs, but off the top of my head I don't know how to interpret them.
The who-has lines are attemps at ARP (Address Resolution Protocol) -- an attemp to find out the MAC address of the router so packets can be addressed to it. I don't see any response to those queries, which is why you are getting Destination Host Unreachable. Since that box is the router, attempts to contact any other machine on the LAN or the Internet would (I think) result in a network unreachable
So you might do some research and see if you can interpret those EAP packets. If authentication is OK, the question becomes why the router is not responding to ARP requests. (It is, but you don't see it because of signal strength?)
I see you also have MS Windows on that computer. Does it exhibit this same problem? (While, TMK, you can't use tcpdump on MS Windows, Wireshark is cross platform if you want to do packet sniffing there.)
EDIT: I believe I was wrong when I said attempts to connect to other computers on the LAN would result in network unreachable. For LAN computers (as opposed to the Internet), the ARP request should be for the computer's MAC address, not the router's. If that was not forthcoming, it should still be destination host unreachable
Last edited by blackhole54; 09-15-2009 at 06:22 PM.
Thanks for the info. I've got that Wikipedia page on EAP pulled up as I write this post, so I'm definitely looking into the issue. As for Windows, I don't have any problems there...it connects and has internet access right from the get-go. When you install the drivers for the adapter, it installs proprietary connection manager software along with the drivers themselves (though you can opt to use the Windows Wireless Zero config utility... I chose not to do so).
So if the system can't find the router MAC address, does that mean that I need to enter it manually somewhere? I see a spot to enter a MAC address in the "Edit Connections" dialog when I select my wireless network; I'm guessing this is where I'd put it. I'll try finding the MAC address of the router manually (there's probably a sticker on the router somewhere that has info like serial number, MAC address, default password, etc.) putting it there, and reconnecting tomorrow.
EDIT: I found an alternate resource on those EAP codes. It would appear that the machine is requesting authentication (code=1) and getting a response (code=2), but it doesn't seem to be getting proper authentication (code=3). However, it doesn't seem to be failing, either (code=4). If that's the case, then maybe entering the MAC address manually won't do anything...?
I think that I'd like to see the output from Wireshark on windows as well. It would be interesting to know what's happening with EAP on the windows side.
Also, the MAC address should stay constant booting between Windows and Linux; I would be interested to know if there's something different going on while ARP/DHCP are being established... that reminds me: are you using DHCP at this point, or are you still using a static IP address?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.