TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.82k stars 397 forks source link

[Feature request] DHCP server for each network interface #916

Closed admlko closed 1 month ago

admlko commented 1 month ago

Hi,

I have just migrated from Pi-hole to this software, very impressed so far! The only thing which is clearly lacking is documentation.

Anyway, I have now integrated my existing DHCP running on router to this software via REST API, so every time DHCP server lease is accepted and released by the client, DNS record gets created/updated or removed.

But this software has also DHCP server with quite nice selection of options. What is keeping me from migrating DHCP from my router to this softrware is the ability to add multiple DHCP instances and bound them to dedicated interfaces.

In short, I'm runnig this software in a container and I'd like to add multiple network adapters (macvlan) to the container and bound a dedicated DHCP server for each network interfaces.

I found this issue: https://github.com/TechnitiumSoftware/DnsServer/issues/474 but it is not the same issue which I have.

What do you think?

ShreyasZare commented 1 month ago

Thanks for the post and compliments. For running DHCP server, you need to have direct access to the network adapter. So, the container must run in host mode.

For using it on multiple interfaces, you just need to have a static IP address for those interfaces and then create DHCP scopes for each interface with the IP range that the interface is connected to. The DHCP server will automatically map the scope to the network interface based on it's static IP address.

There is no additional config needed to make it work. Let me know if you have any issues with the config.

admlko commented 1 month ago

Ah, I didn't get that it works that easily. Thanks for the help, I'll try it out when I have time.

Thanks for all your work, please work on the documentation, that would increase the userbase by a lot :)

ShreyasZare commented 1 month ago

Thanks for all your work, please work on the documentation, what would increase the userbase by a lot :)

You're welcome. There is quite limited time available which goes into development which is why documentation is an issue.