LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   wireless connection to router works, but no internet (http://www.linuxquestions.org/questions/linux-wireless-networking-41/wireless-connection-to-router-works-but-no-internet-150232/)

g4rr3tt 02-25-2004 01:42 AM

wireless connection to router works, but no internet
 
I'm running SuSE 9.0 on a laptop with integrated wireless, and i have DSL and a linsys wireless router. Linux recognizes the wlan as Askey wlan controller, i believe that is Atheros 5100X+ chipset. wlan0 doesn't retrieve an IP on startup, and after opening KWIFImanager it shows trying to connect and access point is "FF:FF:FF:FF:FF:FF:FF". however after going into KWIFImanager's configuration editor and pressing 'Activate Configuration' a few times (I created a location file in KWIFImanager's location folder with the MAC of my router), it shows a good connection to the router and correct access point, but still no IP address. if i then reconfigure wlan0 through yast, KWIFImanager indicates an IP address is retrieved from the router when yast is resetting network settings. after this i'm able to load the router's internal setup pages in konqueror, but if i try a web page, it gives me an error 'unknown host'. if i start the computer with an ethernet cable connected to the router, eth0 retrieves an IP address at startup and internet works fine. i'm new to linux and i'm out of ideas, i'd greatly appreciate any help i could get. it's frustrating me because the wireless connection works, and the internet works with a cable, but no internet with wireless, so it's just some little thing somewhere....
many thanks

dave bean 02-25-2004 01:29 PM

do you want the router to dynamically assign wlan0 an IP via DHCP ??

g4rr3tt 02-25-2004 04:30 PM

yes, i think so, there are multiple computers on this network.
YaST shows i have two confingured network ifs, eth0 and wlan0, and the options are set the same for both, except that wlan0 has some extra wireless options. eth0 works perfectly when it's plugged into the router, but wlan0 doesn't work so well. this leads me to believe the problem is with the wireless options for wlan0, but i think these are right, or else maybe something is telling konqueror to use eth0 and not wlan0 for internet, is this possible?
by the way, what exactly is the difference between ESSID and NWID? i'm assuming ESSID is what my router calls SSID, this is the name that comes up in the KWIFImanager as connected to network: "my_essid".
thanks

beyer42 02-25-2004 04:56 PM

correct about the ESSID, NWID does not need to be set.

we should be able to figure it out given your output of
ifconfig
iwconfig
netstat -rn

g4rr3tt 02-25-2004 05:51 PM

this is the output right after startup, note that access point is all F's:

linux:/home/gcb123 # ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:90:96:73:B1:25
inet6 addr: fe80::290:96ff:fe73:b125/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:385 errors:126329 dropped:0 overruns:0 frame:205
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:30415 (29.7 Kb) TX bytes:118 (118.0 b)
Interrupt:9 Memory:faa6e000-faa7e000

linux:/home/gcb123 # ifstatus wlan0
dhcpcd running
wlan0 not up
wlan0 IEEE 802.11 ESSID:"my_network" Nickname:"linux"
Mode:Managed Frequency:2.422GHz Access Point: FF:FF:FF:FF:FF:FF
Bit Rate:1Mb/s Tx-Power:off Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0/94 Signal level:-95 dBm Noise level:-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

after playing with the config editor in KWIFImanager, that application shows a connection and the right access point, but no IP address, and this is ifstatus and ifconfig:

linux:/home/gcb123 # ifstatus wlan0
dhcpcd running
wlan0 not up
wlan0 IEEE 802.11 ESSID:"my_network" Nickname:"linux"
Mode:Managed Frequency:2.437GHz Access Point: 00:0C:41:44:44:44
Bit Rate:11Mb/s Tx-Power:off Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:41/94 Signal level:-54 dBm Noise level:-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

linux:/home/gcb123 # ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:90:96:73:B1:25
inet6 addr: fe80::290:96ff:fe73:b125/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4983 errors:839819 dropped:0 overruns:0 frame:1663
TX packets:172 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:393339 (384.1 Kb) TX bytes:10183 (9.9 Kb)
Interrupt:9 Memory:faa6e000-faa7e000

interestingly, if i change access point manually with iwconfig instead of using KWIFImanager, ifstatus and ifconfig are the same, and KWIFImanager shows the correct access point, but there is no connection.
after this, if i use yast to reconfigure wlan0, an IP is retrieved when yast restarts the network settings, and here is ifstatus and ifconfig:

