LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Connection to access point OK, but cannot access the network/internet (http://www.linuxquestions.org/questions/linux-wireless-networking-41/connection-to-access-point-ok-but-cannot-access-the-network-internet-271223/)

Nymphetamine 12-28-2004 01:42 PM

Connection to access point OK, but cannot access the network/internet
 
As I'm not so experienced with networking in Linux, this problem might have a trivial solution. Briefly described, I manage to establish a wireless connection to the router, but I cannot access (or even ping) stuff on the network and the internet.

What I've got:
- Dell Inspiron 5160 Laptop
- Some broadcom wireless PCMCIA (I think) card (BCM 4309)
- SuSE 9.1 professional (with KDE desktop)
- Some standard wireless/ethernet router (Linksys), acting as a DHCP server
- ndiswrapper (v 0.6-23) plus the correct driver for my card - installed and modprobe'd without problems

There seem to be no hardware problems. iwconfig shows me automatically the correct SSID and a pretty good signal strength for wlan0.
I can ping the router and access the configuration page in a browser.
However, when I try to ping another machine on the network or on the internet I get: Network unreachable.

KWiFiManager also shows me that there is no IP address, and I guess that's the problem (The DHCP-clients table of my router shows no entry for my laptop).

Also note that my router uses temporarily no WEP encryption and has ESSID broadcast enabled (that's a big security no-no, I know, but just for the sake of simplicity).

When I use the wired connection (eth0) to the same router, everything works perfectly and I have full network access.

I have tried connecting to the access point on the campus, which has also no encryption and SSID-broadcast - same problem.

What did I forget to do?

Thanks for your help people.

-------------------------------------

As an aside, I've read somewhere that ndiswrapper cannot handle WEP-encryption; is that true? Are they planning to change that?

Hangdog42 12-30-2004 11:53 AM

How are you trying to get an IP? Are you using a DHCP server or are you assigning a static IP? I think that Suse uses dhclient as its DHCP client, so once you have the card configured, try issuing dhclient wlan0 (if your wireless card is called wlan0, otherwise use the real name on your system). The other DHCP client to try is dhcpcd.

If you want to assign a static IP, you can use the ifconfig command, but you then need to set the the gateway to your router using the route command and also edit your /etc/resolv.conf file to include your ISP's DNS servers.

Nymphetamine 01-02-2005 04:26 AM

Ah yes, I forgot that: Yes, I use DHCP for getting my IP address (the WLAN-router is the DHCP-server)

Now magically it has worked, and I'm getting a valid IP address upon connecting to the AP (whitout me having changed or done anything). It's even reproducible :D
I can ping other machines that are directly connected to the router (like the printer or something) - that is, all machines with an IP address of 192.168.2.***, but I still cannot access the internet. (I have an ADSL modem connected to the router)
When I try to ping some other IP, like 162.100.*.* or something, it doesn't even try but gives me "Network is unreachable".
As I said, when I use the wired connection to the same router (i.e. with interface eth0) it works, so I guess it must have something to do with the configuration of wlan0, not with the settings of the router or anything.

What's the problem here?
:newbie:

Hangdog42 01-02-2005 07:35 AM

Check the output of route. If DHCP is really working the way it should, you should see an entry labelled default that has the IP address of your router. If it isn't there, try adding it with route add default gw RouterIPaddress.

Desert 01-02-2005 07:15 PM

I am having the same problem. Suse 9.2, ndiswrapper, Inspiron 8500 with TrueMobile 1300 pings and accesses config page on Linksys 802.11b router perfectly fine (and Windows computers on network), but can not go beyond to the internet. DHCP assigns IP address successfully. Tried the route add default gw 192.168.1.1 as suggested by Hangdog with no success. DSL connection behind router. I am using wireless successfuly with Windows as I type.

Thanks

god_is_good478 01-02-2005 07:22 PM

I have the same situation as Desert, DSL behind router...

initially I could not get an IP, I made it static and that seemed to solve it to the point that I could activate my connection, see the SSID and have a strong wireless signal

but same problem... I cannot ping or connect to the internet :(

god_is_good478 01-02-2005 07:23 PM

But the machine can connect to ethernet (wired) quite nicely using the same router...... :(

darkleaf 01-03-2005 05:13 AM

Have you set a DNS server? Your access point is the one you probably want (for now at least or forever). Open /etc/resolv.conf and add the line:
Quote:

nameserver 192.168.1.1
and change 192.168.1.1 to your AP's IP address.

edit: I see you have trouble with pinging to IP addresses then this isn't the solution. However change this and then try to ping to a domain name. Say www.google.com and try if that works. You still need to set the gateway if you haven't done yet.

Desert 01-03-2005 05:27 PM

Thanks darkleaf... but no avail...

I added that as the first line of the resolv.conf, and set the gateway. Maybe I'm missing another step that I'm too Windoze to notice? Something else?

darkleaf 01-04-2005 02:31 AM

Can you post the output from "iwconfig wlan0" "ifconfig wlan0" and "route"?

Kropotkin 01-04-2005 03:54 AM

also same problem
 
I too have been having the same problem.

I have a new laptop with Fedora Core 2 installed. Via a LAN connection, I can bring up a connection almost instantaneously, but the past two weeks I've been tinkering in vain to get WLAN working.

With iwlist and KWiFiManager, I can see and ostensibly connect to an access point, but that's it. The problem seems to be getting a DHCP lease. Here is the relevant output of "dhclient eth1":

Code:

Listening on LPF/eth1/00:91:4b:68:f2:90
Sending on  LPF/eth1/00:91:4b:68:f2:90
Sending on  Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

I have also tried assigning a fixed IP address, but DNS doesn't work. In any event, I want to be able to use DHCP so as to be able to connect to the Internet, like Mac and Win users, in public WiFi hotspots, where, for obvious reasons, I don't know the host configuration.

Anyone have any suggestions?

Desert 01-04-2005 07:00 PM

wlan0 IEEE 802.11g ESSID:"linksys" Nickname:"blak005"
Mode:Managed Frequency:2.437 GHz Access Point: 00:04:5A:DA:48:0B
Bit Rate=11 Mb/s Tx-Power:25 dBm
RTS thr=2347 B Fragment thr=2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-67 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:6 Invalid misc:16731 Missed beacon:0

I've tried Master mode as well. Also, KWiFiManager seems to want to say it is peer-to-peer and not infrastructure, and won't save any changed settings.
--------------------------------------------------------------------------------------------
wlan0 Link encap:Ethernet HWaddr 00:90:4B:B1:FB:E7
inet addr:192.168.1.149 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::290:4bff:feb1:fbe7/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1027 errors:0 dropped:0 overruns:0 frame:0
TX packets:238 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:334282 (326.4 Kb) TX bytes:24992 (24.4 Kb)
Interrupt:7 Memory:faff6000-faff7fff
--------------------------------------------------------------------------------------------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo

before "route add...
--------------------------------------------------------------------------------------------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

After the "route add...". Will not save changes at reboot.
--------------------------------------------------------------------------------------------
nameserver 192.168.1.1
search site

I've tried switching the lines as well.

Thanks for paying some attention to this.

darkleaf 01-05-2005 03:37 AM

What's that "search site" ? An action you did or something?

For the rest I can't find an error. Is your router setup correctly? Are you sure the IP of the router is 192.168.1.1 or did you just copy my example for nameserver?

Desert 01-05-2005 12:20 PM

I may be a Windows user by nature, but I'm not that Windoze ;-)
That is the IP of the router. The "search site" thing was there when I accessed it.

troublefunk 01-05-2005 03:51 PM

I'm having this exact same problem. Compaq Armada M700 with a Microsoft MN-720 and Suse 9.1. I'll be watching to see if anybody can figure this out.


All times are GMT -5. The time now is 08:57 AM.