Dora: A open-source Rust DHCP Server
github.com
github.com
Switched to another DHCP server and the storms went away, but I am not entirely happy with it because of the way it handles leases, it doesn't guarantee that each MAC keeps the same IP over time.
Now, I'm always on the lookout for a good DHCP server... tried another one that was golang, but it wasn't working on my network for some weird spec reason, I didn't have time to debug it and the authors didn't seem that interested in helping out.
If you want to go down the rabbit hole with us of looking at using Dora and giving us feedback I'd be glad to chat further cdarby[at]bluecatnetworks[dot]com
I'm not surprised you had issues with dnsmasq - I wouldn't use it for anything other than a run of the mill /24 (or maybe a few of them on VLANs). Don't get me wrong - it's perfect for what it was originally intended for and I use it in at least half a dozen places. Just not for an application and network like yours.
[0] - https://www.isc.org/kea/
Now that I've studied the source code of dnsmasq a bit more because of the issues we had, I have to agree with you. We had run it with about 3k blades and it was fine. It was fine at about 9k blades too... but once we hit around 10k, it just fell over.
The frustrating part was that it just didn't log what was up. We used netdata and discovered the UDP queues were filling up. Tried mucking with tuning the sysctls and that didn't work either.
Switched midstream to Kea, which was a giant pain because we had a hard time dealing with duplicate IP addresses (imagine rebooting 10k+ PXE booted blades during a UDP storm).
Your comment about the logging is spot on as well. I think dnsmasq and I think "small flash device where the logs will never get stored anywhere and no one can or will view them anyway". As you can probably tell I've had issues getting meaningful logging and debug out of dnsmasq as well...
I don't envy your situation in the slightest!
Note to mods - I'm not complaining about downvotes. I'm using the downvotes as a sign there's little understanding on HN of network ops at scale. People may love dnsmasq on a home router (I do) but plenty of network admins like OP and I have watched it fall over in other scenarios.
dnsmasq has some really nice features that kea doesn't have. just finding a single blade in the datacenter, means a naming system, and it was easier with dnsmasq, and the config was easier to create. We ended up having to use ansible to generate the kea config file because we also keep machines subnet separated based on physical location.
HN has all sorts of people, I never try to quantify it. We don't know what we don't know.
We've been doing Rust before this. We've rewritten some of our core components over to Rust. Discussed a bit in this post: https://medium.techatscale.com/open-heart-surgery-from-java-...
In terms of writing a DHCP server there was research looking through Github, and the conclusion was that there is a gap in the DHCP space. DHCPd was approaching EOL (and now is EOL). Others in the DHCP industry were calling for options, and it looked like Dora could potentially fill some of those asks: https://ns1.com/blog/isc-dhcp-is-eol-what-will-replace-it
(I actually contemplated writing my own dhcp server in Rust while debugging dnsmasq but felt like it's one of those real PITA kinds of projects. Managed to workaround whatever the dnsmasq problem was after a few hours.)
If you can, add the support for CIDR style netmask (/8, /24 etc). Nothing wrong without it, but when you hop between them constantly mistakes happen.
In the example.yaml you state what option 3 is required - but it's not. It is absolutely a valid way to run some network without providing a default router.[0] If this is somehow is really a requirement anywhere than that requirement should be removed.
One of the things what I often use in MS DHCP is the server wide options, so some basic option values are configured on the server level and I add/override the needed ones on the scope level.
PS while the name is amusing, it is a possible IP conflict there, especially since you clearly state you know about Dora.
[0] And you can still provide the routign info through the option 121. Even for 0/0
The config format was created primarily to be easy to generate & consume programmatically, so the format is fully 'flattened' with no real abstraction. But this may be something we add later. It's also why the option format is the way it is. I'm sure we could make some improvements there to make hand writing easier.
I appreciate your other suggestions, thanks for taking the time to look through things. I will have a look at both the router option and the CIDR input.
I'll look at this and see if it's more consistent.
Also, if anyone knows a good device to use at home with router and switch (>4 ports) and ap that runs open source firmware... let me know. I don't like SRM on the Synology, and UniFi has gone the Apple way.
Wouldn't say Dora is competing. The project is in the early days and isn't feature parity to either. Some in the industry have voiced gaps & concerns that I reference in my comment.
my gut says DHCP<>netbox<>coredns backed by vault for x509 could be pretty sweet
Discover: first request broacasted by client in order to get lease (@ip and others configurations)
Offer: response bradcasted by server with the lease (@ip and others configurations)
Request: broacasted by the client in order to confirm the usage of this lease(from this server, others server can release other lease)
Ack: ack from server
> If the 'giaddr' field in a DHCP message from a client is non-zero, the server sends any return messages to the 'DHCP server' port on the BOOTP relay agent whose address appears in 'giaddr'. If the 'giaddr' field is zero and the 'ciaddr' field is nonzero, then the server unicasts DHCPOFFER and DHCPACK messages to the address in 'ciaddr'. If 'giaddr' is zero and 'ciaddr' is zero, and the broadcast bit is set, then the server broadcasts DHCPOFFER and DHCPACK messages to 0xffffffff. If the broadcast bit is not set and 'giaddr' is zero and 'ciaddr' is zero, then the server unicasts DHCPOFFER and DHCPACK messages to the client's hardware address and 'yiaddr' address. In all cases, when 'giaddr' is zero, the server broadcasts any DHCPNAK messages to 0xffffffff.