I would like to bulid something that has DHCP functionality. However, I found the API of java are all on top of layer 3. Whenever it creates a socket, it binds to an IP and a port. In such case, how can I implement DHCP (if without native code?) Any idea? In particular in client side, I design a DHCPMessage class to represent DHCP packet I send a DHCP Discover message to a broadcast address 255.255.255.255, with my MAC address I used Ethereal to dump packets on the Ethernet I find my DHCP Discover packets successfully sending out, and the DHCP server in my LAN replies with a DHCP Offer message to my MAC address. However, my client cannot receive it although the MAC address and port is correct, it contains no IP Any ideas how to solve?