I think this was all hampered by old entries in ARP cache, as the new printer used the same IP address as the old, but obviously has a different MAC. Clearing it made things work again. The weird part is it that it kept happening after it got an IP address and things would work for a while, which suggests that the ARP entries were corrected, then became corrupt again. Very odd since the old printer was no longer on the premises, so couldn't be replying and poisoning ARP.
It has also happened since with at least two other machines. A static IP was assigned in Dnsmasq, the machine would receive its assignment via DHCP but then had no IPv4 connectivity to the Internet, though communicating with other machines on the LAN was okay. The OPNsense ARP table contained an entry for that IP but with a MAC address of a machine that had that address months ago. Clearing the ARP table did not fix it permanently, it came back. The other machine was on the network, but using a different ethernet port with a different MAC, and there was no record on that other machine that it thought it was still assigned that address; all diagnostics show only its expected addresses. I doubt it was responding to ARP queries for its disconnected port with an IP address it no longer knew about.
Similar thing again on the second machine, IP assigned in Dnsmasq statically, DNS leases and ARP table all showing the correct entries, machine itself showing the right addresses. Rebooted OPNsense box after an update, and the ARP table contained the previous entry again. I think it was OPNsense, not the machine, because the machine was wiped and had a new OS install. The previous ARP responses for that IP and the bad MAC would have come from Windows, but the ARP responses with that IP and the good MAC would have come from Linux. Linux could never have known that the other MAC would have been assigned that address.
It has also happened since with at least two other machines. A static IP was assigned in Dnsmasq, the machine would receive its assignment via DHCP but then had no IPv4 connectivity to the Internet, though communicating with other machines on the LAN was okay. The OPNsense ARP table contained an entry for that IP but with a MAC address of a machine that had that address months ago. Clearing the ARP table did not fix it permanently, it came back. The other machine was on the network, but using a different ethernet port with a different MAC, and there was no record on that other machine that it thought it was still assigned that address; all diagnostics show only its expected addresses. I doubt it was responding to ARP queries for its disconnected port with an IP address it no longer knew about.
Similar thing again on the second machine, IP assigned in Dnsmasq statically, DNS leases and ARP table all showing the correct entries, machine itself showing the right addresses. Rebooted OPNsense box after an update, and the ARP table contained the previous entry again. I think it was OPNsense, not the machine, because the machine was wiped and had a new OS install. The previous ARP responses for that IP and the bad MAC would have come from Windows, but the ARP responses with that IP and the good MAC would have come from Linux. Linux could never have known that the other MAC would have been assigned that address.
"