TechKnowSurge
Cisco CCNA 4.3 CompTIA Network+ 3.4 CompTIA A+ Core 1 2.6 Cisco CCST Networking 1.5 Cisco CCNA 4.6 CompTIA Server+ 2.2
VideoNetworkFree

DHCP

DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses and other essential network configuration—such as subnet masks, default gateways, and DNS servers—to devices when they connect to a network. It eliminates the need to manually configure each device, making it the standard approach for network address management in modern environments.

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

About this video

DHCP, or Dynamic Host Configuration Protocol, is the standard mechanism for automatically delivering network configuration to devices when they join a network. At minimum, a device needs an IP address and subnet mask to communicate locally, a default gateway to reach external networks, and a DNS server to resolve hostnames—without this information, it cannot participate in network activity. Rather than configuring each device by hand, DHCP allows a server, router, or Layer 3 switch to respond to requests from connecting clients and supply all of this information dynamically, making the process seamless whether a device is joining the network for the first time or returning after being used elsewhere. Beyond core addressing, DHCP supports a numbered options system that allows administrators to pass additional configuration to devices at connection time. Common options include NTP server addresses for clock synchronization, domain name information to streamline local resource lookups, and vendor-specific data used by equipment such as wireless access points to locate their controllers or by diskless machines to retrieve boot images over the network. This flexibility makes DHCP useful not just for end-user workstations but for a wide range of networked infrastructure. DHCP also supports multiple address allocation methods. Dynamic allocation assigns any available address from a configured pool, while a manual reservation ties a specific IP address to a device's MAC address so that the same address is always issued to that device. Automatic allocation works similarly to dynamic but records the MAC-to-address mapping after the first assignment, effectively creating a persistent reservation without administrator intervention. Administrators should also be aware of BOOTP, DHCP's predecessor protocol, which is still encountered in some legacy environments, though DHCP has largely replaced it due to its broader feature set.

What you'll learn

What's covered

DHCP Overview

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.
CompTIA A+ Core 1
2.6 Compare and contrast common network configuration concepts.
Cisco CCST Networking
1.5 Describe common network applications and protocols
CompTIA Server+
2.2 Given a scenario, configure servers to use network infrastructure services.

Key terms

Dynamic Host Configuration Protocol
DHCP
A network protocol that automatically assigns IP addresses and other configuration parameters to devices on a network.
IP Address
A numerical label assigned to each device connected to a network that uses the Internet Protocol.
Subnet Mask
A 32-bit number that divides an IP address into network and host portions.
Default Gateway
The router that a device uses to send traffic to destinations outside its local network.
Domain Name System
DNS
A hierarchical naming system that translates human-readable domain names into IP addresses.
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.
DHCP Options
Numbered configuration parameters delivered by a DHCP server to clients beyond the basic IP settings, such as DNS servers, default gateway, NTP servers, and vendor-specific instructions.
DHCP Reservation
A manual DHCP allocation that permanently assigns a specific IP address to a device based on its MAC address, ensuring it receives the same address each time it connects.

Transcript

What a Device Needs to Function on a Network

We're going to be talking about DHCP, or Dynamic Host Configuration Protocol. When a device accesses a network or connects to a network, it's going to need to be able to get certain information for it to be able to function.

As an example, we have a laptop. A laptop is a mobile design device. It's made to be portable, it's made to go from network to network. Yet if we connect it to a network and it doesn't have the proper information, it's not going to be able to do anything on that network.

A computer will need an IP address to communicate on a local area network. It's going to need a mask in order to communicate on the local area network. It's going to need this information to communicate with most protocols on the network. Also, if it needs to communicate with another remote network, it's going to need a default gateway. Most of the time what we do on a computer is going to be getting on and accessing other websites, and being able to get email and get services that are on other networks, and so it's going to need a gateway in order to get out to other resources.

Another thing is that generally we don't use IP addresses to access all of our stuff. Unless you're an administrator and you need to manage certain devices, most of the time most users are accessing things using URLs and names, and so we need a DNS server in order to make that translation. There are other things that are involved with this also, but this is the basics of what this machine is going to need in order to function well on this network.

We could statically assign this. We could go onto this computer and set it up with an IP address, a mask, a gateway, a DNS. But then the problem is when we move that to another network, it won't be able to access that other network until we go and statically change that static information so it can get access to a whole other network. That is why most networks that we have nowadays are using some sort of DHCP, or Dynamic Host Configuration Protocol.

It could be another server that's on the network. It could maybe be another piece of hardware, like a router or a layer 3 switch that's on that network. So we have other devices that are capable of being able to hand out this same information.

I listed out a few things that can be relayed to this device, but there could be a lot of other things that are relayed to this device also. There's a lot of information that can be handed out through Dynamic Host Configuration Protocol, but this is the basics of it.

DHCP and BOOTP

One thing I want to call out, because you could see this in your networks out there, is that there is DHCP but there's also BOOTP. BOOTP is the predecessor to DHCP. There are still components out there, there are still things that you'll see out there that will operate off of BOOTP, although it's becoming less and less common. DHCP has the more full set of features and offers a lot more, but just know that you could see BOOTP out there as well.

Passing More Than IP Addresses

As I mentioned, Dynamic Host Configuration Protocol is primarily for issuing IP addresses along with other information to these different devices. So when a device connects to your network it can get certain information, but it can pass off a lot of different information.

An example of some things that I've used before is when phones connect, or wireless access points connect, then they will get additional information such as what devices they need to connect to in order to function correctly. An example of this wireless access point right here: maybe you set up what's called an option on DHCP, so when this device connects it will get that additional option information and know what controller it needs to talk to to get certain things. When this access point comes online, it'll get that information through DHCP and says, "Okay, I need to establish a connection with my controller," and that controller may then give it certain information like firmware and update the firmware. And perhaps there's some sort of tunneling that's happening, so all of the information that's coming across this access point gets tunneled to that controller. It allows us to tell certain equipment out there certain pieces of information that it needs in order to function correctly.

Another example is maybe we have a machine out there that needs to be reimaged. We can set it up so that when we boot up this machine, it'll look out for a server where it's going to actually get its bootup information, and perhaps that bootup information comes over to this machine and allows us to install an image on that machine.

I know there are a lot of things there that maybe you haven't dealt with before, but in essence what I'm saying is that we can give each of these machines specific instructions on how to operate, or how to turn on and where it needs to communicate, so that it can function with a full feature set, with everything that we want it to function like. And we can do that through Dynamic Host Configuration Protocol.

DHCP Options

We give this information through DHCP options. There are certain things that we turn on. For instance, we've already talked about things like the subnet mask, in order to be able to specify what the subnet mask is; what routers, or the default gateways, that it needs to access the rest of the world; what DNS servers. Those options all come with numbers that are associated with them. So we turn on these different options of things that are going to get relayed to these machines.

It'll also, if we want to do some sort of logging, allow it to log information as it turns on. Or if there is a domain that we're on — and we'll talk more about when you're part of a domain a little bit later — you can become part of a domain when you're on the network, and that gives some extra shortcuts for when we do searches for different resources on the network. Then also NTP servers, network time protocol servers that are on that, so that your clock is synced with other clocks that are on that network.

So DHCP, once again, has different options that we can set to relay information to the devices that connect to our network.

Allocation Types

There are also different allocation types. In most of the cases what we're doing is just dynamic. You connect this device to it, it goes and reaches out and says, "Hey, I need an IP address," and then one of these servers responds back with, "Okay, here's an IP address," and then this will get an IP address. But there are a couple other than just dynamic allocation. We do have automatic, and manual or reserved.

A reservation would be: let's say I wanted this machine right here to get the same IP address every time. So I go and find the MAC address of this machine and add a reservation that says every time this MAC address requests an IP address, I want it to have this IP address, and it's a specific IP address. Then when this machine goes and makes the request, this server right here sees the MAC address that it's coming from and says, "Okay, here is your reservation. This is what you're going to take." So that is a reservation, or a manual.

So we have dynamic, which is just giving any IP address within the range. We have a reservation, which is something that's specific to the MAC address, so when that MAC address connects it's going to get that same one. And then we have an automatic. An automatic says that when devices connect they will get an IP address, but this server is also going to record the MAC address that's getting that IP address, so that every time this machine connects to this network it's going to get the same IP address every single time. Essentially it's an automatic reservation — it's going to create a reservation for that machine, but it's going to do it in an automatic fashion rather than me manually typing out a MAC address.

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 →