Re: Dbus dhcp



On Mon, 2009-07-06 at 20:20 +0200, chris sunderhauf net wrote:
> On Mon, 2009-07-06 at 13:58 -0400, Dan Williams wrote:
> > On Fri, 2009-07-03 at 17:00 +0200, chris sunderhauf net wrote:
> > > Hello,
> > > how can I tell NetworkManager to get a new ip adress for eth0 via dhcp
> > > per dbus?
> > > You can also trigger the action I mean by left-clicking on the
> > > NetworkManager gnome panel applet and selection "auto eth0".
> > 
> > Is this for something like a captive portal that requires re-DHCP after
> > authentication, or...?
> > 
> 
> No, its because the dhcp server wasn't on yet when the computer started
> and was only turned on later via wake-on-lan. And instead of manually
> clicking on the NetworkManager applet, it would be more comfortable if
> the functionality could be triggered directly by the script doing the
> wake-on-lan.

Well, in this case the DHCP timeout would fire because NM hasn't been
able to get DHCP provided address, and it would fail the connection.
You can obviously ask NM to re-activate that connection (same thing as
clicking in the menu) but if the DHCP server isn't available when NM
tries to get an address, there's simply no way to figure out whether the
DHCP server is ever going to come back, or whether you're even connected
to an ethernet segment that has a DHCP server on it at all.

One proposed solution would be to periodically retry the connection
using a backoff algorithm for a while until we decide it did completely
fail.  Which would also fix your issue.

Dan


> Anyway, I think the specification I need is
> http://projects.gnome.org/NetworkManager/developers/spec.html and I
> guess I'm looking for the ActivateConnection method. Unfortunately, I
> never used dbus before and thus I'm not sure about the parameters the
> method expects (the descriptions don't tell me much) and whether it will
> do what I'm trying to achieve.
> 
> Christoph
> 
> 



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