LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Thread Tools
Old 01-24-2007, 05:41 PM   #1
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: Slack, *BSD
Posts: 164
Blog Entries: 1
Thanked: 0
Setting up dhclient, and maybe wpa again


[Log in to get rid of this advertisement]
Im running slackware 11, with a broadcom bcm4318 airport extreme2 card, got that running no bother

Im pretty sure ive got wpa set up through editing /etc/rc.d/rc.inet1.conf, not too sure if ive got that right ,but thats not the problem at the moment.

With other distros(debian and based) up until now its been a case of cutting the firmware, bringing up the device and running dhclient. All works until dhclient, turns out that no devices are configured by default. Fair enough, I think im going to need some help setting this little file up. The man page shed a little light on this but i have no idea whats needed. Cheers for any help, much appreciated
Indiestory is offline     Reply With Quote
Old 01-24-2007, 07:14 PM   #2
comprookie2000
Senior Member
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,276
Blog Entries: 5
Thanked: 8
I would use dhcpcd
Find out the interface
ifconfig
lets say it is eth1
ifconfig eth1 up
dhcpcd eth1
ifconfig
And see if you have an eth1 interface with an IP
comprookie2000 is offline     Reply With Quote
Old 01-25-2007, 12:39 PM   #3
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: Slack, *BSD
Posts: 164
Blog Entries: 1
Thanked: 0

Original Poster
just tried it, and got nothing. Is there normally alot of output from dhcpcd? because i invoke it and it seems to hang for a couple of minutes, and then kicks me out with eth0(wireless interface) put down. Am i missing something i should have set up else where
Indiestory is offline     Reply With Quote
Old 01-25-2007, 12:55 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Lenny 2.6.28.8 SMP
Posts: 2,720
Thanked: 57
If wpa_supplicant isn't configured properly, you are simply not going to get an IP from dhclient or dhcpcd. Could you post the output from both iwconfig and ifconfig? Also, what method did you use to generate the wpa_supplicant.conf file?
Quakeboy02 is offline     Reply With Quote
Old 01-25-2007, 01:00 PM   #5
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware 12.0
Posts: 1,853
Thanked: 6
There's not usually an output from dhcpcd. If it works, it will respond pretty quickly. If it goes on for a while (default timeout for Slack is 60 seconds), it's not working.

You won't be able to get an IP address until you've successfully associated with the AP and, if it has security enabled, authenticated.

Post the output of iwconfig <interface_name> to see if you're getting that far. Try it with no security enabled to eliminate variables.

Then, run wpa_supplicant in the foreground, with debug on instead of from inet1. That way, you can see if it's working and, if not, why not.
2Gnu is offline     Reply With Quote
Old 01-25-2007, 04:13 PM   #6
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: Slack, *BSD
Posts: 164
Blog Entries: 1
Thanked: 0

Original Poster
my wpa_supplicant.conf file is the default that came with my wpa_supplicant.tgz

i whipped out my other config file because it seemed to be interfering so i reverted to a backup.

ive got the inter face set up with
Code:
iwconfig eth0 essid Jones mode managed key off
as it is that seems okay i can find my network with iwlist eth0 scan.
im running wpa with the example from the man page
Code:
wpa_supplicant -Bw -c /etc/wpa_supplicant.conf -i eth0 -d
it seems to be finding my network ( i see a received bytes from interface style message, so i think that it is) , but then it comes up with some messages about being unable to associate an AP with network. My wpa_supplicant is set up with my network and with an open one. Right now my network is completely open. Could someone maybe translate my problem for me
Indiestory is offline     Reply With Quote
Old 01-25-2007, 04:45 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Lenny 2.6.28.8 SMP
Posts: 2,720
Thanked: 57
Since you have "key off" then you don't need to run wpa_supplicant. You don't have either WEP or WPA configured on your router, right? All you should need to do is "ifconfig eth0 up" and then "dhclient eth0" to get an ip. "dhcpcd" or "dhclient" both will print our your ip as the response. They both take 10-20 seconds to work.
Quakeboy02 is offline     Reply With Quote
Old 01-25-2007, 05:46 PM   #8
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware 12.0
Posts: 1,853
Thanked: 6
Quote:
Originally Posted by Indiestory
my wpa_supplicant.conf file is the default that came with my wpa_supplicant.tgz
With no modifications? Have you entered your SSID, WPA type, etc.? If not, I wouldn't expect it to work.
Quote:
Originally Posted by Indiestory
im running wpa with the example from the man page
Code:
wpa_supplicant -Bw -c /etc/wpa_supplicant.conf -i eth0 -d
You're running it in background mode (B) but with extra verbosity (d), which isn't going to help you unless you look at the log. Try running in foreground. You're also not calling out a driver. Try Dwext or Dbcm43xx.
2Gnu is offline     Reply With Quote
Old 01-26-2007, 09:40 AM   #9
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: Slack, *BSD
Posts: 164
Blog Entries: 1
Thanked: 0

