当我们成功运行dhcpd服务后,就可以分配ip地址给客户端,这些租用信息都可以通过查看租约文件/var/lib/dhcpd/dhcpd.leases来查看每个ip地址的租约记录。

lease ip-address {statements}

  Linux学习笔记总结(九十六)_linux                                          

每个租约声明都包含已租给客户端的单个ip地址。大括号内的语句定义了租约的期限及租约分配对象。

starts date;租约的开始时间

ends date;租约的结束时间

tstp date;

The tstp  statement is present if the failover protocol is being used, and indicates what time  the peer has been told the lease expires.

tsfp date;

The tsfp statement  is  also  present  if  the  failover  protocol  is  being  used, and indicates the lease expiry time that the peer has  acknowledged.

atsfp date;

The atsfp statement is the actual time sent from the failover partner.

cltt date;

The  cltt statement is the client's last transaction time.

hardware hardware-type mac-address;使用ip的客户端网络接口的mac地址

uid client-identifier;记录用于获取租约的客户端标识符。

client-hostname hostname;客户端发送其主机名。

binding state state;声明租约的绑定状态,可能为活动(active)、可用(free)、放弃(abandoned)。

next binding state state;当前状态到期时租约将移动到的状态。当前状态过期的时间在ends语句中指定。

rewind binding state state

This statement is part of an optimization for use with  failover.   This  helps  a  server  rewind a lease to the state most recently transmitted to its peer.

option agent.circuit-id string; 记录中继代理发送的circuit ID

option age.remote-id string; 记录中继代理发送的remote ID

These statements are used to record the circuit ID and remote ID options sent by the relay  agent, if the relay agent uses the relay agent information  option.    This  allows  these    options  to  be  used  consistently  in  conditional  evaluations  even when the client is       contacting the server directly rather than through its relay agent.

The vendor-class-identifier variable

The server retains the client-supplied Vendor Class Identifier  option  for  informational   purposes, and to render them in DHCPLEASEQUERY responses.

bootp;

reserved

If present, they indicate that the BOOTP and RESERVED failover flags (respectively) should   be set.  BOOTP and RESERVED dynamic leases are treated  differently  than  normal  dynamic  leases, as they may only be used by the client to which they are currently allocated.