In the configuration below /etc/hosts isn't getting updated with the host name from DHCP. I'd expect the host name from the lease to show up in /etc/hosts and be resolvable in DNS after enabling hostfile-update. Or I'm misunderstanding how this feature is supposed to be working. If this has been fixed in a newer release I'll try it to confirm.
service {
dhcp-server {
hostfile-update
shared-network-name vm-network {
authoritative
subnet 10.0.3.0/24 {
default-router 10.0.3.1
dns-server 10.0.0.2
domain-name example.com
domain-search example.com
lease 86400
range vm-range {
start 10.0.3.200
stop 10.0.3.254
}
}
}
}
vyos@fw1:~$ show dhcp server leases
IP address Hardware address State Lease start Lease expiration Remaining Pool Hostname
------------ ------------------ ------- ------------------- ------------------- ----------- ---------- ----------
10.0.3.200 3e:1f:5d:b9:26:c0 active 2020/05/12 13:55:57 2020/05/13 13:55:57 18:27:29 vm-network vm1
10.0.3.201 a6:3d:dc:16:fb:14 active 2020/05/12 15:17:16 2020/05/13 15:17:16 19:48:48 vm-network shawns-vm
vyos@fw1:~$ cat /etc/hosts
### Autogenerated by VyOS ###
### Do not edit, your changes will get overwritten ###
# Local host
127.0.0.1 localhost
127.0.1.1 fw1.example.com fw1
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# From DHCP and "system static host-mapping"
10.0.1.8 nas1.example.com # This is a static host-mapping and not in DHCP.