linux:/home/gcb123 # ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:90:96:73:B1:25
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::290:96ff:fe73:b125/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25365 errors:2851798 dropped:0 overruns:0 frame:15935
TX packets:1311 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:2000949 (1.9 Mb) TX bytes:77665 (75.8 Kb)
Interrupt:9 Memory:faa6e000-faa7e000

linux:/home/gcb123 # ifstatus wlan0
dhcpcd running
wlan0 is up
3: wlan0: <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast qlen
199
link/ether 00:90:96:73:b1:25 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.103/24 brd 192.168.1.255 scope global wlan0
inet6 fe80::290:96ff:fe73:b125/64 scope link

current lease for wlan0:
IPADDR=192.168.1.103
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS=151.201.0.39,151.201.0.38
DHCPSIADDR=0.0.0.0
DHCPCHADDR=00:90:96:73:B1:25

wlan0 IEEE 802.11 ESSID:"my_network" Nickname:"linux"
Mode:Managed Frequency:2.437GHz Access Point: 00:0C:41:44:44:44
Bit Rate:11Mb/s Tx-Power:off Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:38/94 Signal level:-57 dBm Noise level:-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

now it says wlan0 is 'up', and it shows an IP address, and i can access the router over this connection, but can't get to the internet with konqueror, it says 'unknown host'

i have to go back to linux to get the output from netstat -rn, i'm using windows for internet now, but i had saved the output from ifstatus and ifconfig to a file from earlier, so i pasted them here now.

thanks a lot for the help

g4rr3tt 02-25-2004 06:18 PM

here's the output of netstat -rn after the wireless connection is working:

gcb123@linux:~> netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0

here's what it is when i plug in the ethernet cable:

gcb123@linux:~> netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0


what is the line that starts with destination 0.0.0.0 ? if i define my default gateway for wlan0, could that solve the problem? is the destination column a "mask"? so all 0's means any destination go through the router gateway?

g4rr3tt 02-25-2004 08:19 PM

ok, thanks to lots of very helpful postings i'm able to use the internet from my wireless connection. however, it still requires a bit of work to set up that it shouldn't, so now i'm trying to make the process more automatic. the wireless connection doesn't set itself up, i have to open KWIFImanager and go into config->configuration editor and press 'activate configuration' a number of times before it makes a connection. when I initially open KWIFImanager, it says searching for network and shows my network name, but the access point shows all F's, it can't seem to find the router. i've disabled my router from broadcasting the ssid, but this shouldn't matter, right?
after this connection is setup, if i do 'dhcpcd wlan0', i get an IP address and my internet works.
what i'd like to know is how to have linux open this connection successfully at startup? i've modified /etc/wlan.conf to look for my networks ssid, and i've copied /etc/wlancfg/wlancfg-DEFAULT to wlancfg-my_ssid, but this didn't seem to fix anything.
is it correct that when startup runs "setting up network intefaces" that this behavior is determined by the files in /etc/sysconfig/network/ ? can anyone tell me more specifically what these do and in what order?

beyer42 02-25-2004 09:15 PM

Look at Wireless and Network sections of
http://portal.suse.com/sdb/en/2002/11/wavelan.html

I have never used any wireless manager, so not sure what to tell you there.

Look at /etc/sysconfig/network/ifcfg-wlan0

g4rr3tt 02-26-2004 04:52 AM

thanks beyer42 for the link.

i've almost got my wireless working well, but it still doesn't start automagically. it will only connect if i do 'ifup wlan0' repeatedly. i did a 'iwevent' to watch wireless events, then opened a seperate konsole and did "ifup wlan0' a few times. every time i did, i got:

linux:/home/gcb123 # ifup wlan0
warning: using NO encryption
DHCP client is already running on wlan0

but in the other konsole that was watching wireless events it would show:

Waiting for Wireless Events...
10:46:23.551820 wlan0 Mode:Managed
10:46:23.558658 wlan0 Channel:6
10:46:23.582110 wlan0 ESSID:"my_network"

after doing 'ifup wlan0' a few times, the wireless connection appears and everything works great.

anyone know why this behaves like this? or how to at least configure linux to do this at setup?

thanks

tomasj19 02-26-2004 06:30 PM

Add the following to all ur ifcfg* files...

DHCLIENT_PRIMARY_DEVICE='yes'

Reboot

see if this works....

Thynomalis 04-02-2004 02:27 PM

thank you!
I was having similar problems and adding DHCLIENT_PRIMARY_DEVICE='yes' in the cfg file seemed to do the trick nicely. thanks again.


All times are GMT -5. The time now is 04:32 AM.