LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   [ubuntu] have to reset router to get net connection (https://www.linuxquestions.org/questions/linux-networking-3/%5Bubuntu%5D-have-to-reset-router-to-get-net-connection-754487/)

MrCode 09-11-2009 03:30 PM

[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.

Here are my basic specs:

Intel® Pentium™ 4 CPU @2.66 GHz

1.5 GB RAM

3 HDDs: 1 40GB Maxtor internal, 1 320GB WD internal, 1 160GB Maxtor USB external.

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.

repo 09-12-2009 10:27 AM

Just some thoughts :

Is the gateway set correctly?
Do you use DHCP?
What is the output from
Code:

iwconfig
and
Code:

route -n
if the problem occurs?
Try to use wicd, networkmanager is buggy.

MrCode 09-12-2009 02:08 PM

iwconfig:

Code:

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...

repo 09-12-2009 02:27 PM

Quote:

Link Quality:60/100
What happens if you disconnect and reconnect the wireless, when the problem occurs ?
Did you tried wicd ?

bartonski 09-12-2009 02:39 PM

Quote:

Originally Posted by MrCode (Post 3680267)
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.

MrCode 09-12-2009 02:39 PM

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.

bartonski 09-13-2009 09:27 AM

Quote:

Originally Posted by MrCode (Post 3680285)
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.

MrCode 09-13-2009 02:29 PM

Quote:

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?

blackhole54 09-13-2009 08:08 PM

Quote:

Originally Posted by MrCode (Post 3681316)
...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.

MrCode 09-13-2009 08:30 PM

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)...

MrCode 09-14-2009 10:39 AM

Okay, here's the output of "tcpdump -i wlan0 -v" while on a "bogus" connection as root:

Pastebin entry

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...

MrCode 09-15-2009 08:58 AM

So, does anyone have any ideas? I apologise for the bump, but it's been a while since anyone has responded...

Or perhaps this is now a "homework issue", and that's why I'm not getting any responses?

blackhole54 09-15-2009 06:15 PM

Sorry, I didn't manage to check into LQ yesterday ...

Quote:

Originally Posted by MrCode (Post 3682385)
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:

  1. 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.)
  2. 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.
  3. 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

MrCode 09-15-2009 08:40 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...?

bartonski 09-15-2009 11:06 PM

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?


All times are GMT -5. The time now is 01:02 PM.