
A DHCP server is a network protocol where a client and server interact. It assigns an IP address and other network configuration settings to the client device, enabling it to communicate with other networks. It acts as a kind of "identity" that distinguishes one network from another, as the configuration parameters of each can be obtained. This server assigns IP addresses as they become available, so it knows who owns them, how long they have been used, and who will be assigned them next.
The primary purpose of a DHCP server is to securely configure and manage the network , preventing IP addresses from being duplicated by assigning them within a predefined range. If we accidentally mistype our IP address, it will be assigned to another client, causing an identity problem and limiting our access to the network until the conflict is resolved.
But if this isn't the case and the connection problem persists, it might be due to the server license expiring. However, these issues can be easily resolved by configuring your server properly. That's why in this tutorial we'll show you how to easily configure a DHCP server on your computer step by step .
What is a DHCP server, and what are the advantages and disadvantages of using and enabling one on your computer?
Dynamic Host Configuration Protocol (DHCP) is a protocol designed for the efficient configuration of IP addresses on each device that connects to the internet . This configuration is usually done automatically, but it can sometimes be done manually.
As we have already mentioned, one of its advantages is to automatically connect our IP address with others on the web , thus allowing the entry and exit of data necessary to access information on the network, that is, it saves us time to consent to the networks with which we are linking at that moment.
However, one disadvantage is directly related to our security, since anyone can access our DHCP hosting and obtain our IP address to access our data. Despite this problem, the solution is to restart the server so that anyone who has found you through your IP will lose track of you, as you will be reassigned a different IP address.
This leads us to wonder : Is it safe to keep a DHCP server enabled on my computer? Considering that the potential for compromising our online security is much greater, but at the same time, user awareness of the need to protect themselves is growing.
Undoubtedly, the use of this type of server in a closed environment where we are constantly monitoring the networks we connect to is very helpful. This automatic hosting can be used, but by limiting the range of other IP addresses. Another solution is to use it in manual mode to configure it ourselves.
When we talk about manually configuring our DHCP servers, we must take into account some terms to understand the actions that must be taken, such as:
- DHCP server scope: It is an administrative group of either computers or clients on a secondary network that uses the DHCP service.
- DHCP server range: It consists of a group of IP addresses that connect in a delimited area and are assigned by the server, for example from 192.168.0.1 to 192.168.0.254.
- Address concession or rental: This is the time that DHCP servers allow the use of an IP address on a computer.
- IP address reservation: It is a consideration for assigning the same IP addresses to specific clients who wish to keep their information; it is the same as maintaining a static IP address but in an automated way from the DHCP server since when the leases are fulfilled and the server is activated again the IP address is changed.
By default, DHCP servers are in automatic mode, but since manual configuration mode is the solution to prevent any possible information theft, it is our ally.
Below we explain step by step how to optimize and configure this system on different operating systems.
Steps to configure a DHCP server on Windows 10, MacOS, and Linux
Now that these terms have been clarified, we will begin to explain the methods for configuring a DHCP server depending on the operating system used:
On a Cisco router in Packet Tracer
Configuring everything from the router is a somewhat laborious and time-consuming task, which is why Cisco has put these types of configurations in automatic mode; however, network administrators can modify the settings according to the following :
- The first thing you should do is enter global configuration mode; there you will configure the terminal.
- In global configuration mode, you will be asked to add a name to the server domain after the pre-designed formula. example: IP+ dhcp+ pool+ LAB_CAPACITY.
- After You must create the pool of IP addresses.
- We select the IP configuration on the router and write down the range that is excluded, for example 10.248.20 to 201.10.248.30
- You must limit the time allocated to that IP address; this specifies the maximum time that node will have on the network. For example, if you assign 24 hours long. When the time is up, a new IP address will be assigned.
- The set of addresses is specified.
- The connection is checked by applying the show command. IP DHCP Binding to show us the IP addresses assigned to clients, because requests have been sent from the DHCP server. It will be displayed like this:
By following these steps, we can easily configure this server, which has so many benefits in terms of network connection.
In Windows 10
Windows has a built-in option in its software to configure your DHCP server, making this task easy. Below is a list of steps to perform this task:
- We select the window of «Beginning", then we'll go to «Setting" and select the option «Network and Internet, subsequently "Wi-Fi«.
- Then we marked «Manage known networks, and there we choose the network we are going to switch to, when finished we select «Properties«.
- When we see the option for assigning the IP address, we click on «Edit IP settings and we marked «Automatic (DHCP)» or «Manual".
- If you select «Automatic (DHCP)»The IP address and DNS server address settings are configured automatically. If our option is «Manual"You can configure the IP address and DNS server address step by step.
- After marking «Edit IP settings, when selecting «Manual" you must activate the option IPv4.
- To specify an IP address, «Subnet prefix length, Y "Gateway, we write the IP address configuration.
- If you specify the DNS server address, go to the windows of «Preferred DNS Y "Alternative DNSThere we write the addresses of the primary and secondary DNS servers.
- At the end of the process (whether manual or automatic) we select «Keep".
On macOS
On Apple computers, these processes are automated as much as possible so the user doesn't have to spend much time performing them manually. However, there are some things that need to be enabled for it to work correctly, and we'll explain them below.
- The first thing you should do is access your router's settings panel. by entering the address 192.168.1.1 in the navigation bar of your default browser.
- Once there, you will be asked for login credentials, which are usually on the back of the router or its box; look for it and put them in.
- Now you must Enter the device's DHCP section and install the Apple serverswhich you can get by downloading the app above.
- After this, we'll go to the «Network Preferences from the computer and we position ourselves in «DHCP«.
- We will encounter a switch we need to activate and that's itWe will now have the server we wanted installed and configured.
On Linux
In Linux, before any configuration, we must first install a package using a root terminal and enter it as follows:
Installation
- We install the package and when finished we go to the DHCP file where the interface is located: the path is /etc/default/isc-dhcp-server.
- This will be modified by replacing the name of the interface provided by the DHCP service. In this case, for security reasons. We make a copy of the DHCP configuration fileavoiding errors caused by modifying things incorrectly.
Next, we will open the configuration file with a text reader and perform the following operations:
- We will modify the line "Authoritative",
- We look at the end of the configuration file and define a subnet:
- We specify the IP address and subnet mask of the particular network.
- We will save the changes and restart the serverIf a mistake has been made, the terminal will indicate the line of the file that is incorrect.
Test run
- We're going to the file /var/lib/dhcp/dhcpd.leases There we can see all the IP addresses that have been granted and are still active by the server.
How the reservations work
- The DHCP service allows us to reserve IP addresses in case we have a network printer and therefore it is not advisable to have a dynamic network.
- We go to the DHCP server configuration file and in: /etc/dhcp/dhcpd.config we add the following lines at the end:
- We will restart the server For the changes to take effect, we go to the client's visual machine and try to ping it to see if we have a connection, and that's it, we've finished manually configuring our DHCP server.





















