Possible key to solution [was: Does anyone understand NetworkManager?]



David Abrahams <dave boost-consulting com> writes:

>>> Here is the wpa_supplicant.conf that I used in the past for WPA_PSK:
>>>
>>>  ctrl_interface=/var/run/wpa_supplicant
>>>  ctrl_interface_group=0
>>>  eapol_version=1
>>>  ap_scan=2
>>>  fast_reauth=1
>>>  network={
>>>        ssid="Enteryour SSID Here"
>>>        proto=WPA
>>>        key_mgmt=WPA-PSK
>>>        pairwise=TKIP
>>>        group=TKIP
>>>        psk=enteryourkeyhere
>>>  }
>>>
>>>
>>> Then to bring up wpa do this:
>>> wpa_supplicant -d -c/path/to/wpa_supplicant.conf -ieth1 -Dwext
>>>
>>> You need to change to enter the path to wpa_supplicant.conf above and
>>> make sure that -i points to the right interface eth1 or eth0 etc...
>
> Once I realized that for DHCP to work, I needed to start
> wpa_supplicant *while* ifup was trying to do its thing, everything
> worked.  Connecting to the wireless LAN that way is essentially
> instantaneous (maybe 1-2 seconds) and reliable AFAICT.

Is it possible this is the key to what's going wrong?  If NM doesn't
do the equivalent of 

  ifup eth1

just before it starts interacting with wpa_supplicant, or if it
doesn't get its work with wpa_supplicant done before ifup times out
looking for a DHCP lease, it seems like connecting is going to fail in
my environment.

This could explain why the initial connection attempts I make after
booting (accompanied by a keychain password request) always succeed,
while later ones very often fail.

A couple of further questions:

1. Where does NM look for information about whether to connect via
   DHCP or with a static IP?  I presume it can't be
   /etc/network/interfaces, because I see lots of advice around to
   comment the interfaces managed by NM *out* of that file (although
   that doesn't seem to make any difference one way or the other for
   me).

2. Once I've stopped NM, killed nm-applet, set up
   /etc/network/interfaces, and done ifup to activate an interface,
   when I try to undo that process and restart NM, it seems as though it
   can't see any interfaces at all.  What am I doing wrong?

Thanks in advance,

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]