Either dhcp-script isn't doing what it is expected, or I'd like it to do more.

I am netbooting raspberry pi.  so some dhcp client in the pi firmware
get's an IP and netboot params, then tftp client gets files.

the dhcp traffic happens and is shown in the logs, but not dhcp-script:

sudo journalctl --follow -u dnsmasq.service
Feb 25 16:49:44 base dnsmasq-dhcp[47924]: DHCPDISCOVER(eth-local)
b8:27:eb:2f:5d:08
Feb 25 16:49:44 base dnsmasq-dhcp[47924]: DHCPOFFER(eth-local)
10.21.0.102 b8:27:eb:2f:5d:08
Feb 25 16:49:50 base dnsmasq-tftp[47924]: file /srv/tftp/bootsig.bin
not found for 10.21.0.102
Feb 25 16:49:50 base dnsmasq-tftp[47924]: sent /srv/tftp/bootcode.bin
to 10.21.0.102
Feb 25 16:49:50 base dnsmasq-dhcp[47924]: DHCPDISCOVER(eth-local)
b8:27:eb:2f:5d:08
Feb 25 16:49:50 base dnsmasq-dhcp[47924]: DHCPOFFER(eth-local)
10.21.0.102 b8:27:eb:2f:5d:08
Feb 25 16:49:50 base dnsmasq-tftp[47924]: error 0 Early terminate
received from 10.21.0.102
Feb 25 16:49:50 base dnsmasq-tftp[47924]: failed sending
/srv/tftp/042f5d08/start.elf to 10.21.0.102
Feb 25 16:49:50 base dnsmasq-tftp[47924]: file
/srv/tftp/042f5d08/autoboot.txt not found for 10.21.0.102
Feb 25 16:49:50 base dnsmasq-tftp[47924]: error 0 Early terminate
received from 10.21.0.102
Feb 25 16:49:50 base dnsmasq-tftp[47924]: failed sending
/srv/tftp/042f5d08/start.elf to 10.21.0.102
Feb 25 16:49:50 base dnsmasq-tftp[47924]: sent
/srv/tftp/042f5d08/config.txt to 10.21.0.102

log from
https://github.com/CarlFK/pici/blob/main/ansible/roles/site/files/pib/pistat/scripts/send_stat.py#L83

Namespace(action='tftp', mac='52476', ip='10.21.0.102',
hostname='/srv/tftp/bootcode.bin') dsh='(none)'
Namespace(action='tftp', mac='2545', ip='10.21.0.102',
hostname='/srv/tftp/042f5d08/config.txt') dsh='(none)'
Namespace(action='tftp', mac='2979264', ip='10.21.0.102',
hostname='/srv/tftp/042f5d08/start.elf') dsh='(none)'

I suspect the problem is with the client not DHCPREQUEST and so the
server doesn't ACK and thus I guess an IP hasn't actually be
allocated, thus no "add" event has happened which calls the script.
if this is the case, can we add an "offer" action?

--
Carl K

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to