LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 05-17-2007, 03:02 PM   #1
woodpecka_04
Member
 
Registered: May 2007
Distribution: Fedora Core 6
Posts: 47

Rep: Reputation: 15
Problem with wpa_supplicant?


Hey,

I am trying to connect to a wireless router which uses WPA-PSK encryption. I have ran the following command:

./wpa_supplicant -d -c/etc/wpa_supplicant/wpa_supplicant.conf -ieth1 -Dwext

and the final output of it is:
CTRL-EVENT-CONNECTED - Connection to 00:0f:b5:54:19:20 completed (auth)
EAPOL: External notification - portValid=1
EAPOL: External notification - EAP success=1
EAPOL: SUPP_PAE entering state AUTHENTICATING
EAPOL: SUPP_BE entering state SUCCESS
EAP: EAP entering state DISABLED
EAPOL: SUPP_PAE entering state AUTHENTICATED
EAPOL: SUPP_BE entering state IDLE
EAPOL: startWhen --> 0

I thought it would have stopped at the first line. However it gets to that bottom line and just seems to freeze. Thats why I can't tell if I have things working correctly. When I terminate the command and turn the eth1 interface on (./ifup eth1), only a few websites seem to work. I don't know if this is a problem with Firefox or my wpa_supplicant

Here is my wpa_supplicant.conf file:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

network={
ssid="woody"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk=mypassword
}

Could someone help me clarify if this is correct and what I might need to change?
Thanks very much
 
Old 05-17-2007, 04:02 PM   #2
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
Since you're not using the -B option, which will force the process into background, and since you have no errors, it's probably working.

In a new terminal, pull an IP address and you should be off to the races. You don't mention a distro, so pump, dhclient eth1 or dhcpcd eth1 are possible commands.
 
Old 05-17-2007, 05:17 PM   #3
woodpecka_04
Member
 
Registered: May 2007
Distribution: Fedora Core 6
Posts: 47

Original Poster
Rep: Reputation: 15
Yeah I have tried the -B option and all seems to be fine.

Im using FC6 so it will be dhclient eth1 I think. Can I just ask what this does or what output I am meant to get?

Also what do you mean by "pull an IP address" I have the IP address of my router if thats what you mean, but I dont know what I am meant to be doing with it?

Cheers for getting back to me
 
Old 05-17-2007, 06:48 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
On FC6, and if using KDE, installing knetworkmanager is a big help. If you use GNOME, installing the NetworkManager package will, I believe, automatically install the GNOME network applet.

With either of the applets, all your available access points will be shown and you can connect to then by just clicking on the AP's line in the pop-up display.

You still need wpa_supplicant or ksupplicant running, but the passwords, etc, will be sent to the supplicant as needed and stored in one of your "wallets."

It's much easier than fooling around with ifup, ifconfig etc.
 
Old 05-18-2007, 12:11 AM   #5
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
By pull an IP, I mean obtain an IP address from a DHCP server - in this case, your router.

For Fedora, dhclient eth1 should do it.

You can enter all of your parameters into a script in /etc/network-scripts/ifcfg-eth1 so that this entire process will be automated.
 
Old 05-18-2007, 03:40 AM   #6
woodpecka_04
Member
 
Registered: May 2007
Distribution: Fedora Core 6
Posts: 47

Original Poster
Rep: Reputation: 15
Hey, how do you turn WPA off, I want to go back to WEP!?

I don't know if my ifcfg-eth1 script is right for the WPA, as it reads:

TYPE=Wireless
DEVICE=eth1
HWADDR=00:14:a5:b8:ee:1d
BOOTPROTO=dhcp
DOMAIN=
ONBOOT=yes
ONHOTPLUG=yes
USERCTL=yes
IPV6INIT=no
PEERDNS=no
ESSID=woody
KEY=myoldWEPkey
CHANNEL=11
MODE=Managed
RATE=Auto
NETMASK=
DHCP_HOSTNAME=
IPADDR=

I have since changed my router back to WEP in order to try and send this message lol

NetworkManager wasn't much help, it found the network but just would not connect, even when I put in the correct password. Maybe it is because of the script above?

EDIT: Okay, this is turning into a nightmare. My WEP connection connects at boot and then some websites work. However, the majority of search results from Google dont work it just says server not found. Also yum will not work as it says there is no connection?

I am so confused, why can't wireless in linux be simple...

Last edited by woodpecka_04; 05-18-2007 at 03:57 AM.
 
Old 05-18-2007, 09:31 AM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
If you have NetworkManager running, enter "nm-tool" in a terminal window and review the IP settings. From you description it sounds like your DNS setting is not correct.

If you know the actual (numeric) IP address of the site(s) you can't reach, you can verify that the problem is with the DNS by using the numeric address in place of the symbolic address. If that works, your DNS lookup is not being set correctly. (Note: If you're going through your own router to the internet, the router will typically set the DNS to 192.168.1.1 or 192.168.2.1, and then use the DNS values you set when you configured the router to resolve DNS requests. If that's your configuration, verify that the DNS settings in your router are correct.)

