Can't obtain IP address for my wireless card
Thanks in advance for any help!
I am halfway through my first week of Linux and am a bit confused (!) with trying to get my WLAN card to work. I am using FEDORA3 with kernel ver. 2.6.9-1.667. My ethernet (wired) eth0 is working fine and I can get online. I installed NDISWRAPPER v.1.2 with my Windows XP drivers for my Realtek rtl8180 wireless card, and it appears to have installed correctly (I can go to "network settings" and add WLAN0 as a device). Additionally, from the shell, if I enter: # /sbin/iwlist wlan0 scanning I can get info about "Cell 01" including the ESSID (with the name of my house network displayed correctly), address, frequency, protocol, mode (managed). I do get a warning: "Warning: Driver for device wlan0 recommend version 18 of Wireless Extension, but has been compiled with version 16, therefore some driver features may not be available..." When I attempt to activate the card (through the Network Configuration GUI) it cannot determine IP information for WLAN0. It seems like I am close, but I'm running out of ideas. Any help is appreciated. Thanks! |
You can safely ignore the warning.
"iwconfig wlan essid **** key ****" "dhcpcd wlan0" Set your key and essid with the first command (leave it out if you don't use either or both) Then try to get the info. |
I can set the ESSID to my network ("madhouse")
The "address" in Cell 1 (madhouse) does not match the "cell" when I type: # iwconfig wlan0 and I'm not sure how to change it (or if I need to). Also #dhcpcd wlan0 results in an error "bash: dhcpcd: command not found" |
Can you install the dhcpcd package then?
Those addresses should be the same. Kind of weird. are you sure you're connecting to the right point then? |
Quote:
Code:
iwconfig wlan0 essid madhouse before setting your essid and wep key i would type the following: Code:
ifdown wlan0 they after it comes back up you can use Code:
ifconfig wlan0 up to look and see if you pulled an ip type Code:
ifconfig wlan0 good luck. |
Even after all this, you'll still need to get dhcpcd to assign an IP address. To do so on FC3, you may need to do;
# /sbin/dhcpcd wlan0 Cheers Edit: Actually, it might be # /sbin/dhclient wlan0 depending on whether dhcpcd or dhclient is installed, I can't remember which is the default in fedora, try both if one doesn't work. |
Thanks for all your help. My cable service decided to drop out for most of today! (lol). Now that it's back up, I tried:
# ifdown wlan0 # iwconfig wlan0 essid madhouse (My wireless network does not require a key, so I skipped "iwconfig wlan0 key restricted XXXXXXXXX". ) # ifup wlan0 I get: "Determining IP information for wlan0...", and "failed." after a minute or so. And when I type: # /sbin/dhclient wlan0 I get: "sit0: unknown hardware address type 776 sit0: unknown hardware address type 776 Listening on LPF/wlan0/00:0d:f0:12:64:cc Sending on LPF/wlan0/00:0d:f0:12:64:cc Sending on Socket/fallback DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15 No DHCPOFFERS received. No working leases in persistent database - sleeping." I would like to avoid having to use WEP as I would like to use my laptop on various wireless networks (coffee shops, library, etc.) and obviously can't configure their networks to make my driver work. Maybe I've installed something wrong? How would I be able to tell? Thanks again for any advice. |
ok.
make sure that ndiswrapper module is loaded (it should be in the output of): # lsmod After you enter the key and essid information for your card, check the output of # iwconfig wlan0 to check that all the info is there as you have input. If it is not there, simply try putting it in again. Sometimes I have to put mine in a couple of times for iwconfig to pick it up correctly You have to have the correct AP and essid info there. # ifconfig wlan0 up check that wlan0 is there: # ifconfig Once everything is there as it should be, you should be able to do # /sbin/dhclient wlan0 It should assign an IP address. Any more probs, post the output of iwconfig and ifconfig Cheers |
you maybe in the same situation as me were your wifi card will not work in linux without WEP assigned.
go into your AP, set a WEP key, activate it, write it down, and get back into linux and try it again. it can not hurt to activate WEP, and all it does is slow down anyone trying to wardrive you as that is better then no security at all anyways. |
o.k. Ndiswrapper is listed when I type lsmod (it lists "0" under the "used by" column)
I type: # ifdown wlan0 # iwconfig wlan0 essid Madhouse # iwconfig wlan0 AP 00:11:95:76:ED:5C (I got this AP from doing "# /sbin/iwlist wlan0 scanning", this is the address associated with Cell 01 "Madhouse") # iwconfig wlan0 I get: wlan0 IEEE 802.11b ESSID:"Madhouse" Nickname:"localhost.localdomain" Mode:Ad-Hoc Frequency:2.412GHz Cell: 00:11:95:76:ED:5C Bit Rate=11Mb/s Tx-Power:20 dBm Sensitivity=0/3 RTS thr=2432 B Fragment thr=2432 B Encryption key:off Power Management:off Link Quality:100/100 Signal level:-52 dBm Noise level:-256 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 I type: # ifconfig wlan0 I get: wlan0 Link encap:Ethernet HWaddr 00:0D:F0:12:64:CC BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:38 errors:0 dropped:0 overruns:0 frame:0 TX packets:70 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:12716 (12.4 KiB) TX bytes:17316 (16.9 KiB) Memory:e0201000-e02010ff I type: # /sbin/dhclient wlan0 I get: sit0: unknown hardware address type 776 sit0: unknown hardware address type 776 Listening on LPF/wlan0/00:0d:f0:12:64:cc Sending on LPF/wlan0/00:0d:f0:12:64:cc Sending on Socket/fallback DHCPREQUEST on wlan0 to 255.255.255.255 port 67 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9 No DHCPOFFERS received. Trying recorded lease 192.168.0.101 PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data. --- 192.168.0.1 ping statistics --- 4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2998ms , pipe 4 No working leases in persistent database - sleeping. And finally: # ifup wlan0 "Determining IP information for wlan0...failed" and for good measure, I type "ping google.com" and get "ping: unknown host google.com" ("ping" works when I plug in my ethernet cable though) Am I missing something? or doing something in the wrong order? Thanks again for any help. |
Ok, everything seems to be in iwconfig correctly, except the mode. Do you really use ad-hoc? Check the output of iwlist wlan0 scanning for this. Mostly people use managed, but if your card supports ad-hoc...... To change this if you need to, or to experiment,
# iwconfig wlan0 mode Managed then try the dhcp stuff again. I'm assuming you use dhcp btw from the earlier discourse in this thread. Most people do, especially with wireless routers, but I'm just making sure. In the words of Kate Bush "don't give up" |
I tried setting WEP on my router and setting the key with iwconfig, but it didn't seem to make a difference.
I also checked on my router to be sure DHCP is enabled (it is). I changed the mode to Managed (it was listed as Managed when I typed: # iwlist wlan0 scanning). When I'm getting: "DHCPREQUEST on wlan0 to 255.255.255.255 port 67" when I type "# /sbin/dhclient wlan0", does this number have any relation to the subnet mask? (which is 255.255.255.0 on my router control panel page) |
Hmmm, everything looks like it should work. That number is related to your subnet mask, but I'm not sure how, I'm several million marks below guru status I'm afraid.
My advice would be to just keep playing around with it. As long as all the settings match up well between the iwlist scan results and iwconfig, and you can then see the interface in ifconfig, you should be able to get dhclient to give it an IP address. Make sure your ethernet cable is unplugged too. Good luck |
you may also try plugging in a static IP info in your equvilent location to:
/etc/network/interfaces file. that is were it is located in debian, no clue were it is in your distro sorry. # out the dhcp, and plug in a static stack to see if it is just not pulling an IP. make sure to plug in an IP you KNOW will never be pulled. most SoHo routers start in the x.x.x.100 range and go up from there so try something way under that for your static. an example would be as follows: Code:
#auto wlan0 |
Well I'm not sure what I did but it seems to be working now!
I couldn't find /etc/network/interfaces (is that a folder or a file?) but I played with some settings in Fedora's Network Settings GUI and I'm assuming that it saves the changes to a config file somewhere. I'd like to find it. I switched to a static IP and entered in the gateway and subnet mask, and I couldn't get online. When I reverted back to DCHP, it worked!? I hope I can figure out what to learn from all this. Thanks everybody for your help! |
All times are GMT -5. The time now is 08:51 PM. |