0
close

Choose Your Shared Hosting Plan

Choose Your Reseller Hosting Plan

Choose Your VPS Hosting Plan

Choose Your Dedicated Hosting Plan

DHCP (Dynamic Host Configuration Protocol)

DHCP (Dynamic Host Configuration Protocol)

 

DHCP (Dynamic Host Configuration Protocol)


1. What Problem DHCP Solves

Before DHCP, networks used manual IP configuration.

That creates real problems:

  • Human error (duplicate IPs)
  • Poor scalability
  • High operational cost

DHCP solves this:

Automatically assigning IP configuration to devices when they join a network.


2. What DHCP Provides

A DHCP server doesn’t just give an IP address. It provides a complete network configuration:

  • IP address
  • Subnet mask
  • Default gateway
  • DNS servers
  • Lease duration

3. Where DHCP Lives (Protocol Stack)

DHCP operates at the Application Layer, but uses:

  • UDP protocol
    • Port 67 → Server
    • Port 68 → Client

It relies on:

  • Broadcast communication (initially)

4. DHCP Operation — The DORA Process

This is fundamental. You must know this cold.

Step-by-step:

  1. Discover (Client → Broadcast)
  2. Offer (Server → Client)
  3. Request (Client → Server)
  4. Acknowledge (ACK) (Server → Client)

Visual Flow

Image

Image

Image

Image

Image

Image


Breakdown

1. DHCP Discover

  • Client has no IP yet
  • Sends broadcast:
0.0.0.0 → 255.255.255.255

2. DHCP Offer

  • Server proposes:
    • IP address
    • Configuration

3. DHCP Request

  • Client selects one offer
  • Broadcasts acceptance

4. DHCP ACK

  • Server confirms lease
  • Client configures interface

5. DHCP Lease Concept

DHCP does not assign IPs permanently.

Lease = temporary ownership

Example:

  • Lease time: 24 hours

Renewal Process:

  • At 50% → client tries renewal
  • At 87.5% → tries again (rebind)

6. DHCP Message Types

Important for deep understanding:

  • DISCOVER
  • OFFER
  • REQUEST
  • ACK
  • NAK (negative acknowledgment)
  • RELEASE
  • INFORM

7. DHCP Packet Structure (Key Fields)

DHCP is based on BOOTP.

Important fields:

  • Transaction ID (matches request/response)
  • Client MAC address
  • Your IP (yiaddr)
  • Server IP (siaddr)
  • Options field (most important part)

8. DHCP Options (Critical in Real Networks)

Options define behavior.

Examples:

Option Purpose
1 Subnet mask
3 Default gateway
6 DNS server
51 Lease time
54 DHCP server ID

9. DHCP Server — Core Components

A DHCP server manages:

1. Scope (IP Pool)

Example:

192.168.1.100 – 192.168.1.200

2. Exclusions

Reserved addresses (e.g., routers, servers)

3. Reservations

Bind IP to MAC address


10. DHCP Relay (Very Important in Real Networks)

Problem:

DHCP uses broadcast → routers don’t forward broadcasts

Solution:

  • DHCP Relay Agent

It forwards requests to a DHCP server in another network.


Concept Visualization

Image

Image

Image

Image

Image

Image

Image


11. DHCP in IPv6 (DHCPv6)

IPv6 changes the model.

Two main approaches:

1. SLAAC (Stateless)

  • No DHCP needed for IP
  • Router assigns prefix

2. DHCPv6

  • Provides:
    • DNS
    • additional config

Modes:

  • Stateless DHCPv6
  • Stateful DHCPv6

12. Security Issues in DHCP

DHCP is inherently unauthenticated.

Common Attacks:

1. Rogue DHCP Server

Attacker gives wrong gateway → traffic interception

2. DHCP Starvation

Flood server → exhaust IP pool


Mitigation:

  • DHCP Snooping (switch feature)
  • Port security
  • Network segmentation

13. Real-World Deployment

Typical architecture:

  • DHCP Server (Windows/Linux/router)
  • VLAN-based scopes
  • Relay agents on routers

Example:

  • VLAN 10 → 192.168.10.0/24
  • VLAN 20 → 192.168.20.0/24

Each with its own scope


14. Practical Implementation Examples

Windows Server DHCP

  • GUI-based
  • Integrated with Active Directory

Linux DHCP (ISC DHCP / Kea)

  • Config file-based
  • Highly customizable

Router-based DHCP

  • Used in small networks

15. Key Engineering Insights

If you want to think like a pro:

  • DHCP is state management, not just IP assignment
  • Lease tuning affects network performance
  • DHCP + DNS integration is critical
  • Relay design determines scalability

16. Common Mistakes

  • Overlapping scopes
  • Too short lease times
  • No DHCP redundancy
  • Ignoring security (rogue servers)

17. Final Summary

DHCP is:

  • A dynamic configuration protocol
  • Built on UDP and broadcast discovery
  • Driven by the DORA process
  • Essential for scalable network management

Without DHCP:

Modern networks simply don’t scale.

Post Your Comment

© Infiniti Network Service . All Rights Reserved.

Colocation in a EU Datacenter , This service is temporarily unavailable for new customers

INS-CO
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.