[HN Gopher] Dora: A open-source Rust DHCP Server
       ___________________________________________________________________
        
       Dora: A open-source Rust DHCP Server
        
       Author : ckdarby
       Score  : 107 points
       Date   : 2022-12-07 15:10 UTC (7 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | sirjaz wrote:
       | Anyone try this on Windows Server?
        
         | ckdarby wrote:
         | I haven't, but I am currently running this on a raspberry pi
         | using Ubuntu.
        
       | ckdarby wrote:
       | Hey, I'm from BlueCat (though my opinions are my own). Will lurk
       | the comments if there are any questions around the project or
       | general DHCP.
        
         | jarym wrote:
         | Looks cool, what was the motivation for writing another DHCP
         | server - just for learning Rust or something else?
        
           | ckdarby wrote:
           | FYI /u/leshow is the core contributor of this project.
           | 
           | 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
        
           | formerly_proven wrote:
           | I dunno about "another". After some issues with dnsmasq I
           | went looking and there aren't actually a lot of open source
           | DHCP servers. There's like dhcpd, dnsmasq and kea.
           | 
           | (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.)
        
             | wyuenho wrote:
             | Depending on your use case CoreDNS may also be an option.
        
       | agrabil wrote:
       | For a mature, open-source, standards-compliant, cross-platform
       | DHCP server written in Java, please check out
       | https://github.com/jagornet/dhcp.
        
       | WirelessGigabit wrote:
       | I didn't look at the source code. I like dnsmasq for its
       | flexibility. I understand it. It's great. But the learning curve
       | is very steep. Which might be because of the options I wanted in
       | a certain way.
       | 
       | 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.
        
         | 0x0000000 wrote:
         | Hard to go wrong with opnSense, it's open and very powerful and
         | configurable. I run multiple VLANs, wireguard and OpenVPN, DHCP
         | with some static IP mappings, dynamic DNS for my on-prem
         | services, LACP for link aggregation to my core switch, multiple
         | ISP connections with policy based routing (it's not as good as
         | SD-WAN here but it's the best I've found that's open). Worth
         | checking out, at the least.
        
         | ArchOversight wrote:
         | I use pfSense on a small firewall appliance that has 6 intel
         | ethernet ports and then a AP from TP-Link that is only an AP
         | (no dual function).
        
         | hedgehog wrote:
         | Several people have recommended GL iNet routers (OpenWRT) but I
         | haven't tried their gear myself yet.
        
           | m-p-3 wrote:
           | I looked into it some time again and the shipping to Canada
           | was at a significant premium, like half the cost of the
           | device itself, and the models which were available on Amazon
           | was a small sliver of their product range :(
        
       | latchkey wrote:
       | I have a datacenter with so many machines (blade computers) in it
       | that dnsmasq couldn't keep up and we ended up having really bad
       | UDP storms. That wasn't fun to debug at all since we had no idea
       | that dnsmasq would have scaling issues like that. Even worse is
       | that the logging output is abysmal and made things even harder to
       | diagnose.
       | 
       | 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.
        
         | [deleted]
        
         | StreamBright wrote:
         | It would be great to have a better dnsmasq with sane config
         | file, better logging, a simple statistics page and some more.
        
         | kkielhofner wrote:
         | Did you try Kea[0]? There are a variety of ways to ensure the
         | same MAC addresses get the same IPs even after the initial
         | lease expires.
         | 
         | 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/
        
         | ckdarby wrote:
         | We've done some basic benchmarking at +5k leases/second.
         | 
         | 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
        
           | latchkey wrote:
           | Thanks. I've saved your project and if we are ever in the
           | mood to switch, we will definitely give you a try first. Keep
           | up the good work, you're solving a real problem.
        
         | binkHN wrote:
         | If you don't mind sharing/are able to share, what are your
         | lease times?
        
         | [deleted]
        
       | chaz6 wrote:
       | Something that is sorely missing from the FOSS world is a DHCPv6
       | server that supports RADIUS. The only one I am aware of that is
       | considered production ready is Kea ($$$). FreeRADIUS has one in
       | development but I do not know when it will be complete.
        
       | maltris wrote:
       | Whats the motivation behind this and how does it compete with ISC
       | DHCPd and Kea? I am operating a mid sized infrastructure using
       | ISC DHCPd and plan on the long run to migrate to Kea for its API,
       | Stork interface and convenience tools.
        
         | jsiepkes wrote:
         | ISC DHCPD is end of life [1] and unlike Kea this server is
         | written in a memory safe language (Rust). So from a security
         | perspective alone that's enough motivation to start a project.
         | 
         | [1] https://www.isc.org/dhcp/
        
         | ckdarby wrote:
         | I touch on this below:
         | https://news.ycombinator.com/item?id=33895978
         | 
         | 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.
        
       | Go0the0gophers wrote:
       | dora is for:
       | 
       | 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
        
       ___________________________________________________________________
       (page generated 2022-12-07 23:02 UTC)