Every time you use your computer or smartphone to go online, dynamic host configuration protocol (DHCP) is working in the background. While you probably will not have to configure your DHCP settings unless you’re a network administrator, it’s still good to know what DHCP is and how it works. In this guide to DHCP, we’ll cover: Before we talk about DHCP, we need to talk about public and private IP addresses . Also for more information you should check static and dynamic IP . IP addresses are a string of numbers assigned to you when you go online. They work a lot like mailing addresses — they tell websites where to send data after you’ve requested it. You can read our full guide to IP addresses to go more in-depth. When you set up an internet connection in your home, you usually pay for the service from an internet service provider (ISP). ISPs have whole databases of IP addresses that they can assign to their customers, and they will assign a public IP address to your home router or gateway . Your home router uses this IP address to receive and send information from the rest of the web. But when you’re at home, you probably use multiple devices that are connected to the internet. If you’re like many households, you might have four people in your family with smartphones, three people with laptops, two people with tablets, a Roku, a PlayStation, your TV, and three light bulbs. In order for your router to send the Call of Duty data to your PS5 and the YouTube videos to your daughter’s tablet and not the other way around, it needs to know the address of each device. So, all your devices have a private IP address. This is in addition to the public IP address your router uses. So what does this have to do with DHCP? Just wait; we’re getting there! Only your public IP address has to be unique. Your various devices won’t keep the same IP address every time they access the internet, so they can basically “share” a pool of private IP addresses. Public websites like Google don’t need to know what your private IP address is; they just need to know your public address. Google sends the data to your public IP address, which is associated with your router. Your router then sends the data to the correct device on your network, because the router knows what all the private IP addresses for each device are at a given time (private IP addresses are dynamic and constantly changing). That all makes sense, right? Okay, now we’re ready to explain DHCP. At home, you have several devices with private IP addresses. It would be really annoying if you had to manually assign the IP address to your smartphone every time you wanted to use it, right? That’s why routers use DHCP. It helps internal networks, like your home network, assign and manage IP addresses for each of your devices. Depending on the size of your household, you probably don’t have more than 10 devices connected to your home network at one time. Imagine a company that may have 100, 500, or even a thousand devices connecting to the same internal network. This is where DHCP becomes much more useful. Network administrators can use DHCP to set up time limits, so the same device doesn’t use the same IP address for more than a few minutes. They can also ensure that inactive devices aren’t using an IP address that can be given to someone else. It makes managing an internal network a whole lot easier. The important thing to remember about DHCP is that it’s a protocol for internal networks. And it’s not used to assign public IP addresses but private ones. The DHCP server is one of the most important components of DHCP. In most home internet setups, the DHCP server is actually a router. It manages requests for IP addresses from the network and keeps a record of all the IP addresses it assigns and to which devices it assigns them. It also maintains an IP address pool to choose from. The DHCP can tell different devices on the network apart using a media access control (MAC) address . The MAC address on each device is different, so it helps the DHCP server tell the devices apart. That way, no two devices get the same IP address. DHCP is a client-server protocol — a way for humans to get information from websites. You are the client in this interaction, and you communicate with a DHCP server. Network admins use DHCP servers to set up rules for assigning clients (that’s you) an IP address. These rules could be: We’ll cover some of these rules in more detail in the below sections. The client is one of the other main components in the DHCP process, apart from servers and relay agents. The client is you, or rather, your device. Your computer, phone, gaming console, refrigerator, cat food distributor, or any other gadget you have that connects to the internet is a client. The client can connect to the internal network and communicate with the DHCP server in order to get an IP address and go online. The communication between the DHCP server and client is a very specific process known as a DHCP handshake. Here’s how it works: A DHCP relay agent manages requests sent between DHCP clients and servers. In a typical household network, relay agents aren’t necessary as the number of devices going online is limited. They’re more useful in organizations with larger networks and a lot more devices, especially if they’re using a remote DHCP server. With all the requests going back and forth between DHCP clients and servers in a company setting, you need a go-between to keep things running efficiently. An IP address pool is what it sounds like — a pool of IP addresses that are available to use within a network. A DHCP server manages an IP address pool so it knows which addresses it can allocate to a client when that client requests an IP address. A subnet mask helps internet traffic get to its destination faster. It divides an IP address into two parts to identify which part is the host (or client) and which part is the network. A subnet mask also defines the range of IP addresses that can be used within a network or subnet. To better understand this concept, it helps to know what a subnet is. A subnet is a network within a network — subnet is a shortened version of “subnetwork.” They help make large networks run more smoothly and allow traffic through the network to travel shorter distances to get to its destination. You know how the shortest distance between two points is a straight line? Well, subnets help make the lines connecting nodes on a network a little straighter, allowing data to travel the most direct route possible. To understand subnet masks, you should also know what the different parts of an IP address mean and what the different classes of IP addresses are. In an IP address, some of the numbers indicate a network and some indicate a host or device. Because there are so many IP addresses, they’re broken up into categories or classes. There’s class A, B, C, D, and E, although D and E aren’t used much. Subnets help internet routers find the right network to send their data to, especially in larger class A networks. But an IP address only indicates a network and a device, it doesn’t indicate a subnet. So how does the router know which subnet to go to? with this paragraph: One way to manage this is by configuring the subnet mask, which can change an IP address ‘s way of identifying networks and devices, allowing routers to properly direct traffic to the correct subnet within a larger network. Now we can get to subnet masks. Subnet masks help routers figure out which part of the IP address is the network and which part is the host. They’re like little codes written over the IP address (thus the “mask”) as a shorthand for the router. When a router receives a data packet, it uses a subnet mask of 255.255.255.0, determines what the device address is, and then sends the data to the router associated with the proper subnet. Think of it this way: You work in the marketing department at a large company. When someone sends you mail, the administrative team doesn’t take your mail directly to you. They take it to the marketing department, which then gives it to you. In this example, the marketing department is the subnet mask, and you are the IP address. It’s simply a way to speed up the process of getting data delivered to the right place. In a DHCP setup, lease time refers to the amount of time the DHCP server lets the client use a given IP address. When configuring the network, administrators can set a rule that a device can only have one IP address for a certain period of time before it has to get a new one. The DHCP server will adhere to this rule and when it sends an IP address to the client during the DHCP handshake, it will let the client know what the lease time is. A gateway address is also referred to as a default gateway. It’s like the door data has to go through when it passes out of your internal network and onto the internet. When you want to go to Google.com, for example, your request has to go to the default gateway first before leaving your local network. For most home networks that have one router with multiple connected devices, the IP address of your router is the default gateway IP address. Essentially, your gateway and router are the same. It’s the first point of contact for your local network to receive any traffic that comes from an outside network. It’s pretty easy to find your gateway address too, whether you’re on Windows or a Mac. DHCP certainly makes things easier for local networks. Some of the main benefits of DHCP are: While DHCP is a basic function that most local networks need to operate smoothly, it does have some drawbacks. The average consumer doesn’t need to worry about them, but you may want to understand what they are. Tracing internet activity : Tracking internet activity is more difficult with DHCP in place because the same device may have two or more IP addresses over a given period of time. DHCP is a crucial part of any local network, improving reliability and speeds by quickly managing data. The way IP addresses work now, you need DHCP to be able to browse the web on any device you want. It’s especially important for larger networks that have scores of different devices connecting and disconnecting at any given moment. DHCP is currently our best form of connecting devices to the networks we use every day.
Related articles
Best Phone Service: Useful Tips for Selection
Selecting your first cell phone plan or looking to upgrade your current one? When choosing a mobile…
How Does a Firewall Work? Protecting Your Network Explained
For as long as there are computers connected to the Internet, there will be hackers trying to make …
Scam Survivor Support Groups: Find Resources and Healing
No matter how careful you are, you can still fall victim to an online scam . Scammers have upped th…
Computer Repair Privacy: Concerns and How to Protect It
Professional computer technicians are incredibly useful for a range of computer issues, whether you…