I need to simulate the process of DHCP client, by following steps:

1. Excute ipconfig /release
2. Send a costomized DISCOVER packet(which is totally equal to the
packet from ipconfig command ) from to
3. Language : C# , call System.Net.Socket.UdpClient to send the

Error: Host Unreachable. But the packet form ipconfig can be sent to the
If I set a magic IP address before step2, my packet can be sent
and the OFFER form DHCP Server can be received.

Did I miss something or made some mistakes?

Thank you very much!