What is DHCP? How does it work?
Answer
It stands for Dynamic Host Configuration Protocol and allocates IP addresses, subnet masks, and gateways to hosts. This is how it works:
- A host upon entering a network broadcasts a message in search of a DHCP server (DHCP DISCOVER)
- An offer message is sent back by the DHCP server as a packet containing lease time, subnet mask, IP addresses, etc (DHCP OFFER)
- Depending on which offer is accepted, the client sends back a reply broadcast letting all DHCP servers know (DHCP REQUEST)
- The server sends an acknowledgment (DHCP ACK)
Read more here