do you have to make both the server and the client?
or are you creating a client to connect to an existing server?
it's reasonably simple if you're writing both, AND if this is a homework assignment, not a real product you;re making.
first you need to consider that the machine doesn't have an IP address, and doesn't know where the server is.
so it can't just say hey 10.0.0.1 on subnet 255.255.255.128 because it doesn't know if said subnets exist!
so your client has to use a broadcast message.
since it is not possible to send a broadcast message using TCP, you'll have to use UDP.
so that's the porotcol, and the address of the server sorted 255.255.255.255 and UDP.
if you're making a simple homework project server. then you can choose the port that you are using, if it's a "real deal" then ports 67 and 68 must used.
again if it's homework your client just needs to broadcast simple words address please?
and the server responds with an IP address, and a timeout value.
if you're making a real product, or something that MUST work as a real product then I suggest that you start here RFC 1533 - DHCP Options and BOOTP Vendor Extensions
RFC 2131 - Dynamic Host Configuration Protocol