0

In the managed file dhcpd.leases, our lifecycle management application adds a host h1.example.com { ... } entry when building a virtual-machine from the application. However, already built machines that were migrated into the application and required a lease renewal have the entry lease X.X.X.X { ... client-hostname "h2"; } (note: the lack of domain in the lease entry).

A clearer example of what I'm talking about:

host h1.example.com {
  dynamic;
  hardware ethernet 00:11:22:AA:BB:CC;
  fixed-address 192.168.1.10;
        supersede server.filename = "pxelinux.0";
        supersede server.next-server = AA:BB:CC:DD;
        supersede host-name = "h1.example.com";
}

lease 192.168.2.20 {
  starts 4 2021/01/01 00:00:00;
  ends 6 2021/04/01 00:00:00;
  cltt 4 2021/02/25 00:00:00;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 00:11:22:AA:BB:DD;
  client-hostname "h2"; 
}

For some additional information: our lifecycle management application also manages DNS. We noticed an entry for in dhcpd.lease for the host h2 had a lease entry and IP that didn't match its DNS record. The lease entry was automatically populated when the host requested a new IP. It seems no host record is created upon lease renewal and only appears when the lifecycle management app builds a new host.

What are the differences between the two entries host {...} and lease {...} in dhcpd.leases and what other functions do they affect?

deaugur
  • 3
  • 1

1 Answers1

0

From the Format section of the dhcpd.leases manual:

Lease descriptions are stored in a format that is parsed by the same recursive descent parser used to read the dhcpd.conf(5) and dhclient.conf(5) files. Lease files can contain lease declarations, and also group and subgroup declarations, host declarations and failover state declarations. Group, subgroup and host declarations are used to record objects created using the OMAPI protocol.

Presumably this lifecycle management application mentioned in the question uses the OMAPI protocol to add configuration such as these host entries?

(These kinds of entries would live in dhcpd.conf if they were part of the "static" configuration)

Håkan Lindqvist
  • 35,011
  • 5
  • 69
  • 94