TechKnowSurge
Cisco CCNA 4.3 Cisco CCNA 4.6 CompTIA Network+ 3.4 CompTIA A+ Core 1 2.6 CompTIA Network+ 1.4 CompTIA A+ Core 1 2.1
VideoNetworkFree

DHCP Process

DHCP is the protocol that automatically assigns IP addresses to devices when they join a network, using a four-step process known as Discover, Offer, Request, and Acknowledge. Understanding how each step works at the packet level — including MAC addresses, IP addresses, and UDP ports — is essential for network administration and troubleshooting.

Complete this video to capture a CTF flag worth 1 point.

About this video

DHCP automates IP address assignment by guiding a newly connected device through a structured four-step process: Discover, Offer, Request, and Acknowledge. When a device first joins a network, it does not yet have an IP address, so it broadcasts a DHCP Discover frame at Layer 2. The frame carries the device's own MAC address as the source, uses 0.0.0.0 as the source IP since no address has been assigned yet, and targets the broadcast address 255.255.255.255 on destination UDP port 67, which is the reserved DHCP server port. The client sends from UDP port 68, the reserved DHCP client port. Because this is a broadcast, the switch floods the frame to all connected devices, allowing any DHCP server on the segment to receive it. Any DHCP server that receives the Discover message responds with an Offer. At this stage the server knows the client's MAC address from the discovery frame, so it can address the offer directly to that device. The server uses its own IP as the source, offers a proposed IP address as the destination IP, and reverses the port roles — sourcing from port 67 and delivering to port 68. If multiple DHCP servers are present, the client may receive multiple offers simultaneously. The client selects one and broadcasts a Request, specifying which server's offer it is accepting. The broadcast format is intentional: it ensures that all servers on the network — including those whose offers were not accepted — can see the request and return their reserved addresses to their available pools. The selected server then sends an Acknowledgement back to the client, confirming the address assignment and completing the exchange. From that point forward, the client holds a valid IP address and can send standard addressed frames across the network. Deploying two or more DHCP servers is a common redundancy practice. If the primary server goes offline, the secondary continues fielding requests without service disruption, ensuring that new devices can always receive address assignments. Each server maintains its own pool of available addresses, and the broadcast nature of the Request step keeps those pools synchronized by allowing non-selected servers to reclaim offered addresses automatically.

What you'll learn

What's covered

DHCP Process

Aligned to

Cisco CCNA
4.3 Explain the role of DHCP and DNS within the network
4.6 Configure and verify DHCP client and relay
CompTIA Network+
3.4 Given a scenario, implement IPv4 and IPv6 network services
1.4 Explain common networking ports, protocols, services, and traffic types
CompTIA A+ Core 1
2.6 Compare and contrast common network configuration concepts
2.1 Compare and contrast Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) ports, protocols, and their purposes

Key terms

Dynamic Host Configuration Protocol
DHCP
A network protocol that automatically assigns IP addresses and other configuration parameters to devices on a network.
Media Access Control
MAC
A sublayer of the Data Link layer that controls how devices on a network gain access to a medium and transmit data.
IP Address
A numerical label assigned to each device connected to a network that uses the Internet Protocol.
User Datagram Protocol
UDP
A connectionless transport protocol that sends data without establishing a connection or guaranteeing delivery.
Layer 2
The Data Link layer of the OSI model, responsible for MAC addressing and frame delivery on a local network.
Layer 3
The Network layer of the OSI model, responsible for logical addressing and routing packets between networks.
DHCP Discover
The first step of the DHCP process in which a client broadcasts a message to locate available DHCP servers on the network.
DHCP Offer
The second step of the DHCP process in which a DHCP server responds to a client's discovery message by offering an available IP address.
DHCP Request
The third step of the DHCP process in which the client broadcasts its acceptance of a specific server's offered IP address.
DHCP Acknowledge
The fourth step of the DHCP process in which the DHCP server confirms the IP address assignment to the client, completing the exchange.

Transcript

The Four-Step Process

