dhcp-client always sends DHCP:DISCOVER packets with the broadcast flag turned on. Some DHCP servers (not MikroTik) can’t deal correctly with that flag and don’t send any answer at all. So dhcp-client stays in “searching” state forever. Is there any way to not turn on the broadcast flag in the dhcp-client requests like dhcp clients in the most versions of Windows do?
Yes, it is correct.
Broadcast flag is set for MikroTik DHCP client.
RFC states that broadcast flag should be set,
A client that cannot receive unicast IP datagrams until its protocol
software has been configured with an IP address SHOULD set the
BROADCAST bit in the ‘flags’ field to 1 in any DHCPDISCOVER or
DHCPREQUEST messages that client sends. The BROADCAST bit will
provide a hint to the DHCP server and BOOTP relay agent to broadcast
any messages to the client on the client’s subnet. A client that can
receive unicast IP datagrams before its protocol software has been
configured SHOULD clear the BROADCAST bit to 0. The BOOTP
clarifications document discusses the ramifications of the use of the
BROADCAST bit
However we could add a workaround, when DHCP client will switch off broadcast after 15 sec of not getting the address;
- 15sec broadcast;
- 15sec without broadcast, when broadcast messages fail.
sergejs, is this workaround not added to v5rc11 yet?
It was added, thanks.
Broadcast flag could be the case that my routerboard is stuck in “searching…” when it attempts to get an IP address from the modem. However, I don’t see the workaround was added in changelog.