DHCP
DHCP
1. Introduction to DHCP
• Definition: DHCP is a network protocol that dynamically assigns IP addresses and other
network configuration parameters to devices on a network.
• Purpose: Automates and simplifies the IP address allocation process.
2. DHCP Components
• DHCP Server
• Role: Responsible for assigning IP addresses and network configuration to client
devices.
• Types: Standalone DHCP server, router acting as a DHCP server, etc.
• DHCP Client
• Role: Device requesting network configuration from the DHCP server.
• Sends DHCP Discover messages to find available DHCP servers.
• DHCP Relay Agent
• Role: Forwards DHCP messages between DHCP clients and servers across
different subnets or networks.
• Ensures DHCP messages reach the appropriate DHCP server.
3. DHCP Message Types
1. DHCP Discover
• Purpose: Initiated by a DHCP client to discover available DHCP servers on the
network.
• Content: Broadcasts a message requesting IP address assignment and network
configuration details.
• Server Response: DHCP servers reply with DHCP Offer messages.
2. DHCP Offer
• Purpose: Sent by DHCP servers in response to a DHCP Discover message.
• Content: Contains an available IP address, lease duration, subnet mask, and other
configuration parameters.
• Client Response: DHCP clients evaluate multiple offers and choose one.
3. DHCP Request
• Purpose: DHCP client requests offered IP address and configuration details.
• Content: Sent to the selected DHCP server to confirm the allocation.
• Server Response: Confirmation or further negotiation occurs.
4. DHCP Acknowledgement (ACK)
• Purpose: Sent by the DHCP server to confirm the IP address allocation to the client.
• Content: Contains the allocated IP address, lease duration, and configuration
parameters.
• Client Action: Client configures its network interface with the received parameters.
5. DHCP Decline
• Purpose: Client declines the offered IP address due to conflicts or other reasons.
• Content: Sent by the client to indicate the refusal of an offered IP address.
• Server Action: DHCP server marks the declined address as available for
redistribution.
6. DHCP Release
• Purpose: Client voluntarily releases its allocated IP address before the lease duration
expires.
• Content: Sent by the client to inform the DHCP server that it no longer requires the
assigned IP address.
• Server Action: The released IP address becomes available for allocation to other
clients.
7. DHCP NAK (Negative Acknowledgement)
• Purpose: Server indicates the rejection of a DHCP Request made by the client.
• Content: Sent when the requested IP address is no longer available or conflicts with
existing assignments.
• Client Action: Client restarts the DHCP process by sending a new DHCP Discover
message.
8. DHCP Inform
• Purpose: Client requests additional configuration parameters from the DHCP server.
• Content: Unicast message sent by the client to a known DHCP server.
• Server Response: The server sends requested information without assigning a new
IP address.
4. DHCP Operation
• DORA Process
• Discover: Client broadcasts DHCP Discover messages to find available servers.
• Offer: Servers respond with DHCP Offer messages containing available
configurations.
• Request: Client chooses a configuration and sends a DHCP Request message.
• Acknowledge: Server sends DHCP Acknowledgement to confirm IP allocation.
• Lease Management
• DHCP leases define the duration for which an IP address is assigned to a client.
• Renewal: Clients request lease renewal when approaching expiration.
• Rebinding: If the client cannot contact the original DHCP server, it enters a
rebinding phase seeking any available DHCP server.
5. DHCP Options
• Additional Configuration Information
• Options provided by DHCP servers beyond IP addresses, such as DNS servers,
domain names, default gateways, etc.
• Option 43: WLC Add
• Option 53: Message Type
• Option 63: Client Id Info ( Mac Add)
• Option 12: Client System NetBIOS Name Info
• Option 51: Least Time
• Option 58: Renewal Time
• Option 82: DHCP Relay Agent
• Option 1: Subnet Mask Information
6. Security Concerns and Best Practices
• DHCP Snooping
• Technique to mitigate DHCP-related security threats by inspecting and filtering
DHCP messages.
• IP Address Management (IPAM)
• Centralized management of IP address spaces, DHCP, and DNS services to ensure
efficient utilization and security.
7. Troubleshooting DHCP Issues
• Common Problems
• IP address conflicts, DHCP server unavailability, misconfigurations, etc.
• Troubleshooting Steps
• Verify connectivity, check DHCP server logs, inspect DHCP configurations, etc.
8. Real-world Applications and Use Cases
• Enterprise Networks
• Scalability, automation, and central management in large network environments.
• Internet Service Providers (ISPs)
• Dynamic IP assignment to end-users, efficient utilization of IP address space.