Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot get ip from dhcp with wlan0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kazzmir
n00b
n00b


Joined: 11 Jan 2004
Posts: 50

PostPosted: Sat May 31, 2008 6:54 pm    Post subject: cannot get ip from dhcp with wlan0 Reply with quote

I am trying to set up wireless on my laptop and things mostly work but when wlan0 comes online it gets a bogus ip. I have a wireless router that I can get an IP from via eth0 in the range of 192.168.1.100 to 192.168.1.104. I'm using ndiswrapper with an atheros 5007EG card.
Code:

$ sudo modprobe ndiswrapper
$ dmesg
ndiswrapper version 1.52 loaded (smp=yes, preempt=no)
ndiswrapper (link_pe_images:576): fixing KI_USER_SHARED_DATA address in the driver
ndiswrapper: driver net5211 (,07/26/2007,5.3.0.67) loaded
ACPI: PCI Interrupt 0000:14:00.0[A] -> GSI 19 (level, low) -> IRQ 19
ndiswrapper (ZwClose:2227): closing handle 0x0 not implemented
PCI: Setting latency timer of device 0000:14:00.0 to 64
ndiswrapper: using IRQ 19
wlan0: ethernet device 00:1b:9e:34:c5:ee using serialized NDIS driver: net5211, version: 0x50003, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 168C:001C.5.conf
wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
usbcore: registered new interface driver ndiswrapper
ADDRCONF(NETDEV_UP): wlan0: link is not ready
$ sudo iwconfig
wlan0     IEEE 802.11g  ESSID:off/any 
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   
          Bit Rate:54 Mb/s   
          Encryption key:B797-6950-77 [3]   Security mode:open
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
$ sudo ifconfig
wlan0     Link encap:Ethernet  HWaddr 00:1B:9E:34:C5:EE 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:19 Memory:f8200000-f8210000
$ cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
  ssid="my ssid"
  key_mgmt=NONE
  wep_key0=...key..
}
$ sudo /etc/init.d/net.wlan0 restart
$ sudo ifconfig
wlan0     Link encap:Ethernet  HWaddr 00:1B:9E:34:C5:EE 
          inet addr:169.254.107.214  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::21b:9eff:fe34:c5ee/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:3072 (3.0 Kb)
          Interrupt:19 Memory:f8200000-f8210000
$ ping www.google.com
unknown host
$ ping 192.168.1.104 # my other machine
network unreachable


So where is wlan0 getting its ip from? How can I get it a 192.168.1.x address?
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Sat May 31, 2008 7:38 pm    Post subject: Reply with quote

Let's start with the basics. What kernel version are you using? If you are using anything other than a .22 or .25 kernel, you WILL have problems with ndiswrapper. For further amplification of this, check this article, and this one as well. While the .23 kernel isn't mentioned in either of these articles, evidence suggests that they began messing with the stuff that makes ndiswrapper work as early as the .23 family.

So, try the .22 kernel first. if it works, move up to the .25 and recheck. While .25 gives much better support for ndiswrapper than the .23 and .24 families, it doesn't hold a candle to the .22 version!

Good luck.

Blessed be!
Pappy
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
kazzmir
n00b
n00b


Joined: 11 Jan 2004
Posts: 50

PostPosted: Sat May 31, 2008 7:46 pm    Post subject: Reply with quote

Code:

$ uname -a
Linux localhost 2.6.25.4 #5 SMP Fri May 30 15:47:58 EDT 2008 x86_64 AMD Turion(tm) 64 X2 Mobile Technology TL-56 AuthenticAMD GNU/Linux
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Sat May 31, 2008 8:28 pm    Post subject: Reply with quote

Ok, in that case, move to either 2.6.22.19 or 2.6.22-gentoo-r10 and retry. Both of these kernel versions are safe from the root exploit, so you're safe as far as that's concerned. Once you get the wireless working with ndiswrapper, then you can go back to the .25 kernel and try again.

Blessed be!
Pappy
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
kazzmir
n00b
n00b


Joined: 11 Jan 2004
Posts: 50

PostPosted: Sat May 31, 2008 8:51 pm    Post subject: Reply with quote

I get the same exact behavior with 2.6.22.19. I don't think its an issue with ndiswrapper not working correctly, I can do 'sudo iwlist wlan0 scanning' and get a list of ssid's available so I know the card is functional from linux. Running net.wlan0 start gives me an ip address after not having one but that ip looks bogus and I can't get seem to use the wlan0 device.
Back to top
View user's profile Send private message
kazzmir
n00b
n00b


Joined: 11 Jan 2004
Posts: 50

PostPosted: Sat May 31, 2008 9:20 pm    Post subject: Reply with quote

Ok I just discovered that my wireless card does work but my settings must be wrong. I fiddled around until I connected to some neighboors wireless router and now I have an IP that I can use to get to the internet.

On my router I have WEP enabled using 64 bits, 10 digit keys, and 4 keys listed. In wpa_supplicant.conf I have all 4 keys listed. What have I misconfigured?
Back to top
View user's profile Send private message
kazzmir
n00b
n00b


Joined: 11 Jan 2004
Posts: 50

PostPosted: Mon Jun 02, 2008 7:29 pm    Post subject: [solved] Reply with quote

Just wanted to report that I solved this issue in a round-about way. I installed the gnome NetworkManager( emerge networkmanager nm-applet ) and used that to connect to the wireless network. I have no idea how it works but it was much simpler than hacking on .conf files.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum