Table of Contents

DHCP

DHCP (Dynamic Host Configuration Protocol) is a network protocol that automatically assigns IP configuration to devices on a network.

Instead of manually configuring every computer, DHCP provides network settings automatically when a device joins the network.

Typical information assigned by DHCP includes:


Why Is DHCP Needed?

Without DHCP, every device would need to be configured manually.

For example:

IP Address:
192.168.1.25

Subnet Mask:
255.255.255.0

Default Gateway:
192.168.1.1

DNS Server:
8.8.8.8

For a home with a few devices this may be manageable, but for schools, offices, or enterprises with hundreds or thousands of devices, manual configuration would be impractical.

DHCP automates this process.


How DHCP Works

When a device connects to a network, it typically performs four steps.

Client
   │
   │ 1. DHCP Discover
   ▼
DHCP Server
   ▲
   │ 2. DHCP Offer
   │
Client
   │
   │ 3. DHCP Request
   ▼
DHCP Server
   ▲
   │ 4. DHCP Acknowledgement (ACK)
   │
Client receives its IP configuration

This process is commonly called the DORA process:


Example

A laptop joins a Wi-Fi network.

The DHCP server assigns:

IP Address:
192.168.1.25

Subnet Mask:
255.255.255.0

Gateway:
192.168.1.1

DNS:
8.8.8.8

The user does not need to enter any of these values manually.


DHCP Lease

DHCP assigns addresses for a limited period called the lease time.

Example:

Lease Time

24 hours

Before the lease expires, the client usually requests to renew it.

If renewal succeeds, the device typically keeps the same IP address.


DHCP Server

A DHCP server may be:

In most home networks, the wireless router also acts as the DHCP server.


Static vs Dynamic Addresses

A device may use either:

Dynamic Address

Assigned automatically by DHCP.

Suitable for:


Static Address

Configured manually.

Often used for:


DHCP Reservation

Many DHCP servers support reservations.

A reservation means a particular device always receives the same IP address.

Example:

Printer

MAC Address

00:1A:2B:3C:4D:5E

↓

Always receives

192.168.1.100

This combines automatic management with predictable addressing.


DHCP and IPv6

IPv6 also supports DHCP.

However, IPv6 devices may obtain network information through:

Unlike IPv4, DHCP is not always required in IPv6 networks.


What Happens If DHCP Fails?

If no DHCP server is available, a device may:

Example (Windows):

169.254.x.x

Such an address allows limited communication within the local network but usually does not provide Internet access.


DHCP and Telenegar

Current Telenegar Internet tools do not directly display DHCP information because DHCP operates only within the local network.

However, understanding DHCP helps explain why:


Common Misconceptions



dhcp ip networking ipv4 ipv6 dora