Discussion:
[Dnsmasq-discuss] FAQ? dhcp-script does not receive any action for Windows 10 dhcp client
Learn
2018-08-02 06:40:11 UTC
Permalink
Hi

Not very sure if this is a bug, but I saw dnsmasq.log:

Aug 2 14:13:28 dnsmasq-dhcp[5748]: 4278662147 available DHCP range:
172.24.1.10 -- 172.24.1.249
Aug 2 14:13:28 dnsmasq-dhcp[5748]: 4278662147 vendor class: MSFT 5.0
Aug 2 14:13:28 dnsmasq-dhcp[5748]: 4278662147 client provides name: xxx

But my dhcp-script file does not capture anything.
#!/bin/sh
op="${1:-op}"
mac="${2:-mac}"
ip="${3:-ip}"
hostname="${4}"
tstamp="`date '+%Y-%m-%d %H:%M:%S'`"
payload="${tstamp} ${op} ${ip} (${mac} - ${hostname})"
ddd="`date +%Y_ww%W`"
echo $payload >> /var/log/dhcp-$ddd.log
I am sure that I could capture actions from an iPhone iOS. And my Windows
10 client does lease a dhcp address.

I am using Ubuntu 18.04 on RPi3 arm64
$ dpkg -l| grep dnsmas
ii dnsmasq 2.79-1 all
Small caching DNS proxy and DHCP/TFTP server
ii dnsmasq-base 2.79-1
arm64 Small caching DNS proxy and DHCP/TFTP server
Nicolas Cavallari
2018-08-02 08:30:56 UTC
Permalink
Post by Learn
Hi
172.24.1.10 -- 172.24.1.249
Aug  2 14:13:28 dnsmasq-dhcp[5748]: 4278662147 vendor class: MSFT 5.0
Aug  2 14:13:28 dnsmasq-dhcp[5748]: 4278662147 client provides name: xxx
But my dhcp-script file does not capture anything.
#!/bin/sh
  op="${1:-op}"
  mac="${2:-mac}"
  ip="${3:-ip}"
  hostname="${4}"
  tstamp="`date '+%Y-%m-%d %H:%M:%S'`"
  payload="${tstamp} ${op} ${ip} (${mac} - ${hostname})"
  ddd="`date +%Y_ww%W`"
  echo $payload >> /var/log/dhcp-$ddd.log
I am sure that I could capture actions from an iPhone iOS. And my
Windows 10 client does lease a dhcp address.
maybe it is a DHCPINFORM ? Windows sure does funky stuff with DHCP.
Simon Kelley
2018-08-03 11:52:49 UTC
Permalink
Nicolas's suggestion is a good one. The dhcp-script gets called when the
DHCP lease database changes. If the DHCP interaction doesn't update the
database, it won't get called. A DHCPINFORM query is the most obvious
way in which that could happen.


Cheers,

Simon.
Post by Nicolas Cavallari
Post by Learn
Hi
172.24.1.10 -- 172.24.1.249
Aug  2 14:13:28 dnsmasq-dhcp[5748]: 4278662147 vendor class: MSFT 5.0
Aug  2 14:13:28 dnsmasq-dhcp[5748]: 4278662147 client provides name: xxx
But my dhcp-script file does not capture anything.
#!/bin/sh
  op="${1:-op}"
  mac="${2:-mac}"
  ip="${3:-ip}"
  hostname="${4}"
  tstamp="`date '+%Y-%m-%d %H:%M:%S'`"
  payload="${tstamp} ${op} ${ip} (${mac} - ${hostname})"
  ddd="`date +%Y_ww%W`"
  echo $payload >> /var/log/dhcp-$ddd.log
I am sure that I could capture actions from an iPhone iOS. And my
Windows 10 client does lease a dhcp address.
maybe it is a DHCPINFORM ? Windows sure does funky stuff with DHCP.
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Loading...