Original Poster
no ive got an open connection setting with wpa as well as secured so it should use that if theres no secure network. Its the default file ,but i have my ssid and psk set. Wpa's not set up on my router at the moment.

I wasnt running it in the back ground ,but with -d option, could someone point me at the logs. Not at home right now will try later tonight
Indiestory is offline     Reply With Quote
Old 01-26-2007, 11:40 AM   #10
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware 12.0
Posts: 1,853
Thanked: 6
Take out the -B option and run wpa_supplicant separately to see what's happening. Send the output to a file to make it easier to review or post.

First, though, back to my earlier suggestion: Let's see if you're getting to first base with the unsecured WLAN. Post the output of iwconfig for the wireless interface. If it's not associated, try manually setting the wireless parameters with iwconfig and pulling an IP address. Post any errors.

Once you confirm you have basic connectivity, then move onto WPA.
2Gnu is offline     Reply With Quote
Old 01-27-2007, 02:05 PM   #11
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: Slack, *BSD
Posts: 164
Blog Entries: 1
Thanked: 0

Original Poster
sorry wasnt running wpa in the background, the first line of the output was an error message about the broadcom driver. Im gonna try ( and keep trying) to build a newer kernel Thanks for the help
Indiestory is offline     Reply With Quote
Old 01-27-2007, 06:26 PM   #12
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware 12.0
Posts: 1,853
Thanked: 6
Why build a new kernel? Why will you not post details, answer questions or take suggestions? I can only help if you want help.

Good luck.
2Gnu is offline     Reply With Quote
Old 01-28-2007, 03:54 AM   #13
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388
Thanked: 0
Kernel rebuild will not probably help, unless your wireless card's drivers are really new. The problem is most likely in wpa_supplicant.conf - "man wpa_supplicant.conf" might help.
basileus is offline     Reply With Quote
Old 01-28-2007, 04:08 AM   #14
wildar
Member
 
Registered: Jan 2007
Distribution: Mandriva 2008, Mandrake 2005, Ubuntu 8.04.1
Posts: 239
Thanked: 0
2Gnu is right, kernel rebuild aint gonna fix it. Step 1 is to try without protection. Cause if you can't connect with it wide open then its like trying to unlock a door that is nailed shut.
wildar is offline     Reply With Quote
Old 01-28-2007, 02:45 PM   #15
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: Slack, *BSD
Posts: 164
Blog Entries: 1
Thanked: 0

Original Poster
Quote:
Originally Posted by 2Gnu
If it's not associated, try manually setting the wireless parameters with iwconfig and pulling an IP address. Post any errors.

Once you confirm you have basic connectivity, then move onto WPA.
2Gnu sorry if i seem to be ignoring your suggestions its that i have been doing these things anyway.
Can you explain about pulling an ip address not sure what you mean by that.

heres basically what im doing, i pulled out the udev rule that was associating the network cards, seemed to be throwing out errors.

Code:
iwconfig eth1 essid Jones key off
checked with iwconfig and everything seems right.

Code:
dhcpcd -d eth1
dhcpcd: MAC address =  00:14:51:85:2e:4e
sits there for a minute then throws me back to the prompt, ifconfig only comes up with lo, if i put eth1 back up, im unable to find any networks until i remove the module. That was my reasoning for a newer kernel. sorry if i dont seem to take advice, im either already doing it and posting sloppily or just not understanding
Indiestory is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up WPA-Supplicant and PEAP,MSCHAPV2 metallica1973 Linux - Wireless Networking 14 07-09-2008 06:36 PM
Prevent dhclient from setting default GW and DNS servers carlosruiz Linux - Networking 1 06-30-2006 02:05 AM
dhclient and setting up fw issues tgo Linux - Networking 0 12-28-2005 04:50 PM
Trouble setting up WPA-PSK in Ubuntu crash75uk Linux - Wireless Networking 1 04-04-2005 04:34 PM
dhclient not setting default gateway - no WAN route kadissie Linux - Networking 2 03-10-2005 05:55 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration