Hello everyone,
I’m currently testing a migration from VyOS v1.3.8 (rolling) to VyOS v1.5.0 (latest). This migration involves the transition from ISC DHCP to Kea DHCP.
Scenario:
The environment consists almost entirely of Ricoh printers. In v1.3.8, everything works flawlessly. However, in v1.5.0, printers start failing randomly.
Symptoms:
- A printer that was working fine suddenly loses access to HTTP, SMB, and Printing services.
- The printer still responds to ICMP (ping) perfectly.
- Checking the logs, I see a constant loop of DHCPACK followed immediately by DHCPNAK for the same client.
- If I roll back to v1.3.8, the issue disappears instantly.
Network Topology:
- VLAN 128 (Printers): 10.1.128.0/22
- Address Group/Static Mappings are heavily used.
- VyOS Interface: eth0.128 with IP 10.1.128.1/22.
Relevant Configuration:
set interfaces ethernet eth0 vif 128 address '10.1.128.1/22' set interfaces ethernet eth0 vif 128 description 'LAN_PRINTERS' set service dhcp-server listen-interface 'eth0.128' set service dhcp-server shared-network-name LAN_PRINTERS authoritative set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 lease '3600' set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 option default-router '10.1.128.1' set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 option domain-name 'test.com' set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 option name-server '10.1.128.1' set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 range 0 start '10.1.130.200' set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 range 0 stop '10.1.130.250' set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 static-mapping 10.1.128.10-IMP-1 ip-address '10.1.128.10' set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 static-mapping 10.1.128.10-IMP-1 mac '06:09:64:XX:XX:XX' (...) set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 static-mapping 10.1.128.100-IMP-100 ip-address '10.1.128.100' set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 static-mapping 10.1.128.100-IMP-100 mac '58:38:79:XX:XX:XX' set service dhcp-server shared-network-name LAN_PRINTERS subnet 10.1.128.0/22 subnet-id '128' set service dns forwarding allow-from '10.1.128.0/22' set service dns forwarding cache-size '0' set service dns forwarding dhcp 'eth0.128' set service dns forwarding listen-address '10.1.128.1' set service dns forwarding name-server 8.8.8.8 set service dns forwarding name-server 1.1.1.1 set service dns forwarding system
Logs ("Loop"):
When the failure occurs, Kea logs show it successfully allocates the lease, but then fails to select the subnet for the subsequent DHCPREQUEST from the same IP it just assigned:
Apr 23 20:56:51 kea-dhcp4[6367]: INFO [kea-dhcp4.leases] DHCP4_LEASE_ALLOC ... lease 10.1.128.50 has been allocated Apr 23 20:56:53 kea-dhcp4[6367]: ERROR [kea-dhcp4.bad-packets] DHCP4_PACKET_NAK_0001 ... failed to select a subnet for incoming packet, src 10.1.128.50, type DHCPREQUEST Apr 23 20:56:53 kea-dhcp4[6367]: INFO [kea-dhcp4.packets] DHCP4_PACKET_SEND ... trying to send packet DHCPNAK (type 6) from 10.1.128.1:67 to 10.1.128.50:68
Additionally, I see these errors regarding the socket filter:
DHCP4_BUFFER_RECEIVE_FAIL error on attempt to receive packet: Pkt4FilterLpf to receive UDP4 data
Questions:
- Is there a known issue with Kea and /22 (or larger) subnets when using many static mappings in VyOS 1.5?
- Why would Kea fail to "select a subnet" for a RENEW/REQUEST of an IP that belongs to the subnet it's listening on?
- Could the Pkt4FilterLpf error indicate an issue with how VyOS 1.5 handles LPF (Linux Packet Filtering) on VIF interfaces?
Any help or insight would be greatly appreciated before I have to officially abandon the 1.5 migration.
Complete LOG:
Apr 23 20:13:24 kea-dhcp4[6367]: 2026-04-23 20:13:24.455 ERROR [kea-dhcp4.packets/6367.140710936632320] DHCP4_BUFFER_RECEIVE_FAIL error on attempt to receive packet: Pkt4FilterLpf to receive UDP4 data
(...)
Apr 23 20:55:42 kea-dhcp4[6367]: 2026-04-23 20:55:42.166 ERROR [kea-dhcp4.bad-packets/6367.140710885787328] DHCP4_PACKET_NAK_0001 [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0x146: failed to select a subnet for incoming packet, src 10.1.128.50, type DHCPREQUEST
Apr 23 20:55:42 kea-dhcp4[6367]: 2026-04-23 20:55:42.167 INFO [kea-dhcp4.packets/6367.140710885787328] DHCP4_PACKET_SEND [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0x146: trying to send packet DHCPNAK (type 6) from 10.1.128.1:67 to 10.1.128.50:68 on interface eth0.128
Apr 23 20:56:51 kea-dhcp4[6367]: 2026-04-23 20:56:51.955 INFO [kea-dhcp4.leases/6367.140710877394624] DHCP4_LEASE_ALLOC [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0x18c: lease 10.1.128.50 has been allocated for 3600 seconds
Apr 23 20:56:51 kea-dhcp4[6367]: 2026-04-23 20:56:51.956 INFO [kea-dhcp4.leases/6367.140710877394624] DHCP4_LEASE_REUSE [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0x18c: lease 10.1.128.50 has been reused for 3529 seconds
Apr 23 20:56:53 kea-dhcp4[6367]: 2026-04-23 20:56:53.496 INFO [kea-dhcp4.packets/6367.140710894180032] DHCP4_PACKET_RECEIVED [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0x18d: DHCPREQUEST (type 3) received from 10.1.128.50 to 10.1.128.1 on interface eth0.128
Apr 23 20:56:53 kea-dhcp4[6367]: 2026-04-23 20:56:53.496 ERROR [kea-dhcp4.bad-packets/6367.140710894180032] DHCP4_PACKET_NAK_0001 [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0x18d: failed to select a subnet for incoming packet, src 10.1.128.50, type DHCPREQUEST
Apr 23 20:56:53 kea-dhcp4[6367]: 2026-04-23 20:56:53.497 INFO [kea-dhcp4.packets/6367.140710894180032] DHCP4_PACKET_SEND [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0x18d: trying to send packet DHCPNAK (type 6) from 10.1.128.1:67 to 10.1.128.50:68 on interface eth0.128
Apr 23 20:57:31 kea-dhcp4[6367]: 2026-04-23 20:57:31.414 INFO [kea-dhcp4.leases/6367.140710902572736] DHCP4_LEASE_ALLOC [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xb4: lease 10.1.128.50 has been allocated for 3600 seconds
Apr 23 20:57:31 kea-dhcp4[6367]: 2026-04-23 20:57:31.414 INFO [kea-dhcp4.leases/6367.140710902572736] DHCP4_LEASE_REUSE [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xb4: lease 10.1.128.50 has been reused for 3489 seconds
Apr 23 20:57:32 kea-dhcp4[6367]: 2026-04-23 20:57:32.967 INFO [kea-dhcp4.packets/6367.140710885787328] DHCP4_PACKET_RECEIVED [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xb6: DHCPREQUEST (type 3) received from 10.1.128.50 to 10.1.128.1 on interface eth0.128
Apr 23 20:57:32 kea-dhcp4[6367]: 2026-04-23 20:57:32.967 ERROR [kea-dhcp4.bad-packets/6367.140710885787328] DHCP4_PACKET_NAK_0001 [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xb6: failed to select a subnet for incoming packet, src 10.1.128.50, type DHCPREQUEST
Apr 23 20:57:32 kea-dhcp4[6367]: 2026-04-23 20:57:32.967 INFO [kea-dhcp4.packets/6367.140710885787328] DHCP4_PACKET_SEND [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xb6: trying to send packet DHCPNAK (type 6) from 10.1.128.1:67 to 10.1.128.50:68 on interface eth0.128
Apr 23 20:57:59 kea-dhcp4[6367]: 2026-04-23 20:57:59.733 INFO [kea-dhcp4.leases/6367.140710877394624] DHCP4_LEASE_ALLOC [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xd1: lease 10.1.128.50 has been allocated for 3600 seconds
Apr 23 20:57:59 kea-dhcp4[6367]: 2026-04-23 20:57:59.733 INFO [kea-dhcp4.leases/6367.140710877394624] DHCP4_LEASE_REUSE [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xd1: lease 10.1.128.50 has been reused for 3461 seconds
Apr 23 20:58:01 kea-dhcp4[6367]: 2026-04-23 20:58:01.263 INFO [kea-dhcp4.packets/6367.140710894180032] DHCP4_PACKET_RECEIVED [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xd2: DHCPREQUEST (type 3) received from 10.1.128.50 to 10.1.128.1 on interface eth0.128
Apr 23 20:58:01 kea-dhcp4[6367]: 2026-04-23 20:58:01.264 ERROR [kea-dhcp4.bad-packets/6367.140710894180032] DHCP4_PACKET_NAK_0001 [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xd2: failed to select a subnet for incoming packet, src 10.1.128.50, type DHCPREQUEST
Apr 23 20:58:01 kea-dhcp4[6367]: 2026-04-23 20:58:01.264 INFO [kea-dhcp4.packets/6367.140710894180032] DHCP4_PACKET_SEND [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xd2: trying to send packet DHCPNAK (type 6) from 10.1.128.1:67 to 10.1.128.50:68 on interface eth0.128
Apr 23 20:58:27 kea-dhcp4[6367]: 2026-04-23 20:58:27.985 INFO [kea-dhcp4.leases/6367.140710902572736] DHCP4_LEASE_ALLOC [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xed: lease 10.1.128.50 has been allocated for 3600 seconds
Apr 23 20:58:27 kea-dhcp4[6367]: 2026-04-23 20:58:27.985 INFO [kea-dhcp4.leases/6367.140710902572736] DHCP4_LEASE_REUSE [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xed: lease 10.1.128.50 has been reused for 3433 seconds
Apr 23 20:58:29 kea-dhcp4[6367]: 2026-04-23 20:58:29.524 INFO [kea-dhcp4.packets/6367.140710885787328] DHCP4_PACKET_RECEIVED [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xee: DHCPREQUEST (type 3) received from 10.1.128.50 to 10.1.128.1 on interface eth0.128
Apr 23 20:58:29 kea-dhcp4[6367]: 2026-04-23 20:58:29.524 ERROR [kea-dhcp4.bad-packets/6367.140710885787328] DHCP4_PACKET_NAK_0001 [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xee: failed to select a subnet for incoming packet, src 10.1.128.50, type DHCPREQUEST
Apr 23 20:58:29 kea-dhcp4[6367]: 2026-04-23 20:58:29.524 INFO [kea-dhcp4.packets/6367.140710885787328] DHCP4_PACKET_SEND [hwtype=1 58:38:79:xx:xx:xx], cid=[01:58:38:79:xx:xx:xx], tid=0xee: trying to send packet DHCPNAK (type 6) from 10.1.128.1:67 to 10.1.128.50:68 on interface eth0.128
Apr 23 20:58:44 vyos-configd[732]: Received message: {"type": "init"}
Apr 23 20:58:47 vyos-configd[732]: config session pid is 7462
Apr 23 20:58:47 vyos-configd[732]: config session sudo_user is admin
Apr 23 20:58:47 vyos-configd[732]: commit_scripts: ['interfaces_ethernet_eth0']
Apr 23 20:58:47 vyos-configd[732]: Received message: {"type": "node", "last": true, "data": "VYOS_TAGNODE_VALUE=eth0/usr/libexec/vyos/conf_mode/interfaces_ethernet.py"}
Apr 23 20:58:49 netplugd[4646]: eth0.128: state ACTIVE flags 0x00011043 UP,BROADCAST,RUNNING,MULTICAST,10000 -> 0x00001002 BROADCAST,MULTICAST
Apr 23 20:58:49 netplugd[7786]: /etc/netplug/netplug eth0.128 probe -> pid 7786
Apr 23 20:58:49 kea-dhcp4[6367]: 2026-04-23 20:58:49.290 ERROR [kea-dhcp4.packets/6367.140710936632320] DHCP4_BUFFER_RECEIVE_FAIL error on attempt to receive packet: Pkt4FilterLpf to receive UDP4 data
Apr 23 20:58:49 netplugd[4646]: eth0.128: state PROBING pid 7786 exited status 256
Apr 23 20:58:49 netplugd[4646]: Could not bring eth0.128 back up
Apr 23 20:58:49 vyos-configd[732]: [interfaces_ethernet]
Apr 23 20:58:49 vyos-configd[732]: scripts_called: ['interfaces_ethernet_eth0']
Apr 23 20:58:49 vyos-configd[732]: Sending reply: SUCCESS with output