LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 05-03-2005, 10:37 PM   #1
Tyr_7BE
LQ Newbie
 
Registered: Mar 2003
Distribution: Ubuntu Hoary
Posts: 11

Rep: Reputation: 0
Problem connecting to wireless network


*sigh*...wireless networks, b'ys.

Ok so my school provides pretty decent Wireless G coverage to the parts of the campus I frequent. I bought a D-LINK AirPlus DWL-G650 PCMCIA card so I could get in on the wireless thing with my laptop.

I plugged the card into the side of the laptop, and issued a "sudo ifconfig ath0 up". The device roared to life, and I saw a bunch of flashing lights. So now that the card is active, I try to connect to the wireless network.

Using a PHP script I found on the net (can't remember where), I was able to extract the commands used to connect to a wireless network.

"sudo iwlist ath0 scan" returned the following:
Code:
conor@conor-lt:~$ iwlist ath0 scan
ath0      Scan completed :
          Cell 01 - Address: 00:01:F4:ED:1A:4B
                    ESSID:"uw-wireless"
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
                    Encryption key:off
                    Bit Rate:1 Mb/s
                    Bit Rate:2 Mb/s
                    Bit Rate:5 Mb/s
                    Bit Rate:11 Mb/s
                    Extra:bcn_int=100
          Cell 02 - Address: 00:01:F4:ED:1B:F5
                    ESSID:"uw-wireless"
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
                    Encryption key:off
                    Bit Rate:1 Mb/s
                    Bit Rate:2 Mb/s
                    Bit Rate:5 Mb/s
                    Bit Rate:11 Mb/s
                    Extra:bcn_int=100
          Cell 03 - Address: 00:01:F4:ED:1B:D5
                    ESSID:"uw-wireless"
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
                    Encryption key:off
                    Bit Rate:1 Mb/s
                    Bit Rate:2 Mb/s
                    Bit Rate:5 Mb/s
                    Bit Rate:11 Mb/s
                    Extra:bcn_int=100
I next issued a "sudo iwconfig ath0 essid uw-wireless key off". That appeared to work fine. It printed nothing, and now "iwconfig ath0" returns the following:

Code:
conor@conor-lt:~$ iwconfig ath0
ath0      IEEE 802.11g  ESSID:"uw-wireless"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:01:F4:ED:1B:D5
          Bit Rate:11 Mb/s  Tx-Power:50 dBm  Sensitivity=0/3
          Retry:off  RTS thr:off  Fragment thr:off
          Power Management:off
          Link Quality=31/94  Signal level=-64 dBm  Noise level=-95 dBm
          Rx invalid nwid:5704  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0
The following is the ouput of "sudo dhclient ath0":

Code:
conor@conor-lt:~$ sudo dhclient ath0
Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit url_removed.isc.org/products/DHCP

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/ath0/00:0f:3d:52:0f:f6
Sending on  LPF/ath0/00:0f:3d:52:0f:f6
Sending on  Socket/fallback
DHCPREQUEST on ath0 to 255.255.255.255 port 67
DHCPREQUEST on ath0 to 255.255.255.255 port 67
DHCPACK from 129.97.192.1
bound to 129.97.192.166 -- renewal in 464 seconds.
So it's definitely talking to the network.

Now at this point, under windows, I go to laptop.uwaterloo.ca, which redirects me to a sign-in page and I sign on using my username and password. Unfortunately, under Linux, epiphany gives me a host not found.

Furthermore, here are the results of me attempting to ping several addresses:

Code:
conor@conor-lt:~$ ping 129.97.192.166
PING 129.97.192.166 (129.97.192.166) 56(84) bytes of data.
64 bytes from 129.97.192.166: icmp_seq=1 ttl=64 time=0.053 ms
64 bytes from 129.97.192.166: icmp_seq=2 ttl=64 time=0.065 ms
64 bytes from 129.97.192.166: icmp_seq=3 ttl=64 time=0.047 ms
64 bytes from 129.97.192.166: icmp_seq=4 ttl=64 time=0.066 ms
64 bytes from 129.97.192.166: icmp_seq=5 ttl=64 time=0.048 ms

--- 129.97.192.166 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.047/0.055/0.066/0.012 ms



conor@conor-lt:~$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.065 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.067 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.048 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.057 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.047 ms

--- 127.0.0.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.047/0.056/0.067/0.012 ms



conor@conor-lt:~$ ping 129.97.192.165
connect: Network is unreachable

conor@conor-lt:~$ ping 129.97.192.164
connect: Network is unreachable

conor@conor-lt:~$ ping 129.97.192.163
connect: Network is unreachable

conor@conor-lt:~$ ping 129.97.192.167
connect: Network is unreachable

conor@conor-lt:~$ ping 129.97.192.168
connect: Network is unreachable

conor@conor-lt:~$ ping 129.97.192.169
connect: Network is unreachable
If I open up a browser and navigate to 129.97.192.166, I get my local apache2 default web server. So it bound itself to 129.97.192.166 and now that points at localhost. The actual network appears to be unreachable.

It seems that direct operations on the AirPlus Card work (ie, iwconfig worked fine, dhclient showed me talking happily to the network), but things like ping and browsing that aren't specifically directed at the ath0 device fail.

Am I missing a step here? It seems that device ath0 is capable of talking to the wireless network, but as far as my laptop is concerned it has no active network interfaces.

Of particular interest is the line in "iwconfig ath0" after I've connected and obtained a DHCP lease. "Rx invalid nwid" is a huge number. Does this mean that my laptop is rejecting incoming packets from the network?

Ubuntu Hoary, Compaq Presario 2500, D-Link AirPlus DWL-G650 PCMCIA Wireless Card.

Last edited by Tyr_7BE; 05-03-2005 at 10:38 PM.
 
Old 05-03-2005, 11:38 PM   #2
mjsurette
Member
 
Registered: May 2005
Distribution: spiral, fedora
Posts: 65

Rep: Reputation: 18
Try running 'route -n' after you've connected to see how the routing is set up. Of particular interest is the default route (destination 0.0.0.0). the contents of /etc/resolve.conf after you've connected would also help.

I assume that you've tried logging on to laptop.uwaterloo.ca at this point.

Mike
 
Old 05-04-2005, 10:45 AM   #3
Tyr_7BE
LQ Newbie
 
Registered: Mar 2003
Distribution: Ubuntu Hoary
Posts: 11

Original Poster
Rep: Reputation: 0
Interesting. I didn't know about "route". Thanks!

Code:
conor@conor-lt:~$ route -n
Kernel IP routing table
Destination   Gateway    Genmask     Flags Metric Ref    Use Iface
conor@conor-lt:~$
/etc/resolv.conf:
Code:
search uwaterloo.ca
nameserver 129.97.83.1
So no routes, and from what I can tell resolv.conf is alright. I've tried several permutations of the "route add" command, but none seem to work

sudo route add -net 129.97.83.1 dev ath0
SIOCADDRT: Invalid argument

sudo route add ath0
ath0: Host name lookup failure

I also tried "sudo route add -net 0.0.0.0 dev ath0". That returned no output. Issuing a "route -n" I got the following:
Code:
conor@conor-lt:~$ route -n
Kernel IP routing table
Destination        Gateway        Genmask        Flags Metric Ref         Use Iface
0.0.0.0               0.0.0.0           0.0.0.0           U        0         0           0     ath0
conor@conor-lt:~$
However, two seconds later I issued another "route -n" and the only entry in the routing table was gone...right back to the blank table I started with.

Again, at this point I've connected to the wireless network through ath0 using iwconfig, and I've obtained a DHCP lease using dhclient. /etc/resolv.conf shows a nameserver. However, it seems my laptop doesn't know to use ath0 as the default route.

Can anyone tell me how to set up ath0 as the default route?
 
Old 05-04-2005, 10:52 PM   #4
Tyr_7BE
LQ Newbie
 
Registered: Mar 2003
Distribution: Ubuntu Hoary
Posts: 11

Original Poster
Rep: Reputation: 0
Update:

This is interesting. Can anyone explain what's happening here?

First, I issue the following:

sudo iwconfig ath0 essid "uw-wireless" key off
sudo dhclient ath0

And all this looks just fine. It gets a DHCP lease and all's well. Now, I type "sudo ifconfig ath0 up". Immediately, as fast as I can, I type "route -n". Before that's even done printing, I press the "up" key to get my most recent command, and press enter. Here's what I get:

Code:
conor@conor-lt:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
129.97.192.0    0.0.0.0         255.255.255.0   U     0      0        0 ath0
conor@conor-lt:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
conor@conor-lt:~$
After I perform an "ifconfig ath0 up", It appears in the routing table for a split second, and then it's gone.

Could this be part of the problem?
 
Old 05-04-2005, 10:55 PM   #5
mjsurette
Member
 
Registered: May 2005
Distribution: spiral, fedora
Posts: 65

Rep: Reputation: 18
Your DHCP isn't doing all of it's job. It should not only give you an IP address, but also set up your default route and nameserver. It's skipping the routing part. Personally I use dhcpcd and it works well. You might want to give that a try.

As a side note, your default route gateway has to be a host on a reachable subnet. More specifically, it cannot be an interface or a network. It must be a host that knows how to forward packets to subnets that you're not connected to. That's why DHCP is supposed to set it up. It's been taught (OK, configured) to know what that host is.

HTH

Mike
 
Old 05-05-2005, 01:02 PM   #6
Tyr_7BE
LQ Newbie
 
Registered: Mar 2003
Distribution: Ubuntu Hoary
Posts: 11

Original Poster
Rep: Reputation: 0
As I posted previously, it seems that the default route is set up, but it disappears immediately. I get maybe 0.5 seconds where I can see it with route -n.

I tried downloading dhcpcd. I had even less luck with that. Issuing a "dhcpcd ath0" sat there for a very long time. When it finally returned, my routing tables were still empty, and /etc/resolv.conf hadn't been updated.

This seems like a real irregularity to me. Perhaps other distros would get the job done better?
 
Old 05-05-2005, 10:39 PM   #7
mjsurette
Member
 
Registered: May 2005
Distribution: spiral, fedora
Posts: 65

Rep: Reputation: 18
I wouldn't give up quite yet. Check the log files (/var/log/*) for error messages to see if there are any clues.
If that doesn't help, up the debug level and try again. There's usually a clue in there somewhere. Let me know what you find.

In case you're serious about other distros:
<plug distro=slackware>
Personally, I've been a Slacker for a long time. I've tried others, but keep coming back. "It just works" is something you often hear about it and it's true. Still it's not for everyone. Think of it as some people preferring a manual transmission in a car as opposed to an automatic. With Slackware things work pretty well from the start, but to change things, you'll have to get "under the hood" and edit some files. If that's for you, I strongly recommend it.
</plug>
 
Old 05-06-2005, 09:15 AM   #8
Tyr_7BE
LQ Newbie
 
Registered: Mar 2003
Distribution: Ubuntu Hoary
Posts: 11

Original Poster
Rep: Reputation: 0
Hahaha...I hate slackware I used to love going under the hood with my distros, but lately I've been all about a distro that stays the hell out of my way.

Update...fixed! It was the last thing I would have expected. A few days ago I installed NetworkManager to try to simplify my wireless experience. I caught wind that it didn't work on Hoary, so I stopped using it. Well yesterday I saw a HUGE number of error messages coming from NM, so I removed it using apt, because apt is awesome. When I get in to school today, everything works!

I think NM was broken such that it was setting my route continuously based on garbage. That would explain why nothing to do with ath0 would stick....NM was flushing it.

Thanks a lot for your help Mike!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wireless network not connecting jburford Linux - Wireless Networking 11 07-08-2005 09:14 AM
Connecting to a wireless network death_au Linux - Newbie 3 03-06-2005 07:38 AM
Connecting to Wireless network ms82xp Linux - Wireless Networking 1 02-06-2005 09:44 PM
Connecting to wireless network? cucolin@ Linux - Wireless Networking 5 03-06-2004 02:16 PM
need help connecting to my wireless network skiguy Linux - Wireless Networking 6 11-05-2003 11:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration