Dynamic Host Configuration Protocol (DHCP) is anetwork protocol that is used to configure network devices to communicateon an IP network. A DHCP client uses the DHCP protocol to acquire configurationinformation, such as an IP address, a default route, and one or moreDNS server addresses from a DHCP server. The DHCP client then uses thisinformation to configure its host. Once the configuration process iscomplete, the host is able to communicate on the Internet.
The DHCP server maintains a database of availableIP addresses and configuration information. When it receives a requestfrom a client, the DHCP server determines the network to which the DHCPclient is connected, and allocates an IP address or prefix appropriatefor the client, and sends configuration information appropriate for thatclient.
The DHCP server and DHCP client must be connectedto the same network link. In larger networks, each network link containsone or more DHCP relay agents. These DHCP relay agents receive messagesfrom DHCP clients and forward them to DHCP servers. DHCP servers sendresponses back to the relay agent, and the relay agent then sends theseresponses to the DHCP client on the local network link.
DHCP servers typically grant IP addresses to clientsfor a limited interval called a lease.DHCP clients are responsible for renewing their IP address before thatinterval has expired, and must stop using the address once the intervalhas expired, if they have not been able to renew it.
DHCP is used for IPv4 and IPv6. While both versionsserve the same purpose, the details of the protocol for IPv4 and IPv6are sufficiently different that they should be considered separate protocols.