Technology Tap: CompTIA Study Guide

DHCP Demystified | IT Skills Development

Juan Rodriguez Season 5 Episode 103

professorjrod@gmail.com

Ever wonder how your phone grabs an IP address the instant you join Wi‑Fi? We break down the invisible handshake that makes it happen: DORA. From discovery to acknowledgement, we map each step of the DHCP exchange, explain lease timers, and show how networks hand out addresses at scale without stepping on their own toes. Along the way, we share practical stories from classrooms, offices, and coffee shops that turn abstract packets into clear mental models.

We go deeper than definitions. You’ll learn how scopes shape address pools, why reservations keep printers stable, and how APIPA exposes broken paths with 169.254.x.x clues. In segmented environments, relays and the GIADDR field become the traffic cops that steer requests to the right subnet; misconfigure them and clients get stranded. Security gets real too: rogue DHCP can poison DNS, starvation floods can exhaust pools, and well‑meaning mesh gear can become a second server. We detail protective moves like DHCP snooping, port security, and rate limiting, plus how snooping’s binding tables feed stronger Layer 2 defenses.

Resilience matters, so we unpack failover strategies—hot standby, load balancing, and legacy split scopes—and the rich set of DHCP options that deliver DNS, NTP, TFTP, and VoIP boot settings. We also tackle IPv6 with a sober lens: where SLAAC fits, when DHCPv6 is still essential, and why economics slow change even as IPv4 addresses remain scarce. If you support users, we hand you a troubleshooting playbook: spot APIPA, check relays, expand scopes, and use ipconfig release/renew to solve issues methodically and ace help desk interviews.

If this helped you see the network with new eyes, tap follow, share with a teammate, and leave a quick review. Got a DHCP puzzle or a rogue gear story? Send it our way and we might feature it next time.

Support the show


Art By Sarah/Desmond
Music by Joakim Karud
Little chacha Productions

Juan Rodriguez can be reached at
TikTok @ProfessorJrod
ProfessorJRod@gmail.com
@Prof_JRod
Instagram ProfessorJRod

SPEAKER_01:

