Détecter une machine qui se connecte avec OpenWRT
Souvent une question, on branche une bécane sur le réseau et aimerait connaitre son IP (en DHCP)
Se connecter en root sur OpenWRT
Puis taper,
logread -f | grep dhcp
Dès qu'une machine se connecte, hop son IP s'affiche !
root@OpenWrt:~# logread -f | grep dhcp Wed Jul 23 13:33:22 2025 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 255.255.255.255 00:12:31:bc:8d:e9 Wed Jul 23 13:33:22 2025 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.241 00:12:31:bc:8d:e9 Wed Jul 23 13:33:22 2025 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.241 00:12:31:bc:8d:e9 Wed Jul 23 13:33:22 2025 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.241 00:12:31:bc:8d:e9 Wed Jul 23 13:33:22 2025 daemon.warn dnsmasq-dhcp[1]: not giving name OpenWrt.lan to the DHCP lease of 192.168.1.226 because the name exists in /tmp/hosts/dhcp.cfg01411c with address 192.168.1.1 Wed Jul 23 13:33:22 2025 daemon.warn dnsmasq-dhcp[1]: not giving name OpenWrt to the DHCP lease of 192.168.1.226 because the name exists in /tmp/hosts/dhcp.cfg01411c with address 192.168.1.1 W