Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to get IP address via Wireless [SOLVED]
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
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Mon Jan 29, 2007 4:16 pm    Post subject: Unable to get IP address via Wireless [SOLVED] Reply with quote

Hi guys. I'm staying in a motel right now that has a wireless router and an encryption key. I'm using wireless-tools (and iwconfig). I've been able to connect to the access point - I see signal strength, the mac address of the cell, bit rate, etc. However if I do a "dhcpcd wlan0" I get timeouts. If I set /etc/conf.d/net with a static IP, I can't ping/resolve past my own interface.

I'm not too hot with wireless so all help appreciated.

Thanks...
Phil.

PS - Using ~x86 and the laptop is up to date, using ndiswrapper which looks like it's working perfectly.


Last edited by phil_r on Tue Jan 30, 2007 11:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
no_hope
Guru
Guru


Joined: 23 Jun 2003
Posts: 482

PostPosted: Mon Jan 29, 2007 4:31 pm    Post subject: Reply with quote

are you sure you are using the correct key?

did you check dmesg and /var/log/messages for errors?

you could use tcpdump or wireshark to see if your interface actually sees any packets.
Back to top
View user's profile Send private message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Mon Jan 29, 2007 4:35 pm    Post subject: Reply with quote

Yeah, I know it's the correct key... and I have no idea how to use tcpdump or wireshark.
Back to top
View user's profile Send private message
foxbat
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jul 2006
Posts: 77
Location: Washington, DC

PostPosted: Mon Jan 29, 2007 4:51 pm    Post subject: Reply with quote

are you receiving packets?

try configuring it manually:

Code:
iwconfig eth1 mode managed key XXXXXXX
iwconfig eth1 essid "MYESSID"
dhcpcd eth1


ping to test.
_________________
Gentoo 2006.1 | AMD X2
Back to top
View user's profile Send private message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Mon Jan 29, 2007 4:53 pm    Post subject: Reply with quote