And welcome to Technology Tap. I'm Professor J. Rod in this episode DHCP, the invisible handshake of the internet. Let's tap in the code. I'm your host, Professor J. Rod, and today we're diving into the protocol that quietly assigns every device and identity on the network, DHCP, or dynamic host configuration protocol. Every time you connect your laptop, your phone joins Wi-Fi or your Xbox goes online. DHCP is silently at work, handing out IP addresses, gateways, and DNS settings so that everything just works. You never see it, you never touch it. But without DHCP, every new device will be like a car with no license plate, unable to move on the information highway. So let's pull back the curtains and take a deep detailed journey through how DHCP works, why is it essential, and how to troubleshoot it like a pro. So let's first start off with the definition. DHCP, Dynamic Codes Configuration Protocol, is a network service that automatically assigns IP address and other network configuration parameters, like subnet mass, default gateway, and DNS servers to devices on a network. It operates on applic on the application layer or layer 7 of the OSI model and uses UDP port 67 on the server side and 68 on the client side. Without DHCP, every device will require manual static configuration, a nightmare in environments with hundreds or thousands of hosts. So this is the example that I like to give my students. Right? You get invited to a party. Usually I pick one of the students. I tell one of the students, hey, you invited me to a party in your house, and I'm crazy enough to accept. And when I get there, I want to get on the internet. Right? The two things that I need to get on the internet from the person is their username and password of the Wi-Fi. What I need on my device is the MAC address and an IP address. Well, how do I get the IP address? Right? This is where DHCP comes in. DHCP is what handles that. So imagine a college campus, each day thousands of students connect their laptops and phones to Wi-Fi. DHCP dynamically assigns each device a unique IP and returns it to the pool when they disconnect, keeping the network efficient. DHCP evolves from boot P, a bootstrap protocol in the early 90s. Boot P would assign IPs but require a manual entry for every MAC address. DHCP automated that process, adding leases and automatically renewals. Why does DHCP matter? It simplifies configuration for large networks, presents IP conflicts, enables portability for devices, roaming laptops, phones, IoT, and allows central management of IP address ranges called scopes. DHCP is the unsung hero of the network, consistently handing out digital address faster than any human could. Now, DHCP magic happens through a simple four-way handshake called Dora, short for discover, offer, request, acknowledge, right? So when I put in that username and password on my phone, this four-way handshake happens between my device and your device. So when a client first connects, it has no IP address, it sends a broadcast message saying, Hey, any DHCP server out there, I need an address. This message includes the client's MAC address, a random transaction ID, and optional parameters at once like DNS or gateway. Right? This happens every time. DHCP then offers any available DHCP DHCP server that hears this broadcast responds with an offer, a unicast or broadcast packet containing a proposed IP address to your the your IP field, least duration, subnet mask, gateway, or DNS options. So for example, here's an IP address 192.168.1.105 with a gateway of 192.168.101. The third step, the R and Dora, is the DHCP request. The client chooses one offer if multiple servers reply and broadcasts a request saying, Yes, I like to accept the offer from 192.168.1.1. And then DHCP acknowledged the A and Dora. The server confirms an acknowledgement or ACK. It logs the lease in its database, binding the IP address to the client's MAC address for a defined time, the lease period, like apartment lease. It's lease like an apartment lease. Results the client now has a valid IP, subnet, mask, gateway, and DNS, and it's fully online. And it's how quickly it happens, right? It happens really quick. So when you join a coffee shop, Wi-Fi, your phone broadcasts a Discover, the cafe router replies with an offer, your phone requests that address, and the router acknowledges, assigning you an IP from its pool. Within milliseconds, you are online sipping lattes and streaming podcasts, like technology tab. Each DHCP lease includes an expiration time typically measured in hours or days. So let's break down how the lease are managed. Lease stages. One, bound. The client has an active lease. Two, renewal. At 50% of the lease time, the client unicasts a request to renew. Rebinding. At 87.5% of the lease, the client broadcasts a new request if no reply was received. And expires if the lease fully expires, the client releases the IP and must start Dora again. So the example again that I like to give to the students about the lease cycle is we're in the party, we're having a good time. Then we run out of soda, and you ask me, Hey professor, can you go to the bodega and get a soda? Pepsi, Coca-Cola, Dr. Pepper. So I go to the Bodega, right? Go to the Bodega, go to the Corner Bodega, talk to the Bodega guy, play with the Bodega cat because you know there's always a bodega cat, get the sodas, and then go back to the party. Now my question is, do I have to re log in again to your to your router, to your network using the username and password you gave me? No. Am I going to have the same IP address that I had before I left to go to the bodega? Yes, I will have the same IP address. So here's another example. 24-hour release renews automatically after 12. If the server is down, the client tries again at 21 hours. And if still no replies, it releases and restarts Dora. Now, if a DHCP fails completely, Windows assign itself and a PIPA address, which is in the range of 19, it starts with 169.254.0.0. So it's anything between 169.254.0.0 and 169.254.255.255. This allows limited local communication but no internet access. So if you see 169.254 whatever on your laptop, you know DHCP is either unavailable or it's been misconfigured. Then we have scope. Scope is a defined range of IP address that a DHCP server can hand out. So for example, you want to start, you want to hold 0 through 99. You want you can start at 100. So you can say, hey, starting at 192.168.1.100 and 192.168.1.199, these are the IPs I want to give out. Excuse address within the scope of that server that must not be assigned. Of course, the router, which is usually 192.168.1.1, right? Reservation, a permanent IP assignment link to a device MAC address. You can do that too. That way it's you put it in manually, it's static, it never changes. A printer, right? Is an example, you might keep it the same, not change it. Router, servers, right? If you have a managed switch, probably want to keep it the same. So in the small businesses, server and printers use reservations while users' laptop use dynamic. You don't need to put manually on the workstations. Makes no sense. Workstation doesn't really it doesn't really matter. Right? You can put any IP on the workstations, it doesn't matter. So you let the DHCP do do that. Printers, routers, servers, you want to do it manually. DHCP requests are broadcast, but they don't cross routers. In multiple VLAN environments, though, this is a problem. Clients in a VLAN 20 can't reach a DHCP server in a VLAN 10. So the solution, and we did this in my networking class this week, is a relay agent, usually a router, that forwards the DHCP request to the server on behalf of the client. It adds a key piece of info, the gig address or the gateway IP address field. Gitter tells the DHCP server, and that's spelled G-I-A-D-D-R, which subnet the request originated from, so it knows which scope to use. So, example, if you have a VLAN 10, right, you want to use the router that starts with 10.10.10.1. If you have a VLAN 20, just for students, let's say you want to start with a 10.10.20.1. The server sees the GIADDR and assigns it from the right poll. If it's missing or wrong, clients may get the wrong subnet or no address at all. What are the DHCP security threats? One rogue DHCP servers, attackers plugging in an unauthorized router or laptop, handing out bogus IP address, gateways, or DNS servers, results, traffic hijacking, or denial of internet access. And I've seen this. Well, I haven't seen it that they did it. But not all rogue, not all DHCP servers are rogue, right? Like, well, I guess they can be. But I had one job where they brought in a wireless router and they plugged it in into the network because the company was so cheap that they didn't want, everybody had wireless, but we did not. So they snuck in a wireless router and they hooked it onto the network. And they nobody noticed that all the techs were bringing in their personal laptops to watch Netflix.

