NSX 6.4.6 - DHCP service on edge sending offer with wrong subnet mask
Here's an issue I have discovered lately:
I have configured the DHCP service on one of the NSX Edges. The DHCP is supposed to give out addresses in a /23 network segment, by the use of Bindings. There is no IP pools configured, the bindings are created automatically when a new VM is created.
Example IP range used for the bindings: 10.0.1.0/23, mask 255.255.254.0.
The Interface of the Edge is 10.0.1.3, so in the same broadcast domain.
The problem I have stumbled upon is, that when the first half of the address range is exhausted, so that all adresses up to 10.0.1.255 are used, VMs that get offers from the range 10.0.2.0-10.0.2.254 do not get the IP assigned.
After some troubleshooting I found out that an incorrect subnet mask is handed out by the DHCP server, regardless of what is configured in the binding. In my case 255.255.255.0 is handed out, instead of 255.255.254.0, which is configured in the binding. So when IPs get offered in the 10.0.2.x range, they use the broadcast address 10.0.2.255/24 instead of 10.0.1.255/23 and the DHCP request does not reach the DHCP interface.
Is this a known issue?
edit: edited for more clarity
It turns out, that the edge had sort of a stale IP Pool configuration. Every time a new VM was taken online, even though there is a binding configured for it, the Edge DHCP Service would try and hand out an address from this IP Pool, which failed because as per log no new leases could be created as the pool was depleted. Also, the DHCP offers that were handed out before included a /24 mask instead of a /23 mask, because of which sending a request would fail anyway, since a wrong boradcast address would be used.
Clearing all leases on the edge by nsx cli and also redeploying the edge did not remediate the issue. I had to deply a new edge and migrate the bindings.