interface flag, lease expire
Matěj Grégr
Sat Jul 20 13:50:39 2019
Hello Roy,
1) I would like to detect if an IPv4 address is assigned via dhcpcd or
set up statically by an administrator. isc-dhclient sets dynamic flag
for an ipv4 address. e.g.
dhclient
inet 192.168.1.202/24 brd 192.168.1.255 scope global dynamic tge3
valid_lft 26574sec preferred_lft 26574sec
but it's not the case for dhcpcd
dhcpcd
inet 192.168.1.202/24 brd 192.168.1.255 scope global noprefixroute tge3
valid_lft forever preferred_lft forever
From iproute2 manpage it looks like, the dynamic flag should be probably
used for IPv6 only, so I am not sure if dhclient behavior is correct,
but it really helps to distinguish between static addresses and
addresses assigned by dhcp. Would you accept a patch to enable setting
the flag? Currently I compare the address listed in a lease file with
the address configured on the interface, but it's not so nice.
2) Is it possible to find out somewhere when a lease will expire? dhcpcd
-U doesn't list this information and I am puzzled where to find it.
Best regards,
M.
Archive administrator: postmaster@marples.name