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



On 9/1/06, David Abrahams <dave boost-consulting com> wrote:
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.

I don't think so and the debug you posted doesn't indicate this, if
you look at src/nm-device-802-11-wireless.c
http://cvs.gnome.org/viewcvs/NetworkManager/src/nm-device-802-11-wireless.c?rev=1.60.2.17&view=markup

You will see that it brings up wpa_supplicant and then waits for a
successful association message before working to get an ip address.

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).

I /think/ it just brings up dhclient to obtain the information from
the DHCP server and at this time it does not support static addressing
on Ubuntu at all and with other distros just pulls the static info
from the distro's ip management system.


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?

This is because the Ubuntu Maintainer modified NetworkManager so it
would not manage ANY interfaces that has any configuration beyond dhcp
in /etc/network/interfaces.

Now saying all that I have seen a number of reports of strange issues
like what you are reporting and most of the people seem to be using
Ubuntu or Debian.   I run Ubuntu but I build NetworkManager myself
with only the patchs I need or want.

So I grabbed the Ubuntu packages and tried it out and it seemed to
work great for me but I did notice something odd when I went to place
my dispatcher scripts and that is that the Ubuntu and Debian packages
both have a Dispatcher script to run ifup and ifdown.

I am not sure why this is needed but I will dig around through the
changelogs sometime soon and see why.  I think the Ubuntu Maintainer
subscribes to this list so maybe he can help there.  It is obviously
there for a reason but none of my laptops (One uses an IPW2200 and the
other uses a Atheros card) need that script to function.

So can you please test something, please move that script and reboot
your laptop and see if the problem goes away?
sudo mv /usr/share/NetworkManager/dispatcher.d/01ifupdown /your/home/

Replace /your/home/ with the path to your home directory.

Since you describe a problem with the interface obtaining an IP
address I wonder if that script is either there to solve a problem or
might be causing an issue.



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