Skip to content
Explore the learning library ☟
◎ Google Translate
SanchitGurukulTechnology · Education · Innovation Take a quiz

DHCP Explained: DORA Process, Lease Renewal, DHCP Relay, Options and Security

Dynamic Host Configuration Protocol, or DHCP, is a client-server protocol that automatically provides devices with the IP configuration they need to communicate on an IPv4 network.

Instead of manually configuring every computer, phone, printer, or other endpoint, DHCP can automatically provide information such as:

  • IPv4 address
  • Subnet mask
  • Default gateway
  • DNS servers
  • DNS domain name
  • Lease duration
  • Other DHCP options

DHCPv4 is primarily defined by RFC 2131, while DHCP options are defined by RFC 2132.

This article focuses primarily on DHCP for IPv4 (DHCPv4). DHCPv6 is a separate protocol with different messages and behavior.

DHCP Network Architecture

Why DHCP Is Used

Every IPv4 device normally needs appropriate network configuration before it can communicate with other networks.

For example:

ConfigurationTEXT
IP Address: 192.168.10.25
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.10.1
DNS Server: 192.168.10.10

Without DHCP, an administrator might need to manually configure this information on every device.

That quickly becomes difficult in networks containing:

  • Hundreds or thousands of computers
  • Mobile devices
  • IP phones
  • Printers
  • Wireless clients
  • Virtual machines
  • Branch offices

DHCP centralizes much of this configuration.

DHCP Scope

A DHCP server normally manages one or more scopes.

A scope represents an address range and associated configuration for a particular subnet.

Example:

ConfigurationTEXT
Subnet: 192.168.10.0/24
DHCP Pool: 192.168.10.50 - 192.168.10.200
Default Gateway: 192.168.10.1
DNS Servers: 192.168.10.10, 192.168.10.11
Lease Duration: 8 Hours

When a client connects, the DHCP server can lease one of the available addresses.

DHCP Lease

A dynamically assigned address is normally provided for a limited period called a lease.

The client can use the address while the lease remains valid.

Before the lease expires, the client normally attempts to renew it. This allows addresses that are no longer required to eventually return to the pool for reuse.

DHCP Reservations

Administrators can create DHCP reservations so a particular client consistently receives a specific IP address.

How the client is identified depends on the DHCP implementation. For example, Windows DHCP reservations commonly associate an IP address with the client’s network-interface MAC address.

Reservations are useful for devices such as:

  • Printers
  • IP phones
  • Network appliances
  • Devices requiring predictable addresses

Critical infrastructure such as routers, firewalls, servers, and network services may still use manually managed static addresses depending on the network design.

Exclusion Ranges

Not every address in a subnet should necessarily be dynamically assigned.

For example:

ConfigurationTEXT
Subnet: 192.168.10.0/24

Reserved Infrastructure Range:
192.168.10.1 - 192.168.10.49

DHCP Dynamic Pool:
192.168.10.50 - 192.168.10.200

The infrastructure range can be excluded from dynamic DHCP allocation.

Benefits of DHCP

Centralized Configuration

Network addressing can be managed from a central service.

Reduced Manual Errors

DHCP reduces errors caused by manually entering incorrect information such as:

  • Subnet mask
  • Default gateway
  • DNS server
  • IP address

It can also reduce accidental duplicate address assignments when addresses are properly managed.

Efficient Address Reuse

Unused leases can eventually return to the DHCP pool.

Simpler Client Mobility

Devices moving between networks can automatically obtain configuration appropriate for each subnet.

Additional Configuration Through Options

DHCP can provide much more than an IP address, including DNS servers, gateways, domain information, lease timers, and other parameters.

How DHCP Works: The DORA Process

The best-known DHCPv4 address allocation process is called:

DORA

It stands for:

  1. Discover
  2. Offer
  3. Request
  4. Acknowledge

DHCPv4 uses UDP.

Purpose UDP Port
DHCP Server 67
DHCP Client 68

A newly connected client normally does not yet have a usable IPv4 address and may not know which DHCP server is available.

