LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-23-2005, 12:47 PM   #1
spondootre
Member
 
Registered: Jun 2005
Distribution: Mandriva 2005 limited ed.
Posts: 39

Rep: Reputation: 15
How can i enable WPA pre-shared key, wireless?


Hi all,

I have just had some great help to get my wireless connection up and running on Mandriva via my D-Link DWL-G630 PCMCIA card. However I have got the wireless security disabled on my router and this is no good for my area as there are several wireless networks close by and I don't want any opportunist leaching.

My questions are, how can I go back to using WPA Pre-Shared Key as I have set up on my windows systems?
Also, Can anyone tell me how to connect to other networks when I roam with my laptop? The current network is setup for auto DHCP and connects automatically when I plug the card in. When I use the GUI network tool and try to connect that way to my network it doesn't which leads me to think it won't work when I roam??

Thanks for any help or suggestions you can give........


Cheers
Malc
 
Old 06-24-2005, 07:01 AM   #2
Austin_KW
LQ Newbie
 
Registered: Jun 2005
Location: Dublin
Distribution: Slackware 10-1
Posts: 9

Rep: Reputation: 0
For roaming you can use iwlist to discover the SSID of any available networks eg (my interface is ra0)

Code:
bash-3.00# iwlist ra0 scan
ra0       Scan completed :
            Cell 01 - Address: 00:30:F1:FF:6D:49
                    Mode:Managed
                    ESSID:"foundEssid"
                    Encryption key: on
                    Channel:11
                    Quality:64/100  Signal level:-195 dBm  Noise level:-256 dBm
Then you can connect to foundEssid

Code:
iwconfig ra0 channel 0 
iwconfig ra0 mode managed 
iwconfig ra0 rate auto
iwconfig ra0 essid foundEssid
You will then want to use DHCP to get an IP address on the new network
Code:
dhcpcd  -k ra0             # Kill old 
dhcpcd  -d -h $(hostname) ra0

I think WPA support depends on the hardware and driver combination. I use a native driver. My wireless card suports WPA in hardware and is configured using the private interface iwpriv.
Code:
iwpriv ra0 set AuthMode=WPAPSK
iwpriv ra0 set EncrypType=TKIP
iwpriv ra0 set WPAPSK="password"
If you are using the ndiswrapper or you hardware does not support WPA, you will need to configure the wpa_supplicant
 
Old 06-24-2005, 10:46 AM   #3
spondootre
Member
 
Registered: Jun 2005
Distribution: Mandriva 2005 limited ed.
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks for that info on roaming, i'll give it a go next time.

I am using MADWIFI drive for the card and I was given this link -

http://hostap.epitest.fi/wpa_supplicant/

i've downloaded the wpa_suppliment and have yet to make the commitment to give it a go!! It seems a bit daunting for a newb, i'll try it later and see how I get on.


Thanks for your help
Malc
 
Old 06-24-2005, 11:10 AM   #4
Austin_KW
LQ Newbie
 
Registered: Jun 2005
Location: Dublin
Distribution: Slackware 10-1
Posts: 9

Rep: Reputation: 0
If it seems a bit daunting, why not try WEP. For me it was as simple as
Code:
iwconfig ra0 enc xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx
replace ra0 with you inteface & XXs with your key

Not as good as WPA, but better than leaving you network open until you get WPA going.
 
Old 06-24-2005, 11:41 AM   #5
spondootre
Member
 
Registered: Jun 2005
Distribution: Mandriva 2005 limited ed.
Posts: 39

Original Poster
Rep: Reputation: 15
Brilliant!! That's better than nothing!! I've just done that and it works fine. Just a couple of questions :

How do I automate that process? I think I can do it through the GUI tool but what would I need to do manually? Can I add that command to a config file?

How do I turn off the encoding for when I am roaming?? is it just "iwconfig ath0 off"

Thanks
Malc
 
Old 06-24-2005, 01:12 PM   #6
Austin_KW
LQ Newbie
 
Registered: Jun 2005
Location: Dublin
Distribution: Slackware 10-1
Posts: 9

Rep: Reputation: 0
To turn encryption off
Code:
  iwconfig <interface> enc off

There is a number of ways to do config automatically on boot[list=1] Your GUI may let you define a profile that is loaded on boot.[/list=1][list=2] You may be able to put the config in rc.wireless.conf to be loaded by rc.wireless[/list=2] [list=3] As I play about with configurations,
I simply just add the commands to my rc.local
Code:
# Setup Wireless Network interface
echo "Configuring Wireless ra0"

echo "/sbin/ifconfig ra0 inet down"
/sbin/ifconfig ra0 inet down

iwconfig ra0 channel 0 
iwconfig ra0 mode managed 
iwconfig ra0 rate auto
iwconfig ra0 rts 2312
iwconfig ra0 frag 2312
iwconfig ra0 enc xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx
iwconfig ra0 essid yourESSID

if [ -r /etc/dhcpc/dhcpcd-ra0.pid ]; then
    echo "dhcpcd -k ra0"
    dhcpcd  -k ra0
    sleep 3
fi
echo "dhcpcd -d -h $(hostname) ra0"
dhcpcd  -d -h $(hostname) ra0

echo "/sbin/ifconfig ra0 inet up"
/sbin/ifconfig ra0 inet up
Having these commands in rc.local reminds me of the necessary steps to config to a new network[/list=3]
 
  


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
Failed to enable wpa in the driver vladoportos Linux - Wireless Networking 1 09-09-2006 06:10 AM
Can you change the Backspace key pre-login? craz69 Red Hat 2 08-17-2005 06:33 PM
enable shared key authentication for wlan card on freeBSD cccc *BSD 3 08-14-2005 08:25 PM
Wireless w/ WPA in 9.2 Spyder-One SUSE / openSUSE 0 01-23-2005 08:04 AM
wpa enable access point on linux saajii Linux - Wireless Networking 0 05-19-2004 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:53 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