查看DHCP的服务状态怎样做
刚设起的DHCP服务器不知道怎样才能查看到DHCP的服务状态,如那一个IP已被获取,还有如果在DHCP服务器里分配的I地址池里的IP在未分配给用户的情况下,有些用户将此IP设成了静态IP使用,那样有什么办法让服务器能自动识认这些已被使的IP用而不再分配这些IP给其他用户,而不造成IP冲突!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
难道真的没有这样的命令吗?
dhcpd是会自动检测的,如果IP已经使用了的话。至少在aix上是这样的
如果是这样就好了,我发现WINDOWS的DHCP不会这样吧,所以经常会IP冲突,还有那查看状态的命令真的没吗?如SMB都有一个SMBSTATUS可以看到所有连接用户,DHCP应该也有吧
指令就不知道啦
不过lease file是肯定有已经分出去的IP
那请问这个FILE在那里,如果有这们的文件可以做成一个自己动更新的WEB页吧,到时查看不是更方便吗?
#man dhcpd
........
......
Before dhcpd grants a lease to a host, it
records the lease in this file and makes sure that the contents of the
file are flushed to disk. This ensures that even in the event of a
system crash, dhcpd will not forget about a lease that it has assigned.
On startup, after reading the dhcpd.conf file, dhcpd reads the
dhcpd.leases file to refresh its memory about what leases have been
assigned.
New leases are appended to the end of the dhcpd.leases file. In order
to prevent the file from becoming arbitrarily large, from time to time
dhcpd creates a new dhcpd.leases file from its in-core lease database.
Once this file has been written to disk, the old file is renamed
dhcpd.leases~, and the new file is renamed dhcpd.leases. If the sys-
tem crashes in the middle of this process, whichever dhcpd.leases file
remains will contain all the lease information, so there is no need for
a special crash recovery process.
.........
......
ok 文件找到了/var/lib/dhcpd 下,现在在写脚本了