[systemd-devel] Antw: [EXT] Re: "Correct" way to obtain DHCP lease info?
Ulrich Windl
Ulrich.Windl at rz.uni-regensburg.de
Fri Apr 23 07:27:13 UTC 2021
>>> "Bruce A. Johnson" <bjohnson at blueridgenetworks.com> schrieb am 22.04.2021
um
22:14 in Nachricht
<5aaf83b2-9857-425d-2d7f-b9660abf9209 at blueridgenetworks.com>:
> I'm still trying to get an explanation of why having a valid DHCP
> address is not in itself good enough. The only reason I've been able to
> see is that after the lease is issued, and before the time comes to
> refresh the lease, there could be a communication failure somewhere
> between the switch the DHCP client is on and the home office where the
> DHCP server is. One would assume that application failures would be a
> reasonable clue.... Regardless, it seems to me that it's not
> unreasonable for an application outside of systemd-networkd to be able
> to obtain the DHCP lease information. Am I off base here?
Hi!
I did not follow the discussion closely, but using USB tehering with my
smartphone typically results in DHCP leases of one hour.
I had made the experience that network stopped many times after about one hour
(when the DHCP lease should have been refreshed, but wasn't).
I ran "watch ip r sh" in a terminal to monitor: Once the "usb0" interface was
gone, I knew there is a problem. Restarting the tethering fixed the problem in
practically all cases.
So long story short: I think there is a valid reason to be able to debug DHCP
and fellows...
Regars,
Ulrich
>
> Bruce A. Johnson | Firmware Engineer
> Blue Ridge Networks, Inc.
> 14120 Parke Long Court Suite 103 | Chantilly, VA 20151
> Main: 1.800.722.1168 | Direct: 703-633-7332
> http://www.blueridgenetworks.com
> OpenPGP key ID: 296D1CD6F2B84CAB https://keys.openpgp.org/
>
> On 22/04/2021 12:00, Mantas Mikulėnas wrote:
>> On Thu, Apr 22, 2021 at 6:17 PM Bruce A. Johnson
>> <bjohnson at blueridgenetworks.com
>> <mailto:bjohnson at blueridgenetworks.com>> wrote:
>>
>> Silvio, thanks for the suggestion. I'm not concerned with keeping
>> the lease forever; the system actually experiences a topology
>> change as it's switched from one network to another, and I can
>> catch that from the DBus events that occur. The problem we're
>> trying to solve is to contact some address that we're sure exists
>> on the network, without knowing anything about that network. The
>> default gateway was an obvious choice, but someone wants to cover
>> the case of there being a private LAN with no gateway. The only
>> other choice I could see is the DHCP server that issues the lease.
>>
>> Hmm, don't you also have the case of there being a private LAN with no
>> gateway and no DHCP? Or possibly the case of a DHCP relay. And since
>> you don't know anything about the network, you also don't know whether
>> the address will respond to your communication attempts (other than
>> ARP) -- it might be pingable but it might be not.
>>
>> I'm curious about what brought this problem into existence in the
>> first place. Why *is* it necessary to contact a random address within
>> the network? (If it's to check that the physical interface is working,
>> then just the fact that you somehow acquired a lease would be enough. no?)
>>
>> --
>> Mantas Mikulėnas
More information about the systemd-devel
mailing list