If my supposition is correct, and if you know what your AP should be using, you can start system-config-network and edit your settings for eth1 to include specific DNS settings. In general, though, this should not be necessary unless you've chosen not to check the "Automatically get DNS settings from provider" box.

<edit>
To answer your last question, "Why can't wireless setup be simple on Linux," on Fedora it is, in fact, quite simple -- if you use the correct tools. The problem is that there are many different networking tools available, and many "old Linux hands" are very familiar with the "nuts and bolts" tools which let you "tweak" anything you want to "tweak," but not so familiar with the newer tools which package most of the details. So they tend to give you "nuts and bolts" advice, rather than simple "how-to" advice. This is great if you really want to understand the details of networking, packets, etc., etc. but its generally much more than most casual "users" want to know.

That's why I pointed you to the GUI applets which hide most of the details from you.

For example, I recently took my laptop to my local library where several wireless access points are available. Turned on the power, right clicked on my KNetworkManager applet, highlighted one of the access points in the list, and pressed "Enter" to connect. I was connected to the (open) access point a few seconds later.

Later that day, I was over at the home of one of my sons ("baby sitting" for a grandson) with the same laptop. Turned it on, selected his home access point (WPA2-PSK protected), pressed enter, and typed his passphrase into the pop-up box, and, again, was connected in a few seconds. (Actually, it was even easier than that because I'd stored his passphrase in my wallet the first time I accessed his network when I configured it for him several months ago, so all I needed t do was enter the password to open my wallet. What I described is what the first access was like.)

The only "setup" I needed to do was an initial run of system-config-network to create the eth1 configuration file and get the wireless adapter recognized by the system. (That's another story, but you're past that point since your adapter is already running OK.)

So, bottom line, as with much of Linux you're "free" to make it as hard or simple as you want it to be. The only problem is finding which of the available "solutions" fits your level of interest, knowledge, and skill. And, of course, if you're not satisfied with any available "solution," you can create your own "solution" and throw it into the pot for other people to use if they so wish.

Finding available "solutions" can be a problem, although tools like yumex or smart will let you search the Fedora repositories for candidate solutions.

And asking questions here can get you suggestions. Or steer you into deep water. Or both.
</edit>

Last edited by PTrenholme; 05-18-2007 at 10:20 AM.
 
Old 05-19-2007, 05:34 AM   #8
woodpecka_04
Member
 
Registered: May 2007
Distribution: Fedora Core 6
Posts: 47

Original Poster
Rep: Reputation: 15
Talking Incredible but true!

Amazingly IT WORKS!!!!

The DNS settings were correct all it was was that in system-config-network the box that you talked about "Automatically get DNS settings from provider" wasn't checked!!! Arghghgh I can't believe I struggled all that time and it was down to that one little box.

As far as I can tell all of the websites work and Yum seems fine. I've gone back to using NetworkManager as it seems to makes things easier. Although I do like doing things by command line for some reason. I would quite like to try Gentoo or Slack later in life -- I don't think i'm quite ready yet lol.

Thanks very much for everyones help throughout this thread, you've been brilliant.

Cheers

EDIT: One last question...
Currently eth1 is set to come on on boot, which is fair enough but because it requires the network password I always receive the dreaded "Determining IP information for eth1...FAILED" which I don't like. Is there any way to set it to work on boot so I don't get this message e.g. saving the password in some way?

Last edited by woodpecka_04; 05-19-2007 at 05:43 AM.
 
Old 05-19-2007, 09:33 AM   #9
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Well, if you want to use the command line stuff, you could, theoretically, put the password into the wpa_supplicant configuration file. But I've never got that to work without a struggle since the Fedora /etc/rc.d/rc5.d/ symlinks to the /etc/init.d files start the network before wpa_supplicant and, of course, you can't connect to your AP without some supplicant running. (And most kernel updates "fix" any changes you've made to the boot ordering, so you have to remember to do it all over again after any kernel update.)

Since I don't care to do it all "by hand," I just set eth1 to not start on boot, and let knetworkmanager start eth1 after the boot finishes and my user session is started. Because I'm slightly paranoid, my "wallet" is password protected, so I always get a pop-up after a boot into which I have to put my "wallet" password before the connection is made. (Unless my AP is out of range. In that case, I just get connected to the closest "open" access point. In fact, sometimes my router (acquired for $10 in a CompUSA promotion) fails to connect, and I get connected to a neighbor who runs an open cable modem network.)

Oh, I also run ifplugd so the boot doesn't "barf" when eth0 fails because the ethernet cable to my laptop is not connected.
 
  


Reply



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
wpa_supplicant Disconnect Problem roddefig Linux - Software 2 09-27-2010 08:37 AM
wpa_supplicant problem jimerickso *BSD 0 04-24-2007 07:31 PM
A problem with networkmanager and wpa_supplicant flamy Linux - Networking 1 04-13-2007 09:13 AM
Authentication Problem with WPA_Supplicant pafrica Linux - Wireless Networking 4 01-16-2007 10:18 AM
wpa_supplicant problem arunsri Linux - Wireless Networking 2 03-15-2005 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 01:33 AM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Open Source Consulting | Domain Registration