I am switching from Pfsense so most likely it's a habit or something I am missing.
So in the system that I used previously I would indicate the domain in system settings and then every client joining locally could be pinged / accesseg by it's hostname. Somehow DNS resolver was aware of their names and they were automatically part of the domain. It didn't matter if those clients had static DHCP record or joining the pool of available IPs it just worked.
In OPNsense I tried to do the same. I have a couple homelab VMs and created static records for them. They are getting correct IPs assigned but their hosnames won't resolve when I try from another local PC. Looks like some services are not talking to each other at the OPNsense level.
Please let me know what am I missing here.
As I suspected, some services didn't talk. Looks like these features are not turned on by default. The solution was to go to:
Services -> UnboundDNS -> General
And trigger two check boxes:
Register DHCP Leases
Register DHCP Static Mappings