LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 12-20-2004, 03:35 PM   #1
danjmw
LQ Newbie
 
Registered: Dec 2004
Posts: 3

Rep: Reputation: 0
ifconfig vs iwconfig


I'm looking to develope a script that will allow me to switch the configurations on my wireless card between wireless networks, namely home and work. The trouble is configuration changes made in ifconfig of the interface, eth1, do not seem to respect the configurations made in the iwconfig file of the same interface. I cannot completely configure the wireless card in ifconfig as there's no field for the encryption key and changes made to the iwconfig only seems to confuse the system, FC 3.

what is the relationship between ifconfig and iwconfig and how could I get the system to get the configuration information solely from iwconfig?
 
Old 12-20-2004, 03:49 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

iwconfig only deals with the wireless elements of a wireless card: the ESSID, WEP keys, etc. All the normal attributes of the network card (IP address, subnet mask etc) are assigned through ifconfig. The two utilities don't overlap, and both are required to use the card (unless you're using dhclient, in which case you won't have to use ifconfig directly).

Dave
 
Old 12-20-2004, 03:59 PM   #3
danjmw
LQ Newbie
 
Registered: Dec 2004
Posts: 3

Original Poster
Rep: Reputation: 0
[thanks for the quick reply; I have a follow question]

my bad. its actually ifcfg-eth1, not ifconfig, that's giving me the trouble. ifcfg-eth1 has a limited number of fields to configure in reguards to wireless (no encryption key field). I want to set the configuations through iwconfig but settings in the ifcfg-eth1 file seem to confuse things. if I clear all configurations regarding wireless (ex: SSID) will that allow the configurations in iwconfig to set the wireless card?
 
Old 12-20-2004, 04:41 PM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi again.

According to this page (it claims to be the manual for ifcfg):
http://server1.belchfire.net/protect...n/man5/ifcfg.5
there is a field for encryption keys.

The last program to run will take priority, so if you run iwconfig after running ifcfg (with no wireless options set or otherwise), then iwconfig should work fine. The only problem I can see (and I can't check this as my laptop's not here), is that you might not be able to change things like ESSID or encryption keys on an active card. If ifcfg activates the card and then you run iwconfig, you might run into problems. As I said, though I don't know.

You could avoid all this by just using ifconfig (or dhclient) and iwconfig directly in your script.

Dave
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ifconfig and iwconfig does not display wifi info powah Linux - Wireless Networking 3 08-21-2005 07:16 PM
ifconfig & iwconfig do not work Koneko Linux - Newbie 3 08-06-2005 10:04 PM
can't use iwconfig, iwlist, ifconfig as user marlor Slackware 6 10-18-2004 04:27 PM
Need exampel for frontend(gui) shell command (like iwconfig or ifconfig etc) Esid Programming 2 08-19-2004 07:24 PM
iwconfig and ifconfig not working t3kops Fedora 1 07-17-2004 01:35 PM


All times are GMT -5. The time now is 12:24 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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration