LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-26-2007, 09:55 AM   #1
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
Configure wireless settings on boot


Hi All,

Wireless is pretty new to me, so maybe a stupid question. I have googled and searched, but did not find a satisfying, or working answer...

I have an IBM A31 with a wireless card (PRISM2chip) as eth1 (and a disconnected lanport as eth0)

When I type in:
Code:
ifconfig eth1 down
iwconfig eth1 essid MYESSID
iwconfig eth1 key [3] s:my13chars....
ifconfig eth1 up
dhclient eth1
Then I am connected to my network and everything is working fine.
However, this must be possible to configure at boottime (and not through a script in rc.local or so)

As you might have understaood from these settings:
I am using an accesspoint with WEP Encryption on key 3, Authorization is open. (Well, mac filtered)
The card is an 801.11b card with no WPA support i guess.



I am using Kubuntu 6.10 this time....

Some background info would help alot, and an answer would be great!

Tia

Satriani

Last edited by Satriani; 01-26-2007 at 10:09 AM.
 
Old 01-27-2007, 02:54 AM   #2
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
You don't tell which distribution you are using, but with Debian and it's derivates (Ubuntu for example) you can specify wireless network settings by editing /etc/network/interfaces. This might be true on other distros also.

Just edit the file and add your wireless interface to the line "auto", for example:

auto lo eth0

The create / modify your wireless interface's entry like this:

iface eth0 inet dhcp
wireless-essid Home
wireless-mode ad-hoc

This way your interface should be activated at boot, and you can also bring it up and down with "ifup eth0" and "ifdown eth0".
 
Old 01-27-2007, 06:29 AM   #3
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Original Poster
Rep: Reputation: 30
basileus, thanks a million for your reply. This solved it!
(I did mention the distro, though, Kubuntu 6.10 )

Also, if you (or anyone) might give me a hint on my next step, it would be great:

I work at two locations, both with wireless. Is there an easy way to automatically use the correct setting for each location? (Kinda like two profiles: for each location a different profile)

Currently I have kwifimanager installed, this will probably do the trick, but you never know if anyone has better ideas to automate this?
 
Old 01-28-2007, 02:26 AM   #4
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
Ubuntu/Kubuntu 6.10 should come with a program called "network-manager". It should at least be installable via Synaptic. It's a GUI program which should handle different profiles quite nicely. I have not used it myself, but I've heard it praised a lot. Try google Linux at http://www.google.com/linux with keywords "ubuntu network-manager" if you run into trouble.

I myself use wpa_supplicant, which is a great piece of software. Actually "network-manager" uses it too, but in more user-friendly way. Plain wpa_supplicant is not too easy to configure "the Debian way", which is the way I did it. The basic configuration file is in /etc/wpa_supplicant/wpa_supplicant.conf, and you can define different profiles for different networks. It will automatically switch between these networks whenever necessary.

Quote:
ctrl_interface=/var/run/wpa_supplicant
update_config=0
network={
ssid="myssid"
id_str="home"
psk="mypsk"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
priority=100
}
network={
ssid="open"
key_mgmt=NONE
priority=99
}
network={
ssid=""
key_mgmt=NONE
priority=0
}
In addition, you need to modify the /etc/network/interfaces as shown below:

Quote:
iface ath0 inet manual
wpa-driver wext
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface home inet dhcp
The "iface home" refers to the network profile in wpa_supplicant.conf. This configuration method should also apply to Ubuntu/Kubuntu.

Last edited by basileus; 01-28-2007 at 02:29 AM.
 
  


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
configure the network speed and duplex settings tijo.thomas Linux - Networking 2 06-12-2006 04:54 AM
Configure Network settings peeters.c Mandriva 2 02-27-2005 11:00 PM
Can't configure mouse settings benk Fedora 1 08-08-2004 07:17 AM
Mandrake 10.0 Community Not Properly Setting Wireless Settings on Boot-up ajkessel Linux - Wireless Networking 0 05-14-2004 07:03 AM
Cannot configure lan / internet settings pbartels Linux - Networking 3 08-11-2003 06:02 AM

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

All times are GMT -5. The time now is 05:11 PM.

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