Is a client device able to unicast DHCP Discover to a server?

62 views Asked by At

I'm using two laptops(Windows) to implement DHCP DORA. In the client's laptop, I can change the DHCP broadcast flag in the registry. (I set DhcpConnEnableBcastFlagToggle and DhcpConnForceBroadcastFlag in Computer\HKEY_LOCAL\MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces(NIC card))

I tested DHCP DORA in both cases (DHCP Discover unicast and broadcast) and both worked well. Is it possible for the client DHCP Discover as an unicast to the server?

enter image description here

I checked RFC 2131 but it only says about DHCP Discover Broadcast

1

There are 1 answers

0
Joshua On

Yes, yes you can do this.

At the protocol level, fill in the IP header of the DHCPDISCOVER message with source IP = 0.0.0.0 and target IP = IP address of DHCP server. You can get the MAC address of the DHCP server given its IP address by from an ARP request with tell's IP set to 0.0.0.0 and tell's MAC address set correctly.

This means you're going to be using raw packets; which might mean you need to install WinPCAP.

I don't think the stock Windows DHCP client knows how to do any of this, but you asked on stackoverflow not superuser or serverfault.