I tried that - I just get dhcp: time out, wlan0 (or soemthing like that, I'm at work right now)
Back to top
View user's profile Send private message
no_hope
Guru
Guru


Joined: 23 Jun 2003
Posts: 482

PostPosted: Mon Jan 29, 2007 5:45 pm    Post subject: Reply with quote

ifconfig will tell you how many packets the interface sent and received by the kernel.

run cat /proc/net/wireless (hopefully ndiswrapper supports that, if not iwconfig should give something similar) and look at statistics for frames discarded before reaching the kernel.

Did you ever use this card with encryption before? A lot of people complain of encryption not working with ndiswrapper.
Back to top
View user's profile Send private message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Mon Jan 29, 2007 6:15 pm    Post subject: Reply with quote

No, I've never connected to an encypted WAN before. I have connected to open ones though.
The card is a ZyXel G-102 (I think) if anyone knows what kernel drivers I can use for that...

This is the card if anyone cares :lol:
http://www.compusa.com/products/product_info.asp?pfp=cat3&product_code=319673&Pn=ZyAir_G_102_Wireless_G_PC_Card
Back to top
View user's profile Send private message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Mon Jan 29, 2007 11:49 pm    Post subject: Reply with quote

Well, trying something different - emerged wpa_supplicant and madwifi. dmesg is showing that wifi0 is being created with ar5212 chipset (confirmed by lspci). I can bring wlan0 up, use:-

iwconfig wlan0 essid abvi
iwconfig wlan0 key s:7705340303

iwconfig shows all the right info. dhcpcd wlan0 still doesn't work though...

Help!!!!!!!!!
_________________
Just when you think you know the answers, I change the questions.
Back to top
View user's profile Send private message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Mon Jan 29, 2007 11:56 pm    Post subject: Reply with quote

I just tried cat /proc/net/wireless and see this...
Discarded packets = nwid 1364, crypt 0, frag 0, retry 0, misc 0

Does that mean anything?
_________________
Just when you think you know the answers, I change the questions.
Back to top
View user's profile Send private message
no_hope
Guru
Guru


Joined: 23 Jun 2003
Posts: 482

PostPosted: Tue Jan 30, 2007 5:34 am    Post subject: Reply with quote

phil_r wrote:
I just tried cat /proc/net/wireless and see this...
Discarded packets = nwid 1364, crypt 0, frag 0, retry 0, misc 0

Does that mean anything?


That means that the driver claims that it discarded 1364 packets that belonged to wireless networks to which it was not associated, 0 packets were dropped due to decryption error, 0 due to fragmentation and I am not 100% sure about the rest.

Basically, the driver sees packets, but either is able to successfully decrypt frames or doesn't see encrypted frames. If the key wasn't working correctly, it would show up here.


If you are using wpa_supplicant, I think you need to set the key through it, and not iwconfig. Try wpa_gui?

Also, to be thorough, after you load the madwifi driver check dmesg for errors.

I am pretty sure that your problems are on driver level, but if you can emerge program on the laptop, emerge tcpdump, and run tcpdump -i <interface_name> -n -s 0 -c 100 That will show first 100 packets the kernel will receive and/or try to send. While that is running, run dhcpcd and see if tcpdump will show any packets.

I once was in a hotel where I couldn't get a DHCP address from a specific AP. If several APs are available, you could try telling iwconfig to associate to a different one.
Back to top
View user's profile Send private message
Laitr Keiows
Bodhisattva
Bodhisattva


Joined: 04 Jul 2005
Posts: 891
Location: Kobe, Japan

PostPosted: Tue Jan 30, 2007 8:23 pm    Post subject: Reply with quote

Try this: dhcpcd -N -m 2000 -S -t 0 -i '' -d wlan0
Please let us know if it helps. Post output if it does not.
Back to top
View user's profile Send private message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Tue Jan 30, 2007 8:43 pm    Post subject: Reply with quote

Is that -N -m or -N -n ? Just reading the man page, doesn't show a -m option...
_________________
Just when you think you know the answers, I change the questions.
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Tue Jan 30, 2007 10:00 pm    Post subject: Reply with quote

strange madwifi-ng for me creates an ath0 device; wlan0 sounds more like an ndiswrapper device. at any rate, if the card is atheros-based, it should work with either. When i connect to my WEP-encrypted network with an atheros card (don't use WPA) I do this:

iwconfig ath0 essid 311g
iwconfig enc key=s:12345

i use 40-bit encryption just to keep out the neighbors and designate it by a 5-letter string for a key. you could also use a hex key, and additionally, you can specify 128-bit encryption with a string or hex as well; see the manpage of iwconfig for details.

In what form were you provided the key?
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Tue Jan 30, 2007 10:55 pm    Post subject: Reply with quote

Laitr Keiows wrote:
Try this: dhcpcd -N -m 2000 -S -t 0 -i '' -d wlan0
Please let us know if it helps. Post output if it does not.


-S is an invalid option, so without it...

Info, wlan0: dhcpcd 3.0.9 starting
Info, wlan0: ehternet address = 0:13:49:63:c7:c0
Info, wlan0: broadcasting for a lease
Debug, wlan0: sending DHCP_DISCOVER with xid 1120099434
Debug, wlan0: waiting on select for infinity

...and it waits, and waits, and waits...

Erik - the key was just given to me as a text string - it's the phone number for the motel.
I've removed ndiswrapper and rebooted, but it still shows as wlan0. I know what you mean, that is strange.

Phil.
_________________
Just when you think you know the answers, I change the questions.
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Tue Jan 30, 2007 11:09 pm    Post subject: Reply with quote

the way I describe is for WEP keys. there is another way for WPA-supplicant but unfortunately i think it requires more software.
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Tue Jan 30, 2007 11:24 pm    Post subject: Reply with quote

FIXED!!!

Just for the hell of it, I tried connecting without the s: and just used the key - that fixed it :-)

Excellent!!! Thanks for everyone's help.
Phil.
_________________
Just when you think you know the answers, I change the questions.
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