What is DHCP and How Does It Work?

What is DHCP and How Does It Work?
Networking ATN Campus August 31, 2026 8 views

Have you ever connected your laptop or smartphone to Wi-Fi and immediately received an IP address without manually configuring anything? ????

This is possible because of DHCP (Dynamic Host Configuration Protocol).

DHCP automatically provides devices with important network configuration information such as an IP address, subnet mask, default gateway, and DNS server.

In this article, we'll learn how DHCP works, understand the DORA process, explore IP address leasing, and look at a real-world networking example.


???? What is DHCP?

DHCP stands for Dynamic Host Configuration Protocol.

It is a network protocol that automatically assigns network configuration information to devices connected to a network.

Without DHCP, an administrator would have to manually configure the IP address and other network settings on every computer, smartphone, printer, or other network device.

DHCP Can Provide

  • IP Address
  • Subnet Mask
  • Default Gateway
  • DNS Server
  • IP Address Lease Time
  • Other network configuration options
        DHCP Server
             |
             | Network Configuration
             ↓
     +-------+-------+
     |       |       |
    PC1     PC2    Laptop
     |       |       |
    IP      IP      IP
 Address  Address Address
        

???? How Does DHCP Work?

When a device joins a network and needs an IP address, it can communicate with a DHCP server to obtain its network configuration.

DHCP commonly uses a four-step process known as DORA.

DORA Stands For

  1. D – Discover
  2. O – Offer
  3. R – Request
  4. A – Acknowledge

1️⃣ DHCP Discover

When a device connects to the network and does not have an IP address, it sends a DHCP Discover message to find available DHCP servers.

       Client
         |
         | DHCP Discover
         ↓
     Network
         |
         ↓
   DHCP Server
        

The client is essentially saying:

"Is there any DHCP server available that can give me an IP address?"

The Discover message is generally sent as a broadcast because the client does not yet know the address of the DHCP server.


2️⃣ DHCP Offer

The DHCP server receives the Discover message and responds with a DHCP Offer.

The offer may contain information such as:

  • Available IP address
  • Subnet mask
  • Default gateway
  • DNS server
  • Lease duration
     DHCP Client
          |
          | DHCP Discover
          ↓
     DHCP Server
          |
          | DHCP Offer
          ↓
     DHCP Client
        

3️⃣ DHCP Request

The client receives the offer and sends a DHCP Request message to indicate that it wants to use the offered IP address.

     DHCP Server
          |
          | Offers 192.168.1.20
          ↓
     DHCP Client
          |
          | DHCP Request
          ↓
     DHCP Server
        

If multiple DHCP servers responded, the client can indicate which offer it has selected.


4️⃣ DHCP Acknowledgment

Finally, the DHCP server sends a DHCP Acknowledgment (ACK) confirming the IP configuration.

DHCP Discover
      ↓
DHCP Offer
      ↓
DHCP Request
      ↓
DHCP ACK
      ↓
Client Configured
        

The device can now use the assigned network configuration to communicate with other devices and access the Internet.


???? Understanding the DORA Process

              DHCP SERVER
                   |
                   |
            +------+------+
            |             |
            ↓             |
       DHCP OFFER         |
            ↑             |
            |             |
       DHCP REQUEST       |
            ↑             |
            |             |
       DHCP DISCOVER      |
            |             |
            +-------------+
                   |
                   ↓
              DHCP CLIENT

        Discover → Offer → Request → Acknowledge
        

A simple way to remember DORA is:

Discover → Offer → Request → Acknowledge

⏳ What is a DHCP Lease?

DHCP usually does not give a device an IP address permanently. Instead, the address is assigned for a specific period called a lease time.

For example, a DHCP server might assign:

IP Address     : 192.168.1.25
Subnet Mask    : 255.255.255.0
Gateway        : 192.168.1.1
DNS Server     : 8.8.8.8
Lease Time     : 24 Hours
        

Before the lease expires, the client can request to renew the address so it can continue using it.


???? Real-World Example

Imagine you arrive at a university or office and connect your laptop to the Wi-Fi.

You don't manually enter an IP address such as 192.168.10.50.

Instead, your laptop communicates with the network's DHCP service.

Laptop connects to Wi-Fi
          ↓
    DHCP Discover
          ↓
     DHCP Server
          ↓
      DHCP Offer
          ↓
    DHCP Request
          ↓
      DHCP ACK
          ↓
