What is DHCP? It assigns IP addresses dynamically
The answer to “What is DHCP?” is that it’s the standard mechanism to dynamically assign IP addresses within a network. It stands for Dynamic Host Configuration Protocol.
IP, or Internet Protocol, addressing is a logical means of assigning addresses to devices on a network. Each device connected to a network requires a unique IP address.
At home, dynamic host configuration protocol (DHCP) assigns IP addresses to your smartphones, laptops, tablets, and devices like doorbell cameras. When you use wifi on your home network, typically your router is a DHCP server.
In a large enterprise setting, a DHCP server is usually a dedicated computer. By simplifying IP address management, it saves money, is more secure, and doesn’t eat up valuable admin time.
In this glossary entry, we’ll explore the fundamentals of how DHCP works. Then, we’ll take a deeper look at two aspects: dynamic addressing and the communications protocol.
How does DHCP work?
DHCP is a network management protocol. A client device (or DHCP client), such as a laptop, joins a network and requests an IP address. The request is made to a DHCP server.
The server will quickly and automatically assign an IP address and some related network configuration parameters. Once the device has accepted the assignment, it can communicate with both the internal network and the public internet.
In addition to assigning IP addresses, these servers also provide relevant parameters, known as DHCP options. The Internet Assigned Numbers Authority (IANA), the global coordinator of IP addresses, defines available DHCP parameters.
Options number in the hundreds. Key among them is how long the IP address can be used—known as the lease time. They also include the default gateway, its subnet mask, and its DNS server.
Some additional definitions
To clarify, let’s quickly define some of these terms we just mentioned:
- A default gateway transfers data back and forth between the local network and the internet, or between local subnets.
- IP networking uses a subnet mask to separate the host address and the network address portions of an IP address.
- A DNS server resolves names to IP addresses, translating domain names that we easily remember, like bluecatnetworks.com, into IP addresses like 184.108.40.206.
Dynamic IP addressing with DHCP
The assignment of IP addresses happens dynamically within a given address range. As a result, a device connected to the network doesn’t have a forever address. The IP address can periodically change as its lease time expires unless the lease is successfully renewed.
For services that always need to be on, a static IP address is often a better option. Corporate enterprises commonly use static IP addresses for hardware like mail servers. Certainly, a DHCP server should have a static IP address.
However, there are drawbacks to dedicating a specific IP address to a device or service. A network administrator must manually assign, configure, and track the IP address. It’s a time-consuming task. Oftentimes, it requires the admin to physically be with the device.
Meanwhile, dynamic IP addresses are usually the preferred choice because they:
- Cost less to manage than static IP addresses;
- May offer more privacy and security with a constantly changing IP address; and
- Don’t require manual administration when a device roams from one subnet to another.
DHCP communications protocol
Communications to fulfill a DHCP request involves both the server and client. Furthermore, a relay agent or IP helper often facilitates communication between the two. Relay agents receive broadcast DHCP messages from clients and then re-send those messages with configuration information to servers.
Communication happens via small units of data, called packets, that are routed through a network. Networking protocols like IP govern all its rules.
Most of the time, communication occurs in four steps. Briefly, they are:
- A discover packet is sent from the client to the server.
- The server replies to the client with a DHCP offer packet containing an IP address.
- The client receives and validates the offer, then sends a request packet back to the server to accept the address.
- The server sends an acknowledgement packet back to the client to confirm the chosen IP address.
With this in mind, one final point: DHCP alongside DNS and IP address management (IPAM) are together known as DDI. Want to know how to define DDI or how it works to form a complete management solution? The BlueCat platform is the place to start.
Automating DHCP reservations at a U.S. government agency
BlueCat worked with a large U.S. government agency to bring automation to a task they perform over and over, all day long: DHCP reservations.
eBook: Network Rising
The gap between what the network team can deliver and what end-users need continues to widen. You need back-end DNS that supports all of your initiatives.
Technical Know-How: Deploying DDNS with BlueCat
Dynamic DNS automatically updates DNS records when an IP address changes. Learn how to deploy DDNS on the BlueCat Address Manager and DNS/DHCP server.
eBook: The Cost of Free
This eBook outlines the journey from the functional to the inevitable, when you realize your free DNS is anything but. See how both tactical and strategic…