dnsmasq does DNS, DHCP, and is generally speaking an almost complete solution for a "router" providing access to many machines in a local area network. By default, it automatically maintains a local DNS populated with the hostnames of DHCP clients.
It was first released in 2001. Twenty one years ago. It is solid, reliable, highly regarded free software.
In 2022, I don't know of any commercial "home routers" that use it. Instead, they just suck.