LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 08-22-2009, 01:38 PM   #1
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Rep: Reputation: 32
Using static IPs with wpa_supplicant


Debian doesn't seem to handle the association between wpa_supplicant.conf records, and /etc/network/interfaces. This is in wpa_supplicant.conf:
Code:
network={
        ssid="MYSSID"
	key_mgmt=WPA-PSK
        psk="stuff"
        id_str="my_static_lan"
}
This is the interfaces config it should associate with:
Code:
# id_str "my_static_lan"
iface my_static_lan inet static
	address 192.168.2.14
	netmask 255.255.255.0
	network 192.168.2.0
	broadcast 192.168.2.255
	gateway 192.168.2.1
What's happening is there are two gray circles as the wifi attempts to connect. The first one turns green, but it never completes the next step. The syslog shows that it's waiting for the (nonexistent) DHCP server to respond. If I turn on DHCP, the connection completes, but the routing is messed up (because at that point it actually tries to use the static IP from /etc/network/interfaces).

So it seems to associate eventually, but it's way too late. I need it to associate soon enough to know not to attempt DHCPDISCOVER.

Last edited by jgombos; 08-22-2009 at 01:56 PM.
 
Old 08-23-2009, 09:47 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,036

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
I don't have a wpa_supplicant.conf file but here is my interfaces file:
Code:
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
broadcast 10.0.0.255
address 10.0.0.8
netmask 255.255.255.0
gateway 10.0.0.2
wpa-passphrase MyPassPhrase
wpa-ssid MyESSID
wireless-channel 11
 
Old 08-23-2009, 10:12 AM   #3
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Original Poster
Rep: Reputation: 32
Thanks for the feedback tredegar. It's interesting that your wifi nic has eth1 as a device name; normally it would be wlan0. Anyway, your approach only works if you only connect to a single network. If you went to a cafe, you would actually have to edit your interfaces file, and then again when you return home.

WPA_supplicant enables us to have roaming profiles. I would rather switch to dynamic addressing than give up roaming profiles. The trouble is, debian is quite sloppy in how it tries to implement roaming profiles. Instead of aggregating the configuration for a particular network in one record, we have bits scattered, and the association issue hinders the config parameters from being used together.

[EDIT] I should add that I'm using NetworkManager to initiate a connection, because wpa_supplicant does not have a gnome frontend, and wpa_cli doesn't seem to work (it doesn't find the wpa_supplicant daemon). NM is supposed to use DBus to make contact with the wpa_supplicant server, and it seems to work, but I wonder if the fact than NM is initiating may be causing the botched association.

Last edited by jgombos; 08-23-2009 at 11:54 AM.
 
Old 08-23-2009, 11:54 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,036

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
It's interesting that your wifi nic has eth1 as a device name
That's just the way this laptop works (kubuntu 8.04, Intel Corporation PRO/Wireless 2200BG wireless)
Quote:
WPA_supplicant enables us to have roaming profiles...
Fortunately I don't have to do this, but I have noticed that wicd is much better than "network manager" for managing connections through a gui. Maybe try that?
 
Old 08-23-2009, 12:07 PM   #5
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by tredegar View Post
I have noticed that wicd is much better than "network manager" for managing connections through a gui. Maybe try that?
It's not available on etch, even as a backport.
 
Old 08-23-2009, 12:12 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,036

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
I threw NM out. looks like you are stuck with it (though you could try a compile from source to get wicd).

IIRC NM does not "manage" any connections listed in /etc/network/interfaces So maybe remove any references to your wireless interface in that file, and try MN again.
 
Old 08-23-2009, 01:35 PM   #7
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Original Poster
Rep: Reputation: 32
Logged a bug report:

http://bugzilla.gnome.org/show_bug.cgi?id=592810
 
  


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
DSL and static IPs Cara25 Linux - Networking 5 10-27-2007 05:19 PM
Does wpa_supplicant work with static ip. gimmee Fedora 1 12-15-2006 11:06 PM
Problem with static IPs Outerlimit Linux - Networking 2 02-15-2006 04:35 PM
Using static ips with a router jclu Linux - Hardware 2 07-31-2005 06:35 PM
ADSL - Routing Static IPs NiM Linux - Networking 1 03-06-2004 07:57 AM


All times are GMT -5. The time now is 03:23 PM.

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