I did buy new pizero, configured it and connect to my VLAN.
I am not able to ping it using its name. e.g. ping pizero7 But I can see it in DHCPv4 -> leases list and can ping its IP. I am also able to ping another devices in that VLAN using their names, e.g. ping pizero3.
I did switch off pizero3 and pizero7 for while so lease will expire. Then I did switch them on. I can ping pizero3 using its name but not pizero7. Only difference between those two devices is that pizero3 is connected to network for long time and pizero7 is new and this is first time it is connected to network.
On my linux laptop I am checking nslookup pizero3 and getting correct answert from OP. Checking pizero7 with nslookup I am getting NXDOMAIN
NOTE:
I am also running dnscrypt on OP and I did configured unbound to forward DNS query to dnscrypt.
see my comment https://forum.opnsense.org/index.php?topic=10670.msg118634#msg118634 (https://forum.opnsense.org/index.php?topic=10670.msg118634#msg118634)
Thanks for any help and tip ...
Is it pi zero wifi? Which wifi AP do you use? Or do you use usb-RJ45 adapters?
yes, it is pizero with wifi and I am using ubiquiti AP-AC-LR.
but as I did write, I can ping IP and I did test connetion for both pizeros and looks OK
ok, I did try usb ethernet adapter to connect pizero to network, problem remain ...
so I think it is not problem of wifi AP
I think it is a bug.
After new device is connected to network, it is geting IP and I can see it in DHCPv4 leases list.
But file /var/unbound/dhcpleases.conf is not updated and that new device is not in it.
edit:
I did change existing and working device to static IP. Dhcp service was restarted and I did reconnect device.
I can see it in /var/unbound/host_entries.conf but file /var/unbound/dhcpleases.conf is again not updated
@janci
is "DHCP Registration" checkbox enabled in Unbound?
is unbound_dhcpd.py process running?
QuoteI can see it in /var/unbound/host_entries.conf but file /var/unbound/dhcpleases.conf is again not updated
static dhcp entries goes to host_entries.conf. dynamic - to dhcpleases.conf
yes, both checkboxes "Register DHCP leases" and "Register DHCP static mappings" are checked.
I did run this:
sudo ps -aux|grep unbound
and output is
/usr/local/sbin/unbound -c /var/unbound/unbound.conf
so unbound_dhcpd.py is not running
I am trying to findout the reason why it is crash to start but dont know which log file to check
Quotesudo ps -aux|grep unbound
sudo ps -auxww | grep _dhcpd.py
or just System: Diagnostics: Activity
if it's not there, can try to restart unbound
it is definitly not running
I did restart unbound, but not help.
While restarting I did see (run quickly ps ...) that it was starting ...
any error if you run
/usr/local/opnsense/scripts/dns/unbound_dhcpd.py --domain localdomain
in shell?
Can we get some sort of version number for baselining please...
#1
starting unbound_dhcpd.py from console as standart user failed with message "Unable to create the pidfile."
starting unbound_dhcpd.py from console as root (using sudo) started ok, and resolving is working ok too.
#2 OPNsense 21.7.3_1-amd64
and just check for updates and it is up to date
sorry, did not fully understand. when you start the unbound_dhcpd.py manually, client names are resolved and dynamic client records appear in dhcpleases.conf ?
I am ssh to router as standart user (not root).
so, when I did run unbound_dhcpd.py it said "Unable to create the pidfile."
BUT
if I did run sudo unbound_dhcpd.py then it is ok
yes, I understood this part) but do the required entries appear in unbound after that?
yes, /var/unbound/dhcpleases.conf is updated after new device apears
got it, thanks. so the problem is dhcpd watcher is not kept working after unbound start?
will try to reproduce
I did update my router to OPNsense 21.7.5-amd64 today.
BUT /usr/local/opnsense/scripts/dns/unbound_dhcpd.py did not start so I did start it manualy.
do you have some news / progress on this? should I write a bug ?
thanks
hi
did "daemonize unbound dhcpd watcher" string appeared in unbound log? (is it started and crashed or didnt start at all)
sorry, Meanwhile I did update to 21.7.7-amd64 and unbound_dhcpd.py did not start.
which log file should I look at?
it is bit conusing for me, I am not able to find correct log file in web gui.
and on console I am not sure too.
edit:
1) I did got to Services -> Unbound DNS -> Log file
2) search for "watcher"
3) I can see that "daemonize unbound dhcpd watcher" string did appear in log cca at time when I was updating.
4) but I did remember that I did log into router over ssh and check if it is running and wasn't
just updating
I did update to 22.1. and problem remain, so if I change configuration of unbound it will restart but watcher is not running so I have to start it manually.