DHCP gives devices an IP address and other network settings automatically. The client uses UDP port 68 to contact a server on port 67, which then offers a lease. When devices sit on separate subnets, a DHCP relay forwards the messages so they can still reach the server.

Multiple Choice

What is DHCP and what ports does it use?

DHCP automates IP address and network configuration by using UDP, specifically ports 67 and 68. A client sends a broadcast from its UDP port 68 to the server’s UDP port 67 to find a DHCP server. The server replies from port 67 to port 68 with an offered IP and settings. After the client requests the configuration, the server confirms with a lease acknowledgment. When devices are on different subnets, a DHCP relay agent forwards these messages toward the DHCP server, allowing the same port-based communication to work across subnets. This is why DHCP is described as providing automatic IP assignment via UDP ports 67 (server) and 68 (client), with relay as needed for subnets. Other options describe unrelated protocols or scenarios: video hardware protocols don’t use DHCP, and file sharing typically uses SMB on TCP 445. Manually assigning IPs doesn’t involve DHCP or these ports.

DHCP and UDP Ports 67 and 68: How Devices Get on the Network

When a laptop joins a network, it needs more than a Wi-Fi password. It also needs an IP address, a subnet mask, and usually details such as a default gateway and DNS servers. The Dynamic Host Configuration Protocol, or DHCP, supplies these settings automatically. That saves people from entering network details by hand every time they connect a device—and gives desktop support teams a clear set of clues when a device can’t get online.

DHCP uses UDP ports 67 and 68. A DHCP server listens on UDP port 67, while a DHCP client uses UDP port 68. Those numbers matter because they help identify DHCP traffic during network troubleshooting. But the exchange itself is just as useful to understand: a client asks for settings, a server offers them, and the client and server confirm the arrangement.

What DHCP does for a device

Think of an IP address as a device’s local mailing address. Without one, the device may be connected to the network hardware but unable to communicate in the usual way. DHCP gives it an address and can also provide other essential settings, including:

  • The subnet mask, which defines the local network range

  • The default gateway, which directs traffic to other networks

  • DNS server addresses, which help turn names such as example.com into IP addresses

  • The length of time the address is assigned, known as the lease period

A DHCP server can run on a dedicated server, a router, or another network device. In a small home network, the router often handles the job. In a larger workplace, DHCP may be managed centrally, with separate address scopes for different subnets or groups of devices.

This arrangement keeps network settings consistent. It also cuts down on manual errors. A mistyped address or an address already in use can cause a frustrating conflict; DHCP helps avoid that by handing out addresses from a managed pool.

The port numbers: 67 for the server, 68 for the client

DHCP uses UDP, rather than TCP, for its standard client-server messages. UDP is a lightweight transport protocol that doesn’t set up a connection in the same way TCP does. That suits DHCP’s early steps: a newly connected device may not yet have an IP address, so it needs a way to ask for network settings before ordinary communication is possible.

The standard port roles are:

  • UDP 67: used by the DHCP server

  • UDP 68: used by the DHCP client

When a client starts up without an address, it sends a broadcast message from UDP port 68 toward UDP port 67. A broadcast is a message sent across the local network segment so that available DHCP servers can hear it. The client doesn’t yet know which server to contact, or even which IP address it will receive, so broadcasting makes sense.

The server responds with an offer, typically from port 67 to the client’s port 68. The client then requests the offered configuration, and the server acknowledges the request. The ports stay the same through this exchange, though the message details and addressing can vary as the process moves along.

A closer look at the DHCP exchange

The initial exchange is often summed up as DORA: Discover, Offer, Request, Acknowledge. It’s a handy way to remember the basic flow, and it also gives support staff a simple troubleshooting map.

  1. Discover: The client broadcasts a message to locate DHCP servers.

  2. Offer: A server offers an available IP address and configuration details.

  3. Request: The client asks to use the offered address.

  4. Acknowledge: The server confirms the assignment and lease.

Picture someone arriving at a busy office without knowing which desk is free. They ask around, receive an offer, confirm that they’ll take it, and get the arrangement recorded. DHCP works in a more technical way, of course, but the underlying idea is similar: the device requests help, and the server assigns a suitable address from its available pool.

A DHCP lease is not always permanent. It lasts for a set period, after which the client renews it or gets a new assignment. Often, a device keeps the same address for long stretches, so renewal happens quietly in the background. This can make DHCP feel invisible—right up until something goes wrong.

What happens across subnets?

Broadcasts normally stay within the local subnet. That creates a challenge when a DHCP server sits on a different subnet from the client. If the client’s broadcast can’t reach the server, the server won’t see the request.

That’s where a DHCP relay agent comes in. Often configured on a router or Layer 3 switch, the relay receives the client’s local broadcast and forwards the request toward a DHCP server on another subnet. The server can then reply through the relay, which passes the response back to the client.

A relay doesn’t replace ports 67 and 68. It helps DHCP messages travel between networks where a direct broadcast would not. In a managed environment, the relay configuration must point to the right DHCP server, and network rules must allow the traffic through. A missing or incorrect relay setting can leave one subnet without addresses even while devices on another subnet work normally.

Troubleshooting DHCP without guesswork

When a device can’t obtain an address, start with the simplest checks. Is it connected to the right wired network or Wi-Fi? Does the problem affect one device, or several devices on the same subnet? That distinction can narrow things down fast.

If one device is affected, check its network adapter and confirm that it’s set to obtain an IP address automatically when that’s the intended setup. On Windows, ipconfig /all shows the device’s address, DHCP status, lease details, gateway, and DNS servers. An address beginning with 169.254 often indicates that Windows assigned itself a link-local address after it failed to get a DHCP response. It doesn’t prove the server is down, but it’s a useful clue.

If many devices are affected, look beyond a single laptop. The DHCP scope may have run out of available addresses. The server service may be unavailable. A relay may be missing or misconfigured, or a firewall rule may be blocking DHCP traffic. Checking server logs and network-device configuration can help distinguish among these causes.

Also keep address conflicts in mind. If someone manually assigns an address that DHCP has already given to another device, both may experience connection problems. Reservations can help when a device needs a consistent address: the server ties a particular address to that device’s network adapter identity while still managing the assignment centrally.

DHCP is not the same as manual addressing

A manually configured IP address doesn’t come from DHCP. Someone enters the address and related settings directly on the device, so the DHCP exchange—and its UDP ports—doesn’t assign that address. Manual addressing can be useful for certain network equipment, but it requires careful management to avoid conflicts and incorrect settings.

It’s also worth separating DHCP from other network services. For instance, SMB file sharing commonly uses TCP port 445; that’s a different job from assigning IP configuration. Knowing which service a port belongs to helps turn a vague “the network is broken” report into a more focused investigation.

DHCP is one of those quiet services that makes everyday connectivity feel effortless. Its key port numbers are easy to keep straight: UDP 67 for the server and UDP 68 for the client. Add the Discover–Offer–Request–Acknowledge flow and the role of a relay agent, and the behavior becomes much easier to follow. When a device can’t connect, those details offer a sensible place to start.