Page MenuHomeVyOS Platform

Static DHCP mappings aren't available on DNS
Open, NormalPublicBUG


I ran into the issue as mentioned in, and attempted to use the solution as specified:

set service dhcp-server global-parameters "use-host-decl-names on;"

However, i have an issue with this solution - one of my servers print is available on multiple VLANs - main.local, print.local, and guest.local, and giving it a static IP in each causes dhcpd to fail. This is what the prepending of the dhcp shared network name was meant to solve.

I'd like these hostnames to still be available in dns, but keep the prepended shared network name in dhcpd.conf.

I suggest that when a static lease is added, the DHCP configuration script should add the machine's fqdn / ip address into /etc/hosts, and remove it when a static lease is removed.


Difficulty level
Normal (likely a few hours)
VyOS 1.2.0-rolling+201805210337
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Inserting FQDN seems reasonable, but we need to think carefully when FQDN should come from, and if we use the "system domain-name" option, what should we do if it's not present.

syncer triaged this task as Normal priority.May 27 2018, 9:36 AM

Moving this out of 1.2.0, at least until we decide what to do when domain is not configured.

I've implemented this in our ansible-derived vyos configuration by allowing the static addresses to be generated with the VLAN prepended and adding a system static-host-mapping for the fqdn to ip.

Nothing vyos-side needs changing to do this, might be worth us documenting it as an option somewhere though?

set service dhcp-server shared-network-name VLAN{{vlan}} subnet {{network.address}} static-mapping {{static_lease.key}} ip-address {{static_lease.value.ip}}
set service dhcp-server shared-network-name VLAN{{vlan}} subnet {{network.address}} static-mapping {{static_lease.key}} mac-address {{static_lease.value.mac}}
set system static-host-mapping host-name {{static_lease.key}}.{{network.tag}} inet '{{static_lease.value.ip}}'
dmbaturin changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).Jan 27 2021, 7:13 PM
dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).
dmbaturin set Issue type to Bug (incorrect behavior).Sep 3 2021, 7:37 AM