Page MenuHomeVyOS Platform

op cmd: "show dhcp server leases state" with available options does not show any result
Closed, ResolvedPublic

Description

The operational command "show dhcp server leases state" only works with active option. No output is shown with "all" option.

vyos@vyos# run sh dhcp server leases state active
IP Address    MAC address        State    Lease start          Lease expiration     Remaining    Pool    Hostname
------------  -----------------  -------  -------------------  -------------------  -----------  ------  ----------
172.19.11.10  50:0b:00:05:00:03  active   2023/04/17 10:49:38  2023/04/17 12:49:38  1:36:50      LAN     server
172.16.0.11   00:50:79:66:68:02  active   2023/04/17 11:05:45  2023/04/17 13:05:45  1:52:57      DMZ     VPCS1

vyos@vyos# run sh dhcp server leases state all
IP Address    MAC address    State    Lease start    Lease expiration    Remaining    Pool    Hostname
------------  -------------  -------  -------------  ------------------  -----------  ------  ----------

The state abandoned is present in the lease file, still the entry was not shown in the output:

vyos@vyos# run sh dhcp server leases state abandoned
IP Address    MAC address    State    Lease start    Lease expiration    Remaining    Pool    Hostname
------------  -------------  -------  -------------  ------------------  -----------  ------  ----------

dhcpd.lease file:

vyos@vyos# sudo cat  /config/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.4.3-P1

# authoring-byte-order entry is generated, DO NOT DELETE
authoring-byte-order little-endian;

lease 172.19.11.10 {
  starts 1 2023/04/17 10:49:38;
  ends 1 2023/04/17 12:49:38;
  tstp 1 2023/04/17 12:49:38;
  cltt 1 2023/04/17 10:49:38;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 50:0b:00:05:00:03;
  set shared-networkname = "LAN";
  client-hostname "server";
}
server-duid "\000\001\000\001+\317\337\312P\013\000\003\000\001";

lease 172.16.0.10 {
  starts 1 2023/04/17 11:05:41;
  ends 2 2023/04/18 11:05:41;
  cltt 1 2023/04/17 11:05:41;
  binding state abandoned;
  next binding state free;
  rewind binding state free;
  client-hostname "VPCS1";
}

even the same behavior seen for dhcpv6

Details

Version
1.4-rolling-202304130846
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

HollyGurza changed the task status from Open to In progress.Mar 21 2024, 5:41 AM
HollyGurza claimed this task.
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
dmbaturin changed Issue type from Unspecified (please specify) to Bug (incorrect behavior).