This is why broadcast communication is important during initial DHCP address acquisition.

Step 1 — DHCPDISCOVER

The client begins by searching for DHCP servers.

A typical initial DHCPDISCOVER uses:

ConfigurationTEXT
Source IP: 0.0.0.0
Destination IP: 255.255.255.255
Source UDP Port: 68
Destination UDP Port: 67

Conceptually, the client is asking:

“Is there a DHCP server that can provide network configuration?”

Multiple DHCP servers may receive the request.

Step 2 — DHCPOFFER

A DHCP server willing to provide configuration can respond with a DHCPOFFER.

An offer might contain:

ConfigurationTEXT
Offered IP Address: 192.168.10.100
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.10.1
DNS Server: 192.168.10.10
Lease Time: 8 Hours

More than one DHCP server can potentially send an offer.

The client can select one of the available offers.

Step 3 — DHCPREQUEST

The client sends a DHCPREQUEST to indicate which offered configuration it has selected.

During initial server selection, this message is normally broadcast so other DHCP servers can also learn that their offers were not selected.

The request identifies the selected server and requested address using DHCP options.

Step 4 — DHCPACK

The selected DHCP server responds with a DHCPACK.

The ACK confirms the lease and provides the final configuration information.

The client can then configure its interface and begin normal IPv4 communication.

The resulting configuration could look like:

ConfigurationTEXT
IP Address: 192.168.10.100
Subnet Mask: 255.255.255.0
Gateway: 192.168.10.1
DNS: 192.168.10.10
DHCP DORA Process Infographic

Other Important DHCP Messages

DORA is important, but DHCP includes several other messages.

DHCPNAK

The server indicates that the client’s requested network configuration is not valid.

DHCPDECLINE

A client informs the server that an offered address appears to already be in use.

DHCPRELEASE

A client informs the server that it is voluntarily giving up its lease.

Correct DHCP operation does not depend on every client successfully sending DHCPRELEASE.

DHCPINFORM

A client that already has an IP address can request additional configuration information without requesting a new address lease.

DHCP Leases, Renewal and Options

DHCP addresses are normally leased rather than permanently assigned.

The client therefore needs a mechanism for renewing its configuration before the lease expires.

Lease Lifecycle

Assume the DHCP server provides:

ConfigurationTEXT
Lease Duration: 8 Hours

RFC 2131 defines two important timers:

  • T1 — Renewal
  • T2 — Rebinding

When alternative timer values are not supplied, default values are calculated from the lease duration.

T1 — Renewal

T1 defaults to approximately 50% of the lease duration.

For an eight-hour lease:

ConfigurationTEXT
T1: Approximately 4 Hours

At T1, the client enters the RENEWING state.

It normally sends a DHCPREQUEST directly to the server that originally granted the lease.

If the server responds with DHCPACK, the lease is renewed.

T2 — Rebinding

T2 defaults to approximately 87.5% of the lease duration.

For an eight-hour lease:

ConfigurationTEXT
T2: Approximately 7 Hours

If the original server has not responded by T2, the client enters the REBINDING state.

The client broadcasts a DHCPREQUEST in an attempt to reach any DHCP server capable of extending the lease.

Lease Expiration

If the lease expires without successful renewal, the client must stop using the leased address and return to the address-acquisition process.

Important DHCP Options

DHCP options carry additional configuration information.

Option Purpose
1 Subnet Mask
3 Router / Default Gateway
6 DNS Servers
15 Domain Name
51 IP Address Lease Time
53 DHCP Message Type
54 Server Identifier
58 Renewal Time
59 Rebinding Time
82 Relay Agent Information

Option 3 — Default Gateway

ConfigurationTEXT
Option 3: 192.168.10.1

Option 6 — DNS Servers

ConfigurationTEXT
Option 6:
192.168.10.10
192.168.10.11

Option 15 — DNS Domain Name

ConfigurationTEXT
Option 15: corp.example.com

DHCPv4 and DHCPv6 Are Different

