DHCP - stands for Dynamic Host Configuration Protocol.
DHCP is a network protocol which allows computers to receive the IP address and other parameters required to operate in the TCP/IP network. This protocol acts as "client" - "server". On the stage of network device configuration, for automatic configuration the computer(“client”) addresses the DHCP-”sever” and receives the required parameters.
The network administrator has the ability to define the DHCP address ranges (address pool) which will be assigned by the “server” to the “clients”.
Automatic assignment of the IP addresses helps to avoid manual network configuration on each “client” and also dramatically reduces the number of errors. The DHCP protocol is currently used in most TCP/IP networks. The IP address is assigned to the client for some period of time called “lease time”.
In addition to the IP address, the DHCP server is providing the client with a subnet mask and IP addresses of the DNS servers to be used in the name resolution process. Optionally the DHCP server can provide clients with; NTP( network time protocol) server addresses, Domain name information, TFTP(trivial file transfer protocol) server addresses and more ( for the full list of options please see here - http://tools.ietf.org/html/rfc2132).
Having the DHCP server responsible for IP address assignment to the clients, the network administrator gets greater transparency of the network as well as an additional information source to perform the network troubleshooting tasks. For example: By looking up the DHCP leases log entries, is easy to determine when the specific client was last seen online and what was its IP address.
If it is necessary to make sure a specific client always uses the same IP address (it may be required for various integrations) there was a process called “DHCP reservation” created to answer this need.
The DHCP reservation is performed by the network administrator using the control interface of the DHCP server. Effectively the DHCP reservation is creating the link between the client (using its MAC address) and the IP address.
How does it actually work in normal situation?
1.The computer that is configured as a DHCP client sends out a broadcast packet called DHCPDISCOVER. This Discover packet contains the client's computer name and Media Access Control (MAC) address so the DHCP servers can respond to it. Basically, the Discover packet says, "I'm looking for a DHCP server who can lease an IP address."
2. DHCP servers on the network respond to the broadcast with DHCPOFFER. Basically, the DHCPOFFER says, "I am a DHCP server and I have a lease for you." If several DHCP servers respond to the request, the client accepts the first offer that it receives.
3. The client then responds via another broadcast message called a DHCPREQUEST. This message basically says, "I accept your lease offer and would like an IP address."
- The DHCP server whose offer was accepted responds with a DHCPACK message, which acknowledges the lease acceptance and contains the client's IP address lease as well as other parameters that you configure the server to provide.
What will happen if the client is not able to find the DHCP server?
The client will use the APIPA (Automatic Private IP Addressing) address which is 169.254.0.0/16.
When should we use DHCP to configure the clients?
The universally received approach is as follows:
- To be configured using the DHCP
- iOS Devices
- Third party devices e.g (Savant components ,PlayStation, TV’s etc )
- To be configured using DHCP using “DHCP reservation”
- Savant System Host
- Lighting controllers
- IP cameras
- To be configured manually