Page MenuHomeVyOS Platform

DHCP Static mapping don't work on every first lease
Closed, ResolvedPublicBUG

Assigned To
Authored By
rob
Jan 8 2024, 9:28 PM
Referenced Files
Restricted File
Jan 8 2024, 9:30 PM
Restricted File
Jan 8 2024, 9:29 PM
Restricted File
Jan 8 2024, 9:28 PM

Description

with the new kea-dhcp service and right after setup a dhcp server, every 1st lease will not deliver to vyos-hostsd. So no hosts entry will be created.

config:

set interfaces ethernet eth1 address '10.100.0.1/24'
set service dhcp-server listen-address '10.100.0.1'
set service dhcp-server hostfile-update
set service dhcp-server shared-network-name MGMT subnet 10.100.0.0/24 range 0 start '10.100.0.2'
set service dhcp-server shared-network-name MGMT subnet 10.100.0.0/24 range 0 stop '10.100.0.250'

log with 1st and 2nd dhcp request after 1,5minutes (see full log attached)

Jan  8 21:07:04 VyOS-15 kea-dhcp4[3003]: 2024-01-08 21:07:04.630 INFO  [kea-dhcp4.leases/3003.140567681369792] DHCP4_LEASE_ADVERT [hwtype=1 00:50:79:66:68:06], cid=[01:00:50:79:66:68:06], tid=0xa1d1410d: lease 10.100.0.2 will be advertised
Jan  8 21:07:05 VyOS-15 kea-dhcp4[3003]: 2024-01-08 21:07:05.628 INFO  [kea-dhcp4.leases/3003.140567681369792] DHCP4_LEASE_ALLOC [hwtype=1 00:50:79:66:68:06], cid=[01:00:50:79:66:68:06], tid=0xa1d1410d: lease 10.100.0.2 has been allocated for 86400 seconds
Jan  8 21:08:30 VyOS-15 kea-dhcp4[3003]: 2024-01-08 21:08:30.489 INFO  [kea-dhcp4.leases/3003.140567681369792] DHCP4_LEASE_ADVERT [hwtype=1 00:50:79:66:68:06], cid=[01:00:50:79:66:68:06], tid=0xe89b6e36: lease 10.100.0.2 will be advertised
Jan  8 21:08:30 VyOS-15 vyos-hostsd[652]: Request data: {"type": "hosts", "op": "add", "data": {"dhcp-server-10.100.0.2": {"test01": {"address": ["10.100.0.2"], "aliases": []}}}}
Jan  8 21:08:30 VyOS-15 vyos-hostsd[652]: Saving state to /run/vyos-hostsd/vyos-hostsd.state
Jan  8 21:08:30 VyOS-15 vyos-hostsd[652]: Sent response: {'data': None}
Jan  8 21:08:30 VyOS-15 vyos-hostsd[652]: Request data: {"op": "apply"}
Jan  8 21:08:30 VyOS-15 vyos-hostsd[652]: Applying 1 changes
Jan  8 21:08:30 VyOS-15 vyos-hostsd[652]: Writing /etc/resolv.conf

{F4153120}

Details

Difficulty level
Unknown (require assessment)
Version
1.5-rolling-202312310026
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)