Dhcp service and DNS updates

I’ve been a long time vyatta SE user and recently started moving my systems to VyOS. One thing that has always irked me that has never worked right is the ability to automatically update internal DNS with DHCP names. Even OpenWRT makes this work with dnsmasq on little SOHO routers. I understand why it doesn’t do it out of the box on Vyatta/VyOS but it was something I always wanted to fix.

I found this thread over on the Ubiquiti forums around this issue and the fix that user offered (http://community.ubnt.com/t5/EdgeMAX/Automatic-DNS-resolution-of-DHCP-client-names/td-p/651311). It wasn’t a perfect solution but its pretty close. At the end of that thread a UBNT employee referenced a ‘hostfile-update’ flag now available. I went digging through the GPL’d source code and it looks like Ubiquiti has baked this into their own stuff.

I have implemented in my own installation of VyOS but I guess I’m not sure what the rules are for taking this and committing it to our own community. Is this something we could add? I’d be willing to help with it. If anybody else is interested the necessary modifications exist in UBNT’s EdgeMax Router firmware. In the GPL source its in vyatta-cfg-dhcp-server_0.13.12.tgz (in the current version I pulled - GPL.ER-e100.v1.5.0.4677648.tbz2).

Happy to provide more details if needed!

Thanks!

I’m surprised there is no other interest in this. None at all? I’m happy to help contribute but I wasn’t sure if I’m potentially breaking any rules by taking it out of UBNT’s code.

I presume the ubiquity code is GPL version 2 (possibly “or later”), so there should not be a problem putting that into Vyos.

Finally! I thought I never got the cli config right. Let’s see if i can make it work.

I had actually offered up a patch to implement this into their lithium and helium releases. I believe they implemented it in lithium but not helium.

If its not there let me know - I’m not running lithium in production so I’ve still been implementing it manually in helium after an update :frowning:

If you have any questions about putting it in there let me know.

resurrecting an old thread…
with host-file-update enabled, the hostsfile gets updated on whichever dhcp server is “master”. On my edgerouter, it gets updated on both nodes. Is this a bug?

Edit: I should add that I’m running the 1.2.0 beta, which seems to include this update.

I’m not sure if its a bug and I’m just lucky or what but I’m on a Lithium build and I do not have that issue on my dual-node setup. I run a primary and secondary DHCP server on two VyOS instances in my home and both systems have identical hosts files with all of the dhcp events logged.

Thanks!

What build are you on? I just downloaded lithium 1601250000-2c03c9d-amd64 and still have the same problem.