我目前在Ubuntu 8.04上运行ISC-DHCP服务器v3.我想要做的是登录谁有什么IP地址.
DHCPDISCOVER from d0:50:56:ac:74:71 via eth0 DHCPOFFER on 208.x.x.75 to d0:50:56:ac:74:71 via eth0 DHCPREQUEST for 208.x.x.75 (172.18.1.2) from d0:50:56:ac:74:71 via eth0 DHCPACK on 208.x.x.75 to d0:50:56:ac:74:71 via eth0
我想谈谈我看到这个或类似的东西:
DHCPDISCOVER from d0:50:56:ac:74:71 via eth0 DHCPOFFER on 208.x.x.75 to d0:50:56:ac:74:71 via eth0 DHCPREQUEST for 208.x.x.75 (172.18.1.2) from d0:50:56:ac:74:71 via eth0 DHCPACK on 208.x.x.75 to d0:50:56:ac:74:71 (TestPC001) via eth0
出于历史目的,我需要记录获得IP地址的主机(日志文件有时间戳,但我为此帖删除了它们).
在我的dhcpd.conf文件中,我有以下主机声明:
host TestPC001 { hardware ethernet d0:50:56:ac:74:71; fixed-address 208.x.x.75; }
如果有人知道如何使用DHCP3做这件事会很棒,我愿意接受有关第三方应用程序的建议.有一点需要注意,dhcpd.conf文件是使用执行RADIUS的第三方应用程序动态生成的,因此主机声明可以并且将会更改,因此如果网络上有人出现问题,我不能简单地查看该文件得到他们的名字.
我已经弄清楚了.
原文链接:https://www.f2er.com/ubuntu/348252.htmlif known { log (info,concat ("HOSTNAME: ",host-decl-name," on ",binary-to-ascii (10,8,".",leased-address)," at ",binary-to-ascii (16,":",substring (hardware,1,6)))); }
会导致(我删除了时间戳的整洁):
HOSTNAME: TestPC001 on 208.x.x.75 at d0:50:56:ac:74:71 DHCPDISCOVER from d0:50:56:ac:74:71 via eth0 DHCPOFFER on 208.x.x.75 to d0:50:56:ac:74:71 via eth0 DHCPREQUEST for 208.x.x.75 (172.18.1.2) from d0:50:56:ac:74:71 via eth0 DHCPACK on 208.x.x.75 to d0:50:56:ac:74:71 via eth0