The DORA process described above is associated with DHCPv4.

DHCPv6 uses different message types and behavior.

A common DHCPv6 exchange can involve:

  1. Solicit
  2. Advertise
  3. Request
  4. Reply

DHCPv6 also does not define a normal default-gateway option.

IPv6 hosts normally discover default routers using IPv6 Router Advertisements (RA) rather than DHCPv6.

DHCP Relay and Centralized DHCP

A DHCP client normally begins by sending a local broadcast.

Routers normally do not forward local IPv4 broadcasts between IP subnets.

This creates a problem when the DHCP server is located on another network.

Consider this example:

ConfigurationTEXT
Client VLAN: 192.168.10.0/24
Router: 192.168.10.1
DHCP Server: 10.10.10.20

The client’s initial DHCPDISCOVER remains within the local subnet and cannot reach the remote DHCP server as an ordinary IP broadcast.

A DHCP relay agent solves this problem.

How DHCP Relay Works

The relay agent receives DHCP messages from local clients and forwards them toward the DHCP server.

The server’s reply returns to the relay, which delivers it to the client network.

This allows centralized DHCP infrastructure to serve:

  • Multiple VLANs
  • Multiple subnets
  • Multiple buildings
  • Branch locations

A separate DHCP server is therefore not required inside every subnet.

giaddr — Gateway IP Address

DHCP contains a field called:

ConfigurationTEXT
giaddr

A DHCP relay can populate this field.

The DHCP server can use the information to determine the subnet from which the client request originated and select an appropriate address pool.

Example:

ConfigurationTEXT
Client Network: 192.168.20.0/24
Relay Interface: 192.168.20.1
giaddr: 192.168.20.1

The DHCP server can then select the appropriate scope for:

ConfigurationTEXT
192.168.20.0/24

DHCP Option 82

DHCP relay infrastructure can also use:

Option 82 — Relay Agent Information

Option 82 can provide additional information about where a DHCP request entered the network.

Common sub-options include:

  • Circuit ID
  • Remote ID

This information can help DHCP servers apply more specific address-assignment policies.

When RFC 3046 Option 82 behavior is used, a relay can insert relay-agent information into client-originated DHCP messages.

A compliant DHCP server can echo the information back to the relay, and the relay removes its Option 82 information before delivering the reply to the client.

DHCP Relay Across Multiple Subnets Infographic

Is DHCP Routable?

You may sometimes hear:

“DHCP is not routable.”

That statement can be misleading.

DHCP uses UDP/IP, but the client’s initial local broadcast does not normally cross router boundaries by itself.

A DHCP relay explicitly allows DHCP communication between clients and servers located on different IP subnets.

DHCP Security and Troubleshooting

DHCP provides essential network configuration, which also makes it security-sensitive.

Rogue DHCP Server

An unauthorized device can attempt to operate as a DHCP server.

A rogue DHCP server might provide clients with:

  • Incorrect IP addresses
  • Malicious default gateways
  • Malicious DNS servers
  • Invalid network configuration

This can disrupt connectivity or potentially redirect network traffic.

DHCP Starvation

An attacker may generate large numbers of DHCP requests using fabricated client identities.

The objective can be to consume the available DHCP address pool.

If the pool becomes exhausted, legitimate clients may be unable to obtain leases.

DHCP Authentication

The original DHCPv4 design does not inherently provide strong mutual authentication for ordinary client/server operation.

RFC 3118 later defined authentication mechanisms for DHCP messages.

However, administrators should verify actual operating-system, client, server, and network-equipment support before assuming DHCP authentication is available.

DHCP Snooping

On supported switches, DHCP snooping can provide important Layer 2 protection.

DHCP snooping typically distinguishes between two types of interfaces.

Trusted Ports

Interfaces through which legitimate DHCP server or relay responses are expected.

Untrusted Ports

Client-facing interfaces from which DHCP server responses should normally not originate.

This helps prevent unauthorized DHCP servers from responding to clients.