Laptop receives:
          |
          +-- IP Address
          +-- Subnet Mask
          +-- Default Gateway
          +-- DNS Server
          ↓
     Internet Access
        

This allows organizations to manage IP addresses efficiently without manually configuring every device.


???? DHCP in a Home Network

In many home networks, your wireless router acts as the DHCP server.

              Internet
                  |
              ISP Router
                  |
          +-------+-------+
          |               |
        Wi-Fi           Ethernet
          |               |
       Laptop            PC
          |
       Smartphone

       Router = DHCP Server
        

When your smartphone or laptop connects to the router, the router can automatically assign it an IP address.


???? DHCP in an Enterprise Network

Large organizations may use dedicated DHCP servers instead of relying on a small home router.

                  DHCP Server
                       |
                 Network Core
                       |
              +--------+--------+
              |                 |
           Switch             Switch
              |                 |
           VLAN 10           VLAN 20
              |                 |
           Employees        Management
        

DHCP can provide different network configurations to devices depending on their network or VLAN.


???? What is a DHCP Relay?

DHCP uses broadcast communication during the initial discovery process. Routers normally do not forward broadcasts between different networks.

In an enterprise network, a DHCP Relay Agent can forward DHCP requests from clients to a DHCP server located on another network.

       Client VLAN
            |
            ↓
        L3 Switch
            |
       DHCP Relay
            |
            ↓
      DHCP Server
        

This allows one centralized DHCP server to serve clients across multiple networks or VLANs.


⚠️ What Happens If DHCP Fails?

If a device cannot reach a DHCP server, it may fail to obtain a normal network configuration.

On some operating systems, you may see an automatically assigned address from the 169.254.0.0/16 range. This is commonly associated with IPv4 link-local addressing.

Without proper DHCP configuration, the device may not be able to communicate normally with other networks or access the Internet.


????️ Common DHCP Troubleshooting Steps

  1. Check whether the network cable or Wi-Fi connection is active.
  2. Check whether the DHCP server is running.
  3. Verify the DHCP address pool has available addresses.
  4. Check VLAN configuration.
  5. Check DHCP relay configuration when required.
  6. Check firewall and security policies.
  7. Renew the client's IP configuration.

Useful Commands

Windows:

ipconfig

ipconfig /release

ipconfig /renew

ipconfig /all
        

These commands can help you inspect and renew the network configuration assigned to a Windows device.


???? DHCP vs Static IP Address

Feature DHCP Static IP
Configuration Automatic Manual
Management Centralized Manually managed
IP Changes Possible Normally remains fixed
Best For Clients and large networks Servers and devices requiring fixed addressing

???? Why DHCP is Important for Network Engineers

DHCP is a fundamental networking technology and is an important concept for anyone studying CCNA, CCNP, Network Administration, or Cybersecurity.

Understanding DHCP also helps you troubleshoot common problems involving IP addresses, VLANs, routing, and network connectivity.


???? Key Takeaways

  • DHCP automatically provides network configuration to devices.
  • DORA stands for Discover, Offer, Request, and Acknowledge.
  • DHCP commonly assigns IP addresses using a lease.
  • DHCP can provide an IP address, subnet mask, gateway, and DNS server information.
  • A DHCP Relay can forward DHCP requests between different networks.
  • DHCP makes network administration easier by reducing manual IP configuration.
Remember: DORA = Discover → Offer → Request → Acknowledge ????

Start Your Networking Journey with ATN Campus

Want to learn DHCP, routing, switching, subnetting, network security, and other essential networking concepts through practical training?

ATN Campus offers industry-focused networking and cybersecurity training designed to combine theoretical knowledge with practical hands-on experience.

Courses Available

  • CCNA – Cisco Certified Network Associate
  • CCNP – Cisco Certified Network Professional
  • CEH – Certified Ethical Hacker
  • Cisco CyberOps
  • Network Security
  • Cloud Networking
  • Python for Network Automation
  • Practical Networking Labs
  • Cybersecurity Fundamentals
  • Career Guidance & Certification Preparation

Whether you're a beginner starting your networking journey or preparing for a professional certification, ATN Campus can help you develop the practical skills needed for today's IT industry.

???? Learn networking. ???? Practice with real-world labs. ???? Prepare for certifications. ???? Build your IT career with ATN Campus.
Document ATN CAMPUS