DHCP (Dynamic Host Configuration Protocol)
A network management protocol that automatically assigns IP addresses and other network configuration parameters to devices on a network, eliminating the need for manual configuration.
Key Characteristics:
DHCP operates on a client-server model where a DHCP server dynamically distributes network configuration information to clients. It runs on the application layer and uses UDP ports 67 (server) and 68 (client). DHCP simplifies network administration by centralizing and automating the assignment of IP addresses, subnet masks, default gateways, and DNS server addresses.
How It Works:
DHCP uses a four-step process called DORA to assign IP addresses:
- Discover: Client broadcasts a request to find available DHCP servers
- Offer: DHCP server responds with an available IP address offer
- Request: Client formally requests the offered IP address
- Acknowledge: Server confirms the assignment and provides lease details
Configuration Parameters Provided:
- IP Address: Unique address for the device on the network
- Subnet Mask: Defines the network's address range
- Default Gateway: Router address for external network access
- DNS Servers: Addresses for domain name resolution
- Lease Duration: Time period the IP address is valid
- Additional options like NTP servers, domain names, and more
Lease Management:
DHCP assigns IP addresses with a lease time, after which the address must be renewed or returned. Clients typically attempt to renew their lease at 50% and 87.5% of the lease duration. This allows efficient reuse of IP addresses in networks where devices frequently connect and disconnect.
Common Uses:
- Home and office networks (routers with built-in DHCP servers)
- Enterprise networks for automatic device configuration
- Guest Wi-Fi networks
- Mobile device management
- IoT device deployment
Advantages:
- Eliminates manual IP configuration errors
- Centralized network management
- Efficient IP address utilization
- Easy network changes and updates
- Scalable for networks of any size
DHCP Reservation:
Administrators can configure DHCP to always assign the same IP address to specific devices (based on MAC address), combining the benefits of static IPs with automatic configuration.
Security Considerations:
DHCP can be vulnerable to rogue DHCP servers and spoofing attacks. Security measures include DHCP snooping, port security, and using authenticated DHCP where available.