2

I'm running 2 boxes with isc-dhcp-server 4.2.4-7ubuntu12.8, and when one of them hands out a lease, it looks like this:

lease 192.168.56.228 {
  starts 3 2017/03/29 02:17:31;
  ends 4 2018/03/29 02:17:31;
  tstp 4 2018/09/27 14:17:31;
  tsfp 4 2018/09/27 14:17:31;
  atsfp 4 2018/09/27 14:17:31;
  cltt 3 2017/03/29 02:17:31;
  binding state active;
  next binding state expired;
  hardware ethernet 08:00:27:84:32:e3;
  client-hostname "craig-ubuntu1604";
}

The peer's copy of the lease, though, doesn't have the 'client-hostname' line. Should it? If so, how can I configure things to get them to share this? Alternately, what am I doing wrong?

user7916
  • 125
  • 7

1 Answers1

0

After looking at the isc-dhcp-server code, it looks like the hostname in the lease gets set in the line:

memcpy (lt -> client_hostname, d1.data, d1.len); 

In dhcp.c's ack_lease function. And while both DHCP servers will likely OFFER leases, the client will REQUEST a lease from only one of them, and the ACK only comes from the server from which the client requests the lease. So this is expected behavior. Someone in ISC's IRC channel suggested it is because the peer doesn't need to care about the hostname.

user7916
  • 125
  • 7