DHCP
DHCP (Dynamic Host Configuration Protocol) is a network protocol that automatically assigns IP addresses and other network parameters (subnet mask, default gateway and DNS) to devices in a network. It eliminates the need to manually configure each device.
Contents
What is DHCP in simple words
DHCP (Dynamic Host Configuration Protocol) is an automatic “network secretary” that instantly issues all the necessary settings for internet access to a new device (phone, laptop or TV) when it connects to a home or office network. You do not need to enter data manually — the smart system takes all the technical routine on itself.
Imagine that you come to a library and have to find a seat at a table yourself, but first — fill out a complex form according to strict rules, indicating the row number, room code and wardrobe rules. If you make a mistake or choose an occupied seat, nothing will work. With DHCP, it looks like the work of a cloakroom attendant: you hand over your “item” (connect to Wi-Fi) and receive a ready ticket number (settings) in return.
When you connect a new phone to home Wi-Fi, the following happens: the device sends a request to the network “Hey, who is in charge of distributing addresses here?”, the router answers: “I am the DHCP server! Here is your IP address, here is the mask, here is the address of the gateway and DNS server, use them”, the device accepts the data, and you immediately go online. The whole process takes fractions of a second.
Without DHCP, every device in the network would have to be configured manually, which takes a lot of time and is fraught with errors. In offices with hundreds of computers, this would be a disaster. DHCP makes networks scalable and easy to manage. Read about how network infrastructure works in the article Infrastructure.
How DHCP works
The process of obtaining an IP address via the DHCP protocol consists of four stages, which are called DORA:
1. Discover
The device (client) sends a broadcast request to the network: “I am new, I need an IP address!” All devices on the network see this request, but only the DHCP server responds.
2. Offer
The DHCP server receives the request and offers the client a free IP address from its pool (the range of available addresses). Together with the address, the server sends the subnet mask, default gateway and DNS server.
3. Request
The client accepts the offer and officially requests the issued address, confirming: “I am taking this IP address!”
4. Acknowledge
The server confirms the issuance of the address and assigns it to the device for a certain period — the lease time. Now the device can use this IP address to work on the network.
Read more about how network protocols work in the article DNS.
What parameters DHCP issues
- IP address: The unique network identifier of your device in the network (for example, 192.168.1.100).
- Subnet mask: Determines which devices are with you in the same local network (for example, 255.255.255.0).
- Default gateway: The IP address of the router through which internet access is provided.
- DNS server: Converts the letter domain names of websites (for example, yandex.ru) into IP addresses understandable for the network.
- Lease time: The period for which an IP address is allocated to a device. After the expiry of the time (or at the next switch-on), the address may change.
Where DHCP is used
1. Home and office networks
A basic Wi-Fi router works as a DHCP server, distributing addresses to phones, laptops and TVs. This makes the home network simple and convenient — you connect a new device, and it immediately works.
2. Public networks (cafes, hotels, airports)
In public Wi-Fi networks, it is DHCP that issues you a temporary IP address for internet access. This allows hundreds of devices to be connected simultaneously without manual configuration of each one.
3. Corporate networks
Large companies run special DHCP servers that monitor the issuance of addresses and manage thousands of computers. This allows centralized network management and quick connection of new devices.
Configuring DHCP on a router
You can manage DHCP through the web interface of your router. The main parameters:
- Enable/disable DHCP: The service must be enabled for automatic address distribution. If you disable it, devices will not be able to automatically receive IP addresses.
- Address range (Start/End IP): The boundaries of free IP addresses that the router can issue (for example, from 192.168.1.100 to 192.168.1.200).
- Lease time: The period for which a device receives an IP address. For home, 24 hours is usually set, for public networks — 1-2 hours.
- Address reservation (binding IP to MAC): If a device (for example, a printer or server) needs a permanent address, it can be reserved.
Read about how to configure network infrastructure in the article Infrastructure.
Frequently asked questions
What is DHCP in simple words?
DHCP is a system that automatically distributes IP addresses to devices in a network. When you connect a phone to Wi-Fi, the DHCP server (usually a router) assigns it an address, subnet mask and other settings by itself. You do not need to enter anything manually — everything happens automatically. Read more about how networks work in the article Infrastructure.
What is the difference between DHCP and DNS?
DHCP distributes IP addresses to devices in a network, while DNS converts domain names of websites (for example, yandex.ru) into IP addresses. DHCP is like an administrator who issues numbers (addresses) to devices. DNS is like a phone book that uses a name (domain) to find a number (IP address). They work together: DHCP issues an address, and DNS helps find a website by its name. Read more about DNS in the article DNS.
What will happen if I disable DHCP on the router?
If you disable DHCP, devices will stop automatically receiving IP addresses. Every device (phone, laptop, TV) will have to be configured manually — IP address, subnet mask, gateway and DNS. This is very inconvenient, especially if you have many devices. Without DHCP, the network stops being “plug-and-play” — a new device will not be able to connect without manual configuration. Read about network configuration in the article Infrastructure.
What is the DHCP lease time?
The lease time is the period for which an IP address is allocated to a device. When the time expires, the device can receive a new address or renew the lease. For home, 24 hours is usually set, for public networks (cafes, hotels) — 1-2 hours. A short lease time helps free up addresses faster when a device disconnects from the network.
What is better: DHCP or a static IP?
DHCP is convenient for most devices — it is automatic and requires no configuration. A static IP is needed for servers, printers and other devices that require a permanent address (for example, for external access). In home networks, almost all devices use DHCP, and for a printer or NAS you can reserve a permanent IP through the DHCP settings. Read about choosing settings in the article Infrastructure.
How to enable DHCP on a router?
Go to the router settings through the browser (usually 192.168.0.1 or 192.168.1.1). Find the LAN, Network or DHCP section. Set the switch to the “Enable” position, specify the address range (for example, 192.168.1.100-200) and the lease time. Save the settings and restart the router. After that, devices will automatically receive IP addresses. Read more about configuration in the article Infrastructure.
Why do I need DHCP if I can configure everything manually?
Manual configuration of IP addresses for every device takes a lot of time and is fraught with errors — you can accidentally assign two devices the same address (an IP conflict). DHCP automates this process, prevents conflicts and simplifies network management, especially if you have many devices. In modern networks, DHCP is used almost everywhere.
Other terms in «Infrastructure»
Was this information helpful?
Build reliable IT infrastructure
Build a modern, fault-tolerant IT infrastructure. Design, equipment supply, installation and maintenance turnkey.