37 lines
2.9 KiB
Markdown
37 lines
2.9 KiB
Markdown
|
---
|
||
|
obj: concept
|
||
|
wiki: https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol
|
||
|
rfc: https://datatracker.ietf.org/doc/html/rfc2131
|
||
|
---
|
||
|
|
||
|
# Dynamic Host Configuration Protocol
|
||
|
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to automate the assignment of IP addresses and other network configuration parameters to devices on a network. DHCP simplifies the process of configuring devices on a network by providing a centralized mechanism for dynamic IP address allocation.
|
||
|
|
||
|
## Key Components
|
||
|
### 1. DHCP Server
|
||
|
A DHCP server is a network device responsible for assigning IP addresses and other configuration parameters to DHCP clients. It maintains a pool of available IP addresses and leases them to clients on a temporary basis.
|
||
|
|
||
|
### 2. DHCP Client
|
||
|
A DHCP client is a device (computer, printer, etc.) that requests network configuration information from a DHCP server. The client typically sends a DHCP discover message to locate available DHCP servers on the network.
|
||
|
|
||
|
|
||
|
## DHCP Process
|
||
|
1. **DHCP Discover**: When a device is connected to a network, it broadcasts a DHCP discover message to identify available DHCP servers.
|
||
|
2. **DHCP Offer**: DHCP servers respond with a DHCP offer message, providing the client with an IP address and other configuration parameters.
|
||
|
3. **DHCP Request**: The client selects one of the offered IP addresses and sends a DHCP request message to the chosen server.
|
||
|
4. **DHCP Acknowledge**: The selected DHCP server responds with a DHCP acknowledge message, confirming the allocation of the requested IP address and providing additional configuration details.
|
||
|
5. **IP Lease Period**: The DHCP server assigns an IP address to the client for a specific lease period. The client must renew its lease before expiration to retain the IP address.
|
||
|
|
||
|
## DHCP Configuration Parameters
|
||
|
DHCP servers can provide various configuration parameters, including:
|
||
|
- **IP Address**: The primary network identifier assigned to the device.
|
||
|
- **Subnet Mask**: Defines the network's subnetwork structure.
|
||
|
- **Default Gateway**: Specifies the router that connects the local network to other networks.
|
||
|
- **Domain Name System ([DNS](DNS.md)) Servers**: Identifies the servers responsible for translating [domain](Domain.md) names into IP addresses.
|
||
|
- **Domain Name**: Provides the domain name associated with the assigned IP address.
|
||
|
- **Lease Duration**: The period for which the IP address is allocated to the client.
|
||
|
|
||
|
## DHCP Security Considerations
|
||
|
- **Rogue DHCP Servers**: Unauthorized DHCP servers can cause network disruptions. Implementing DHCP snooping can help mitigate this risk.
|
||
|
- **IP Address Exhaustion**: Regularly monitoring and managing the IP address pool prevents exhaustion and ensures efficient resource utilization.
|
||
|
- **Man-in-the-Middle Attacks**: Using DHCP secure protocols, such as DHCPv6 Secure Neighbour Discovery (SEND), helps protect against man-in-the-middle attacks.
|