there is a network configured in Mikrotik and configured a DHCP relay for that network. The DHCP server is a openwrt dnsmasq.
The problem is very trivial and simple to reproduce:
- DHCP leased an IP address to a client in that network successfully. It is a static leased IP address which means that the MAC address is bounded to that specific address and each time the client always get the same IP address.
- I changed the IP address assignment of that client in the DHCP configuration.
- I force the client to renew its IP address before it is expired. In general, the client send a request to extend the leasing time to its original IP address.
- The DHCP server response with a NAK “address not available” (because the original address is not bounded to it anymore). Mikrotik also received this DHCP response (confirmed with package capture)
- The DHCP relay DOESN’T forward that NAK to the client. ( I can verify it with the counter of “request” and “response” at the DHCP relay webgui, the “request” keep increasing but no count on “response” )
- The client cannot get the new address and remains to the old address as it don’t have any response from the DHCP server.
I believe there is a bug in the DHCP relay in mikrotik that it doesn’t implement the forwarding of DHCP NAK to the client. This is a huge drawback in IP address management aspect as the change of the IP address need to be wait until the target IP address expires.