DHCP
also: Dynamic Host Configuration Protocol
Dynamic Host Configuration Protocol (DHCP) is a network protocol that automatically assigns IP addresses and other network configuration settings to devices on a network, eliminating the need for manual configuration.
DHCP is a client-server protocol that enables devices to obtain network configuration automatically from a DHCP server rather than requiring administrators to manually assign each device a static IP address.
When a device (DHCP client) connects to a network, it broadcasts a request for network configuration. The DHCP server responds by assigning an IP address from its pool, along with other settings such as the subnet mask, default gateway, and DNS servers. This assignment is typically temporary and valid for a specific lease period.
For example, when you connect a laptop to a home WiFi network, the router's DHCP server automatically assigns your laptop a local IP address like 192.168.1.100 without any manual setup. In Linux, you can enable DHCP on an interface using dhclient eth0 or by configuring it in your network manager.