[Dnsmasq-discuss] client name via DHCP

Helmut Hullen Hullen at t-online.de
Fri Feb 11 11:59:00 GMT 2011


Hallo, Simon,

Du meintest am 11.02.11:

>>>>>>>> when I use the ISC DHCP, then I can see the name of the
>>>>>>>> Windows client in "/var/state/dhcp/dhcp.leases".
>>>>>>>>
>>>>>>>> With dnsmasq as DNS and DHCP server I haven't found this
>>>>>>>> feature - is it somewhere hidden?

> This is probably the simplest script:

> #!/bin/sh

> if [ ! x$DNSMASQ_SUPPLIED_HOSTNAME = x ]; then
>      echo $2 is $DNSMASQ_SUPPLIED_HOSTNAME >>/var/log/dnsmasq_aliases
> fi



> Put that in a file somewhere and make sure it's executable

> chmod a+x path/to/script

> then add

> dhcp-script=/path/to/script

> to /etc/dnsmasq.conf

> restart dnsmasq and you should have a file at
> /var/log/dnsmasq_aliases full of lines like

> 11:22:33:44:55:66 is KB-PC

> which will be added to as new hosts appear.

Works as desired - fine!
Thank you!

Viele Gruesse!
Helmut



More information about the Dnsmasq-discuss mailing list