When a machine connects to the network, it needs an IP address, and it's going to get it through DHCP. In this example right here, we're going to say that both of these are DHCP servers. The reason why you would have two DHCP servers is because if one goes offline, then the other one will be online to fulfill those requests. A lot of times you'll have a couple of different DHCP servers on your network, so we're going to have two here.

This machine is going to send out what's called a DHCP discovery and says, "Hey, I need an IP address, please give me the information you've got." Then one or both of these machines will respond back. That response back is called the DHCP offer — they're offering an IP address to this machine. The next step is this machine is going to request one of those. If it's getting two offers from two different servers, then it's going to request one of those IP addresses from one of those servers. Finally, there's an acknowledgement that happens back that says, okay, you've got it. So that's the four-step process: a discovery, an offer, a request, and an acknowledgement.

DHCP Discovery

Let's take a look at this DHCP process a little more in depth. The first thing that happens when this machine connects to the network is it's going to send out a DHCP discovery frame. I'm calling it a frame because it's going out layer 2, right? So on the layer 2 on this network, this local area network, it's going to send this frame out, and it knows its own MAC address. It has a MAC address that's burned onto that network card. It doesn't get that information, it already has that information, so the sender can use its own MAC address as it sends it out on the network.

What's going to happen then is that's going to be sent out as a broadcast. A broadcast is all Fs in the MAC address, so it's going to send it out to the switch with all Fs in the MAC address. It doesn't know where it's going to send to. It doesn't know its own IP address, so that's 0.0.0.0. Then it's going to send it out to a destination IP address of 255.255.255.255, which is a broadcast IP address. It's going to use as the source port a UDP port of 68, and it's going to use UDP port 67 as the destination port. So this is the server, this is the client.

It's going to send this out. It is a broadcast, so this switch will broadcast it out in all other directions. It's going to send out this DHCP discovery. In this example right here, we're going to say that these two servers are both DHCP servers, and we'll see how this interplays with two DHCP servers on your network.

DHCP Offer

The next step in this process is the DHCP offer. The DHCP offer is going to be these machines, these DHCP servers, making an offer to this computer right here.

Now, it actually knows the destination MAC address. This machine, as it sent the discovery out there, had its own MAC address in there, so it can send it directly to this machine right here. So it's sending from these machines, and of course they know their MAC address. The sender MAC will be the sending machines, or these servers right here. The destination MAC address will be of this machine right here. The source IP address will be of these machines as it sends it out, because they have an IP address that's assigned to them, so that'll be the source IP. The destination IP is going to be what they're offering, the IP address that they're offering. So these machines are going to be offering an IP address to this machine right here. The source port is going to be 67 and the destination port is going to be 68 — 67 because it's sourcing from the server, and 68 because that is the client machine.

So that is going to be the offer that's going to be sent there. This machine is going to get two offers, because there are two DHCP servers out there.

DHCP Request

Now this machine is going to request one of those, so it's going to do a DHCP request. Let's say it's going to request the IP address that was sent by this machine. So it's going to send it out, and of course it knows the destination MAC address. But look — even though it knows the destination MAC address, because it's received a frame from this machine already, it still sends a broadcast out. It's sending all Fs, and 255.255.255.255 for the IP address. So this is still a broadcast as it sends it out.

The question is, well, why would it send a broadcast out that's going to be sent out in all the directions? The reason for this is it's accepting the IP address from this machine right here, but this machine also made an offer. It is a broadcast because then this information gets the frame in there, and that machine realizes that you are actually accepting or requesting the IP address from the other machine. So then it can actually put that back into its pool to be handed out to someone else.

DHCP Acknowledgement

Versus this machine, which will then take the next step, which is going to be to acknowledge that you accepted the IP address that it sent. As this machine has the acknowledgement and it is sent back, it can do the sender's MAC address, destination MAC address, its source IP and the destination IP. Once again the source will be from the server, so it's UDP port 67, and the destination is to the client, so it is the destination of UDP port 68.

Then it completes this exchange and is successful with this exchange. It knows all this information because it's just a standard frame at this point in time, because it's got all of the information it needs for communication back and forth. From here on forward, this can send standard frames out onto the network.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →