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.
DHCP Overview
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.
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.
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.
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.
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.
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 →