How can I make it so that hostnames supplied by machines using the DHCP server are registered with the DNS forwarder? So that they can be resolved by other systems on the LAN.
This is no supported at this time
Thanks for the prompt reply!
Is it by now or what could be done to achieve this?
Could VyOS talk to an external DNS server and update it with dhcp leases/mappings?
i think in current rolling it’s supported but may require testing
Cool! I’m on rolling. How could I test it?
nope, my bad, still not possible
but now i think we can implement this
let me investigate on that
you can try rolling from here https://downloads.vyos.io/?dir=rolling/current/amd64
on-dhcp-event.sh - https://github.com/vyos/vyatta-cfg-dhcp-server/blob/ba5569c069bd5b0e67a23c6bdc363916beaeefe3/scripts/system/on-dhcp-event.sh
looks like it already adds records to hosts file
and dns forwarder should serve them just fine
I think what is missing is way to configure domain
Domain name can be set with
set system domain-name xyz
It could/should take it from there as a start?
Hmm it doesn’t add records to /etc/hosts here on VyOS 1.2.0-rolling+201807050337
But it does seem to expose /etc/hosts records via DNS to clients resulting in
from another host, pinging 127.0.0.1 which makes no sense
Indeed it works!
It has to be enabled manually though, even if cli completion claims this is the default setting?
“enable Enable updating /etc/host file (default)”
set service dhcp-server hostfile-update enable
Then /etc/hosts gets updated and distributed via dns so all machines have it.
The domain though is not being added only the hostname, as you suspected.