RE: DHCP lease renew



-----Original Message-----
From: Thomas Haller [mailto:thaller redhat com]
Sent: Monday, December 24, 2018 11:35
To: Usyskin, Alexander <alexander usyskin intel com>; networkmanager-
list gnome org
Subject: Re: DHCP lease renew

On Mon, 2018-12-24 at 08:03 +0000, Usyskin, Alexander via networkmanager-
list wrote:
Hi

I'm trying to force DHCP lease renew for specific interface.
Basically replicate in Linux IpRenewAddress function from Win32 API.
Without NetworkManager it's fairly simple, like "dhclient -r eth4 &&
dhclient -1 eth4".
But NetworkManager manages dhclient in different way, so that lead to
an unexpected consequences.

I can't find a way to ask NetworkManager to forcefully renew the
lease. Neither through DBus API, nor from command line.
Is there any way to do such thing?
If not, how can I file an enhancement request?

Please CC me on reply, I'm not subscribed to this list.

Hi,


$ nmcli device reapply $IFNAME

(or, on D-Bus, via Device's Reapply() method).


(or, fully reactivate the profile, like)

  nmcli connection up "$PROFILE"


best,
Thomas

Tried to run reapply (via DBus call, but also tried nmcli), have 
"NetworkManager[916]: <info>  [1545650569.2423] audit: op="device-reapply" interface="eth4" ifindex=2 
pid=28554 uid=0 result="success" "
in syslog, but no DHCP activity observed on the link.

What I'm doing wrong here?

For the record it's Ubuntu 16.04 LTS with nm version 1.2.6

Thanks
--
Sasha







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