unknown:

Right?

SPEAKER_01:

That's when Netflix changed to streaming. Nobody realized that the the techs, oh yeah, why is everybody bringing in that personal laptops to work? Nope, nobody. Nobody knew. But it was because that. That I guess they must have configured it right. But if you could configure it wrong, that could hang out, that could give out IPs. Also, that wireless router. So, and you believe nobody got fired for that? And they only find out because they fired one of the guys. One of the guys got fired and he ratted everybody out. And he got fired. Well, allegedly. Allegedly. Right? Allegedly, rat everybody out. Yeah, it was it was big news back then. Alright, mitigation. Enable DHCP snooping on switches. It classifies ports as trusted or untrusted. Untrusted port can send DHCP requests, but not offers. DHCP starvation is threat number two. Attackers flood fake DHCP requests using random Mac addresses, exhausting all available IP addresses. Legitimate clients can't connect. Use port security to limit Macs per port, rating limiting, rate limiting, and DHCP snooping with binding tables. And in data theft via rogue DNS. A rogue DHCP server can hand out malicious DNS settings, redirecting users to phishing sites. Always validate gateway and DNS info on suspicious networks. Advanced DHCP failover redundancies and options. Two servers share lease information modes, hot standby, one active, one passive backup, and low balance both active 50-50 split. Split scopes, older method, two servers share one range, 80% on A, 20% on B. Used before formal failover protocols exist. DACP options, DHCP can send additional configuration options, gateway, DNS, domain names, network time, protocol server, TFTP boot server and file, and VoIP for phones. DACP version 6. IPv6 eliminates the need for NAT, and that's another network address translation. That's another podcast. That's for another podcast. But still requires it will still require configuration automation. When is IPv6 coming? Who knows? I've been hearing it for 15 years. I suspect one big reason is money, and the other big reason is if everything is working, why do we need to change it? Because it's gonna cost money. So the first reason is money, and the second reason is money, I think. You know, we ran out of IPs a long time ago and we developed this public private public private addressing schema that's still working, right? Again, that's for another episode, right? The I'll explain the public private, but and it's working, so yeah, we ran out of the we ran out of IPs, guys. We ran out of IP addresses years ago, and we're still using this method, and it's working, and you know, I'm sure there's reasons to change it, but the main reason not to change it is money. So IPv6 will eliminate the need for all that. So there's two bolts: the stateless address auto configuration, client self-assigned address from a router advertisement. No DHCP server will be needed, and DHCP version 6 stateful server assigns IPv6 addresses and options like DNS and domain. They use port number 546 for the client and 547 for the server. Enterprise might use stateless address auto configuration for addressing, but DHCP version 6 for DNS, combining both methods. So troubleshooting DHCP. Here's some symptoms and fixes. So if you have an IP address that's 169.254.x.x, that means DHCP is unavailable. Check relay, server, or cable. You would want to ask the person if it's just happening to you or it's happening to everybody else, because that's going to be very important question to ask. Wrong subnet IPs, GI A D D R is misconfigured. Correct helper address on the router or the server. Slow network joints, pull exhaustion, expand the scope or shorten the lease. Dedicated IPs, rogue server, sorry, duplicate IPs, rogue server, enhance the TP Snoopy, and server not responding, UDP67, port 6768 blocked, adjust firewalls. Now, one thing about DHCP, right? So let's get back to the party, right? So we're at the party, right? I go to the bodega, come back, I don't have to log in. But if I leave and this person is telling me, well, in three months or four months, I'm gonna have another party and I want you to come. And when I go back, do I have to log in again? With the or would it automatically log me in? What do you think? Well, the answer is depends. If they didn't change anything, i.e., get a new router, right, configure, get a new username and password, I don't have to do anything. On my end, if I didn't get a new phone, right, if my phone is the same one, we should be fine. And I didn't restart it or reset it or or reprogrammed it in any way, it should be fine in three months. Would I get the same IP address? Probably not. Probably not. So, because imagine, right? This is how it works. You have 2,000 people at a graduation ceremony at at a college. 2,000 students are graduating. Each student brings in two devices, right? Average. So there's 4,000 IP addresses that they use. Once they graduate and they leave and they never come back, what happens to those IP addresses? Well, they get recalled because of the lease, they get recalled back, right? And then usually universities have it like a day. Some have two, but it's usually a day. And and at home, it's a couple of days, sometimes a week. It's depending on the on your ISP, how your ISP sets it up. You can actually change it if you go inside your router. Do you know how to go inside your router? If you don't know how to go inside your router, you open up a browser and you type 192.168.1.1, hit enter, and it and it will it'll pop up. Either 192.168.1.1 or 192.168.0.1. Now, some of them you may get an error, like some kind of message. I'll bring mine up. It says your connection is not private, right? You may get that. When you type 192.168.1.1, it says your connection is not private. Just hit the advanced key, and then it's gonna say the server cannot approve that 192.168.1.1. Its security certificate is not trusted. Proceed, you hit proceed. It says unsafe. It'll say unsafe, but you proceed, you click it, and you should see your ISP. It should say for Verizon, it will be log into network settings. So then you log in and then you'll be able to get into your router. That's one way of doing it. So, all right. Another thing that I like to say about DACP is if you remember when we go back, if somebody calls you and they say, Hey, I was able to log in, but I have no internet and no email. And you know, you see that they have a 169-254 IP address, you ask them if anybody else around them is having the same problem. If they are, then it's the server. Then you need to go to the DACP server, you're probably gonna need to reboot it. But if it's one person, if it's one person that's having this problem, I'm gonna give you the answer, but I'm going to give you the interview answer, right? Rebooting will probably fix this issue, right? Once you reboot, the Dora will happen again, the four-away handshake, and they will get an IP address. Most likely, this will fix it. You say that in an interview, they're going to shake your hand and they're going to tell you, thank you for coming, have a nice day. When you go on an interview and they ask you that question, you don't say, Oh, I'll reboot the computer. No, even though rebooting is the right answer, it's weird. They want you to tell them how you would do it. And how you would do it is you will go into the command line and type IPconfig space slash release, hit enter and Ipconfig space slash renew. So what Ipconfig space slash release does, it it releases the IP address or any IP address that they have. And then the renewal does the Dora, the four-way, the four-way handshake. That is the answer that you give in an interview. You do not, you know, you go into the command line and you do IP config space forward slash release, enter, and then Ip config space forward slash renew. That does the four-way handshake, that does the Dora, that gets them an IP address. You should be fine. You should try it, but just letting you know it's gonna probably kick you off your network and then put you back on. But that that's most likely if you're applying for a help desk technician job, that's the answer that you have to give them. If you don't give them that answer, they will just give you a nice little handshake and they say, Thank you for coming. Have a nice day. And this is also part of the A plus exam. Come T A Plus, they ask you this question's always in there, and some iteration of it, it's in there somewhere. So, you know, again, that's these are the things, these are the things that you that you like to know. This is actually one of my favorite topics, DCP, because you ask the student, well, how do you get an IP address? How do I get an IP address on my phone? How do I get an IP address on my computer? If I go to your house, how do I get an IP address? How does it how does this this is a process, right? It's not a somosis that it happens. There is something behind the scenes that happens when you hit, you know, when you click as his username and password, something happens when you hit enter, right? It's the Dora, it's the you know, the reservations, it's the lease, it's the scope, it's all this that it's involved in order for you to get an IP address. I find it fascinating that this is how it works, right? People think they know computers until they know computers. Until I I bring this topic up, and they tell me, oh, I never knew that. So DHCP is one of the oldest, yes yet one of the most critical services in modern networking. It gives lives to every new device, allowing millions of endpoints to coexist smoothly, and it's not just about automation, it's about trust, reliability, and scalability. If you don't have DHCP now, like why? You have to put everything manually and you have to keep track of every IP that you use. If not, you're gonna get duplicate IPs, and duplicate IPs is no bueno, right? You can't have two devices have the same IP and be on at the same time. That's not gonna work. That would not work. So all right. Uh let's see. Do I have questions? I do have questions. Let's do it. Which of the following correctly lists the DHCP message sequence? A offer, discover, request, acknowledge, b, discover, offer, request, acknowledge, c request, offer, discourage, acknowledge, or D, discover, acknowledge, request, offer. I'll read it again. Which of the following correctly list the DHCP message sequence, the four-way handshake. A offer, discover, request, acknowledge, B. Discover, offer, request, acknowledge, C, request, offer, discover, acknowledge, or D, discover, acknowledge, request, and offer. Well, if you were listening to how I described it, it's Dora. So it's B. Right? Discover, offer, request acknowledgement. The four message handshake between the client and the server. Which network features prevents rogue DHCP servers from handing out address? A dynamic ARP inspection, B DHCP snooping, C IP helper address, or D radius authentication. Which network feature prevents rogue DHCP servers from handing out addresses? A dynamic ARP inspection, B DHCP snooping, C IP helper address, or D radius authentication? Well, the answer is B, DHCP snooping. DACP Snooping defines trusted versus untrusted ports and blocks DHCP server traffic from untrusted ports, stopping rogue servers. And again, one thing that I want to add about rogue servers, it could be like you gotta be really, really careful. Like for example, those e rows that Amazon sells, right? You have to configure them a certain way because those e rows will give out IPs if you let it. You have to switch it to bridge mode. And if you switch it to bridge mode, then your router passes through those e rows and give the IPs to the device. So, for example, if you have the way I have it set up is I have uh like 100 feet cable coming out of the back of my router, one going upstairs, one going downstairs, and one going into the backyard. And they connected to switches, which are then connected to e rolls. E-E-R-O-S, the Amazon sells them. So the E-Rolls, they give out the IP address. So I had to go in there and manually configure it to be bridged. So what happens is it takes the name of, you know, I give it a wireless name, right? And then when let's say the TV plugs is looking for the internet, the smart TV, it attaches to the Eero. The Eero sends a message to the router saying, Hey, I need an IP address, and then it sends it back to the Eero, and the Eero passes it to the TV. So I can get Wi-Fi upstairs, even though my and then I get 300 meg wireless upstairs and downstairs and in the backyard because of the eero. And I have them connected to the switch. That helps. Connecting them to a switch helps. All right. Wow, that was a lot. This is um like I said before, DACP is one of my favorite topics. Um, I love teaching it because it the students have never heard of it. So, all right, that's it. For me, I'm Professor J-Rodd. Keep learning, stay connected, and keep tapping into technology. This has been a presentation of Little Chacha Productions, art by Savra, music by Joe Kim. We're now part of the Pod Match Network. You can follow me at TikTok at Professor J Rod at J R O D, or you can email me at Professor J Rod Jr. at gmail.com, I'm gonna go to the back.

Podcasts we love

Check out these other fine podcasts recommended by us, not an algorithm.

Crime Junkie Artwork

Crime Junkie

Audiochuck