Re: Laptop Connects to WAP, But Cannot Access 'Net

"Bradley D. Thornton" <[email protected]>
Newsgroups gmane.linux.slackware
Organization NorthTech Computer
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160



On 03/26/2012 04:26 PM, Rich Shepard wrote:

>   Let me summarize the Sony's behavior at 2 different wifi hot spots: wicd
> sees nearby networks with the topmost the one at the site where the laptop
> is. Clicking on the connect button shows it's connected. However, no web
> page loads, and ping, traceroute, and host result in the cursor moving to a
> new line and sitting there until ^c is pressed.
> 
>   From a console, I ran 'ifconfig -a' and saw that wlan0 was UP and
> RUNNING.
> As root, running 'dhcpcd wlan0' returned an IP address on the LAN. Still
> could not ping, run traceroute, or host. Nor would firefox return a Web
> page
> when the URL was entered in the address box.
> 
>   The eth0 interface is configured for here and works flawlessly.


Okay I'm not really sure what you're trying to say here. The problem
you're describing is rather elementary, so all I can offer is a few
questions and some textbook troubleshooting procs for the problem you've
described...

1.) You say you did an ifconfig and wlan0 was bound. It is completely
possible to have a layer two connection and not a layer three
connection, meaning, you've connected to the WAP, as you put it, yet
don't have an IP address, mask, or routing info.

It seems that although wlan0-up has occurred, you may not have an IP
address. So let's test, because you say you can't ping *anything*

a.) ifconfig wlan0 (For starters, you shouldn't be running both eth0 and
wlan0 - two different NICs are going to have the same routing
information, so use one or the other. i.e, unplug the ethernet cable to
test your 802.11x connection.

Alternatively,

<code>
# ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 00:16:36:8b:9b:54 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.10/24 brd 192.168.1.255 scope global eth0
    inet6 fe80::216:36ff:fe8b:9b54/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 00:14:a5:ea:63:2c brd ff:ff:ff:ff:ff:ff
4: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
</code>

In the example above I'm plugged in with eth0. wlan0 is down. Notice
that eth0 has an IP address though. In your case, your wlan0 should be
the one with the address and you shouldn't have anything plugged into
your RJ-45 port.

2.) do a 'route -n'

So far, you should have been able to determine your MAC Addresses,
whether or not you're connected to the WAP/Router, what your IP address
is from that source (if any) and what your mask and gateway are.

If you're missing any of that info, therein lies your problem.

3.) You say you can't ping anything. the very first thing you should
always try to ping is either 127.0.0.1 or localhost, the latter should
have a corresponding entry in /etc/hosts.

Let's just entirely forget about firefox or any other browser. That will
tell you little to nothing. And let's forget about hostnames too.

<code>
root@hammer:~# ping -c1 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_req=1 ttl=64 time=0.134 ms

- --- 127.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.134/0.134/0.134/0.000 ms
You have new mail in /var/spool/mail/root
root@hammer:~# ping -c1 localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.139 ms

- --- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.139/0.139/0.139/0.000 ms
root@hammer:~# ping -c1 gw
PING gw (192.168.1.1) 56(84) bytes of data.
64 bytes from gw (192.168.1.1): icmp_req=1 ttl=64 time=0.467 ms

- --- gw ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.467/0.467/0.467/0.000 ms
root@hammer:~# ping -c1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=251 time=90.6 ms

- --- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 90.664/90.664/90.664/0.000 ms
</code>

If all that checks out, then we need to look at /etc/hosts, our NIS
domain (which is NOT applicable in your case), and/or DNS.

Let's start with this:

<code>
# echo 8.8.8.8 gnds >> /etc/hosts
# ping gdns
</code>

4.) If we're still doing alright then let's cat /etc/resolv.conf and see
what DNS servers are there okay? You may want to replace whatever is
there with 'nameserver 8.8.8.8' and then see if you can do a simple:

<code>
root@hammer:~# dig ibm.com a

; <<>> DiG 9.4-ESV-R4-P1 <<>> @8.8.8.8 ibm.com a
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58757
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ibm.com.			IN	A

;; ANSWER SECTION:
ibm.com.		17939	IN	A	129.42.38.1

;; Query time: 85 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Mar 26 17:39:59 2012
;; MSG SIZE  rcvd: 41

</code>

Did you talk to the DNS server?

Now to back up. Yes. At some point (because the assumption here is that
you are going through a captive portal system) you are indeed going to
need to confirm acceptance of a TOS by checking a box that your browser
(lynx, firefox, whatev), but even before this, you should have been able
to ping outside (Captive portals block HTTP traffic for the feeble
minded, not IP traffic so you can troubleshoot).

A captive portal should, upon an initial attempt to contact any website,
re-direct you to the TOS page where you must accept those terms.

If everything fails here, then it is the portal system. If things failed
somewhere earlier please post where this failure occurred so we can
pinpoint exactly where to look for a solution instead of just blindly
guessing what might be wrong (as everyone has been doing so far).

I hope that helps :)

Kindest regards,


- -- 
Bradley D. Thornton
Manager Network Services
NorthTech Computer
TEL: +1.310.388.9469  (US)
TEL: +44.203.318.2755 (UK)
TEL: +41.43.508.05.10 (CH)
http://NorthTech.US

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Find this cert at x-hkp://pool.sks-keyservers.net

iQEcBAEBAwAGBQJPcQ40AAoJEE1wgkIhr9j3xNYH/jA9qndtN+4aVPDfFLVv1v47
3Grs1o8u6H4A5VWKV+SLr1KjJASfqtqy3MRxAjVhJuKyWTFn/2KKmnRMh8ri3Se/
jMU3qL/nfe0ONeIOCSQMMjeyVHX8S6Btvg/8ea0erSSNQztFbLZSQ7gHr+WMnn1T
jxPOlGgHvNZreOKSZKKRfZA7mHX+76viH7VI6U/ahSqKwfvziNgeuNV/QLjmNWkc
li3O30t7yz2Z/oTEiL9b74D8V+WenvYMxwEbqdDkJgucj9pGmVjBM7xKF/Mo80jF
fYBI/FImF0qgXUhJJJsIeKRep5vEwipHtvSObZaDQHnBtk0w0vdoPpSgbIxlMFg=
=Edwe
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.