Depending on the platform, DHCP snooping can also support:

  • DHCP binding tables
  • Rate limiting
  • Option 82
  • MAC verification
  • Integration with other first-hop security features

Troubleshooting — Client Gets No DHCP Address

If a client cannot obtain the expected DHCP address, check the following:

  1. Is the client configured to use DHCP?
  2. Is the switch port operational?
  3. Is the correct VLAN assigned?
  4. Is the DHCP scope active?
  5. Are free addresses available in the pool?
  6. Is the DHCP server reachable?
  7. Is the DHCP relay configured on the correct client VLAN?
  8. Are UDP ports 67 and 68 being filtered?
  9. Is DHCP snooping blocking legitimate traffic?
  10. Is the DHCP server selecting the correct scope?

Windows Client Troubleshooting

View the current configuration:

Command
ipconfig /all

Release the current DHCP lease:

Command
ipconfig /release

Request DHCP configuration again:

Command
ipconfig /renew

Linux Client Troubleshooting

View IPv4 addresses:

Command
ip -4 addr show

View the routing table:

Command
ip route show

The exact DHCP client-management command depends on the Linux distribution and network-management stack.

Capture DHCP Traffic

On Linux, tcpdump can capture DHCPv4 traffic:

Command
sudo tcpdump -nn -i any 'udp port 67 or udp port 68'

The capture can show whether the client sends:

  • DHCPDISCOVER
  • DHCPREQUEST

and whether the server sends:

  • DHCPOFFER
  • DHCPACK
  • DHCPNAK

Wireshark Filter

Use:

ConfigurationTEXT
dhcp

Depending on the Wireshark version and capture, DHCPv4 may also appear with BOOTP-related protocol naming because DHCP uses the BOOTP message format.

Troubleshooting the DORA Process

Key Takeaways

  1. DHCP is a client-server protocol used to automate IPv4 address assignment and related network configuration.
  2. DHCPv4 uses UDP port 67 on the server and UDP port 68 on the client.
  3. Initial DHCPv4 address allocation commonly follows DORA: Discover, Offer, Request, Acknowledge.
  4. DHCP can provide IP addresses, subnet masks, gateways, DNS servers, domain information, lease timers, and many other options.
  5. Dynamically assigned IP addresses are normally leased rather than permanently assigned.
  6. T1 and T2 control renewal and rebinding. Their RFC-defined defaults are approximately 50% and 87.5% of the lease duration when other values are not supplied.
  7. DHCP relay agents allow centralized DHCP servers to serve clients located on different routed subnets.
  8. The giaddr field helps a server identify the relay/subnet context, while Option 82 can provide additional relay-agent information.
  9. Rogue DHCP servers and DHCP starvation are important security concerns. DHCP snooping can provide Layer 2 protection on supported switches.
  10. DHCPv4 and DHCPv6 are different protocols. IPv6 hosts normally discover their default router through Router Advertisements rather than DHCPv6.

DHCP is much more than an automatic IP-address generator.

It is a fundamental network service that directly influences:

  • Client connectivity
  • IP addressing
  • DNS behavior
  • Routing
  • Troubleshooting
  • Network security

A mature DHCP design therefore combines:

  • Correct scope planning
  • DHCP redundancy
  • DHCP relay
  • Monitoring
  • DHCP snooping where appropriate
  • Address utilization monitoring
  • Accurate lease and reservation management

SanchitGurukul Resources

Official Technical References

Your feedback matters

Was this post helpful?

0 reactions

SanchitGurukul — Technology • Education • Innovation

Discussion

0 approved comments

No approved comments yet. You can start the discussion below.

Leave a Comment

No login is required. Name and email are used for moderation/security. Your email is never displayed publicly. All comments require administrator approval.

This field is not used to determine whether a comment is safe.

Plain text only. File uploads, scripts, executable code, abuse and spam are not accepted.


Discover more from SanchitGurukul

Subscribe to get the latest posts sent to your email.

Keep exploring

Related guides

Namaste! I’m SG Saarthi 👋Need help learning or finding something?