How DHCP Works

It’s the hidden staple of modern day life.

A device connects wirelessly/plugs into a network and after a few minutes everything just… works (usually). You can browse the internet just fine and its like nothing much was done at all.

But how exactly does that work? What happened there behind the scenes? One aspect of the invisible process is the allocation of an IP address to your device. This post will take a brief look at how the DHCP process assigns an IP to devices on the network.

Let’s begin.

The DORA Process

The easiest way to remember the sequence of events that occurs is to use an acronym known as DORA.

DORA stands for:

  • Discover
  • Offer
  • Request
  • Acknowledge

Let’s go through each stage one by one to see how exactly it works.

Discover

When a device first connects to a network, it sends a broadcast to everything on the same subnet known as the DHCP Discover message. This uses UDP and is sent to the broadcast address 255.255.255.255.

DORA Discover.png

Offer

Once the designated DHCP Server receives a Discover message, it sends out its own DHCP Offer message (again as a broadcast).

This Offer message contains information such as (but not limited to) the IP the DHCP Server has available to lease to the device, the Default Gateway, Subnet Mask and Lease Time.

DORA Offer.png

Request

Upon receiving the DHCP Offer message from the DHCP Server, the device then decides to accept the offer made by the DHCP Server.

It does this by sending a DHCP Request message, essentially ‘requesting’ the IP information that was previously ‘offered’ by the DHCP Server.

DORa Request.png

Acknowledge

The final stage of the process is known as the ‘Acknowledge’ step.

This is when the DHCP Server ‘acknowledges’ the fact that the device has officially ‘requested’ the ‘offered’ information.

DORA Acknowledge.png

At this stage, the device in questions now has its own IP on the network, it knows how long it can have that IP for, its Subnet Mask and Default Gateway as a bare minimum.

With this information it is now a fully functioning device on the network.



Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Subscribe to Blog

Enter your email below to subscribe to this blog.

Ads