Skip to main content

How Reserving a Pavilion Explains DHCP

It’s party time! You decide to throw a party at a park with a bunch of pavilions. But you can’t just walk up and claim a pavilion. Instead, you have to go through the park’s reservation service. You tell them the date and time of your event, and they check their list to see what’s available. Great news! A pavilion is open, and they assign it to you for a set time. The day arrives, and as planned, you host your party until it’s time to leave. What a great gathering!

This is a lot like how DHCP works in a network. When a device — like your phone or laptop — joins a network, it can’t just start communicating. It needs an IP address first, just like you needed a reserved pavilion. Then, what is the "reservation" process of getting an IP address? Let's take a dive into the automated world of DHCP.

What is DHCP?

The Dynamic Host Configuration Protocol simplifies network provisioning by automatically assigning important network parameters. These include:
  • IP addresses: Just as you may get Pavilion 1 for your party, your device gains an IP address used to communicate amongst other devices. 
  • Subnet mask: Just as you want enough space for your guests and not disturb other parkgoers, the subnet mask serves as the boundary of a network - the range of IP addresses that identifies a device on a specified network
  • Default gateway: The guests enter the park first before reaching the pavilion, and when it is time to leave, they go through the park exit. The default gateway, or the router, has an IP address that allows devices on your local network to reach the Internet or another network. 
  • DNS server: It also helps to know how to get to the pavilion by using signs or putting clear directions on your invitation. Without it, your guests would be lost. The DNS server translates human-readable websites or domain names into machine-readable 32-bit IP addresses. 
It is hard to manage networks without it. DHCP debuted in 1993, but its earlier siblings provided its framework for automatic network connections. Before DHCP, protocols such as Reverse Address Resolution Protocol (RARP) or the Bootstrap Protocol (BOOTP), were used to assign IP addresses to devices. DHCP, however, is more efficient and flexible. Manual configurations are still handled today but preferably among smaller networks or networks that do not change frequently. DHCP handles the brunt of IP decision-making, but how does it work?

DORA the (IP) Explorer

Just like you have to go through a series of steps to book the pavilion, DHCP has a four-step process to provide these network parameters, known as DORA: Discover, Offer, Request, Acknowledge. 

Discover: When you walk into the office, you tell the manager that you want a pavilion. This will prompt the manager to look at the schedule and see what is available. Similarly, when your device connects to a network, it does not have the necessary network settings to communicate; it needs to reach a DHCP server to get the required network parameters. The device sends a broadcast message to the entire network, essentially announcing "Is there a DHCP server I can access?"

Offer: After looking at what is available, the manager provides you what pavilions are available for your needs. Similarly, the DHCP servers on a network will respond to the device's Discover message, saying "I am available", and provides those necessary parameters.

Request: Once the manager provides you with what is available, you may choose from those options. Similarly, the device receives an offer (or offers) from one or multiple DHCP servers on a network. If it receives multiple offers, the device may choose the first one that comes in or based on optimal performance factors. The device sends a DHCP Request message to the chosen server, saying "I'll take this one".

Acknowledge: The manager takes your selection and confirms the booking by providing you a receipt or letter of acknowledgement of your reservation. Similarly, the chosen DHCP server sends a DHCP ACK message, confirming and providing all the network parameters to your device. Now you can party - or access the network, in this case. 

DHCP Lease

Now let's party; but keep one thing in mind - do not overextend your stay. Why is that? The park may close at a certain time, park rangers need to clean the area, and other people want to use it.

Similarly, DHCP has a mechanism where you do not hold on to your IP address forever. A DHCP lease is a specified amount of time your device can hold onto an IP address. Just like you may book the pavilion for a few hours or until park closing, you can configure this setting on a DHCP server to the time you want, such as 24 hours, 7 days, 30 days, or even a few hours. 

Frequent lease changes can disrupt connections. If you realize your party is going past your booked time, you may choose to extend your reservation. Similarly, your device can renew its lease automatically as it nears its end, allowing you to keep your IP address or get a new one.

For a lengthy event, you may choose to book the entire day. DHCP has something for that - DHCP reservation. A DHCP reservation allows a device to keep its IP address whenever it is connected to the network based on its MAC address. This is an example of a static or manual DHCP configuration. 


What's Next?

Did you and your guests enjoy the party? They may not know it, but you did all that work to have an enjoyable occasion. When it comes to your devices, we are very happy when we are able to do research, watch videos, and have seamless data transfers. There is a lot that goes behind the scenes, but it would not be possible if you were not given your "pavilion", or IP address. DHCP is an important protocol that allows us to connect with other devices seamlessly without us having to tirelessly search for our ticket to connection.

In a future post, let's see how to configure a DHCP server in a virtual lab environment. We will also cover some DHCP issues and troubleshooting techniques. Have you configured a DHCP server in a live environment? What challenges have you faced when setting one up? Feel free to share your insights! 



Comments

Popular posts from this blog

Subnets: Key to Network Organization

Whether it is a to-do list or a big project, organization is key. We have busy lives. The task in itself can have several parts or may require some sort of collaboration with a partner or a team. A project may call to meet deadlines, which means keeping up with those crucial dates and having a system of order. Similarly, our networks are busy, transferring a great deal of data across links and nodes. The amount of traffic generated can lead to bottlenecks, packet loss, and delays. A network’s design can vary in complexity, depending on the environment or needs of a customer. Just as we find a manageable way to handle heavy workloads, our networks have a way of efficiently handling network traffic by creating "mini-networks" within our network. This process is called subnetting.   Why We Subnet To reduce congestion. Just as traffic in cities cause slowdowns and delays, too much traffic can lead to bottlenecks, packet loss, and delays. Subnetting breaks the netwo...

My Trek up Mount Net

   Networking is ...          Let me hold off on that. Expect a definition later. First, let's set the scene.         This is a new platform, new field, new everything for me. You might or might not ask yourself - how?   If you are part of the "might not", I get it. I am currently a college student just trying to make sense at staring at the daunting Mount Net - one of many peaks among the IT Mountain Range that grows not centimeters every year, but centimeters every second it seems like. Yet this is a trek I know I want to take step by step.         Let me just say, my journey to networking started a few years ago. When I graduated high school, I had different interests - psychology, math, animal science, just to name a few. I had a brief stint of interest in electrical engineering that sparked from a fascination with electricity. My mother also told me that my grandfather used to be in ...

Make a Connection: What Is a Network?

The term "network" has been defined countless times. If there is anything I have learned about something being repeated many times, it means it is important. With networks, that is no different. I defined networking previously and briefly - a collection of devices that receive and transmit data amongst each other. Yet, it truly does not do it justice. I just finished my first co-op iteration at Motorola Solutions. Entering this new opportunity for me was more than just a foot in the door in the field of networking. I got to see critical infrastructure that transmitted and received signals relayed from first responders' and public sector communications. Long story short, I got to see the inner workings of a network, especially how different media and architecture converges to keep communications clear and functioning. Humanizing Networks   The world's networks, big and small, have been compared to:  Extensive highways that carries information across "tolls", ...