A DHCP server it is a network protocol where client and server interact, which assigns an IP address and other aspects for the configuration of the network belonging to the client’s device and thus can communicate with other networks. It is a kind of “identity” that differentiates one network from another since the configuration parameters of each can be obtained. This server assigns IP addresses as they are “vacated” so they know who it belongs to, how long it has been used and for whom it will be assigned again.
The primary purpose of a DHCP server is to securely provide network configuration and management preventing repeating IP addresses, as it assigns these addresses within a predetermined range. If by chance we manipulate our IP incorrectly, it will be assigned to another client, causing an identity problem, limiting our communication to the network, until the conflict is resolved.
But if this is not the case and the connection problem persists, it may be due to the expiration of the server license. However, these complications can be solved in a simple way if we configure our server properly. That is why in this tutorial we teach you to how to configure a DHCP server on your computer step by step In a simple way.
What is it and what are the advantages and disadvantages of using and enabling a DHCP server on your computer?
Dynamic Host Configuration Protocol (DHCP) from its acronym in English is a protocol designed for the efficient configuration of IP addresses in each computer that is connect to the internet network. This configuration is done automatically, however it can sometimes be done manually.
As we have already mentioned above, one of its advantages is to automatically connect our IP address with others on the web, thus allowing the input and output 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 time.
But nevertheless a disadvantage is directly linked to our safety, Well, anyone can access our DHCP hosting and take our IP address to enter our data, despite this problem, the solution is to restart the server for everyone who has found you through the IP will lose your trace, because you will be reassigned a different IP address.
This leads us to think Is it feasible to keep a DHCP server activated on my computer? Taking into account that the possibilities of damaging our internet security are much greater, but in turn the awareness of users to protect themselves grows at the same time.
Unquestionably the use of this type of server in a closed environment where we are constantly monitoring the networks with which we connect is very helpful, you can use this automatic hosting but delimiting the range of other IP addresses, another solution is to use a this in manual mode to configure it ourselves.
When we talk about manually configure 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 either of computers or clients of 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 that are assigned by the server, for example from 192.168.0.1 to 192.168.0.254.
- Concession or rental of addresses: It is the time that DHPC servers allow the use of an IP address on a computer.
- IP address reservation: It is a consideration to assign the same IP addresses to specific clients who want 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 the DHCP servers are in automatic mode, but the manual configuration mode is our ally to avoid any possible theft of information.
Next we will tell you step by step how to optimize and configure your this system in different OS
Steps to configure a DHCP server on Windows 10, MacOS, and Linux
Now, once these terms are clarified, we begin to explain the configuration methods of a DHCP server depending on the operating system used:
On a Cisco router in Packet Tracer
Configure everything from the router It is a somewhat laborious and time consuming task, that is why Cisco has put this type of ordering in automatic mode, however network administrators can modify the settings according to the following:
- The first thing to 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’s 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 in the router and write the range that is excluded, for example 10.248.20 to 184.108.40.206
- You must define the time allotted for that IP, so you specify the maximum time that node will have on the network. If for example you assign 24 hours at the end of the time, you will be assigned a new IP address.
- The set of addresses are specified.
- The connection is checked by applying the show command IP DHCP Binding to show us the IP addresses assigned to the clients, because requests have been sent from the DHCP server. It will be displayed like this:
Following these steps we can configure without problems this server that has so many benefits in terms of network connection.
On Windows 10
Windows has integrated into its software the option to configure our DHCP server, helping us to carry out this task easily. Here is a list of steps to perform this task:
- We select the window of “Start”, then we will “Setting” and we select the option “Network and Internet “, later “Wifi“.
- Then we mark “Manage known networks “, and there we choose the network to which we are going to change, when we finish we select “Properties“.
- When we see the option for assigning the IP address we click on “Edit IP configuration “ and we mark “Automatic (DHCP) ” or “Handbook”.
- In case of marking “Automatic (DHCP) “, the IP address settings and DNS server address are set automatically. If our option is “Handbook”, you can set the IP address and DNS server address step by step.
- After marking “Edit IP configuration “, by selecting “Handbook” you must activate the option IPv4.
- To specify an IP address, “Subnet prefix length “, Y “Gateway”, we write the configuration of the IP address.
- In case of specifying the address of the DNS server, we go to the windows of “Preferred DNS ” Y “Alternative DNS “, there we write the addresses of the main and secondary DNS servers.
- At the end of the process (whether manual or automatic) we select “Save”.
On apple computers these processes are fully automated so that the user does not have to spend a lot of time doing them manually. However, if there are some things that have to be activated to make it work correctly and we will explain it to you below.
- The first thing you should do is enter the configuration panel of your router entering the address 192.168.1.1 in the navigation bar of your default browser.
- Once there you will be asked for some access credentials that are generally on the back of the router or its box; look for it and enter them.
- Now you must enter the DHCP section of the device and install the Apple serverswhat can you get downloading the app you have above.
- After this, we go to “Network Preferences “ from the computer and we position ourselves in “DHCP“.
- We will meet a switch that we must activate and ready. We will already have the server we wanted installed and configured.
In Linux before any configuration we must first install a package with a root terminal to introduce it in the following way:
- We install the package and when finished we go to the DHCP file where the interface is: the path is / etc / default / isc-dhcp-server.
- This will be modified by substituting the name of the interface that the DHCP service offers us. In this case, for security we make a copy of the DHCP configuration file, avoiding generating errors by modifying things wrong.
Later we will open the configuration file with a text reader and we will perform the following operations:
- We will modify the line “Authoritative”,
- We look at the end of the configuration file and define a subnet:
- We indicate the IP and the mask of the particular subnet.
- We will save the changes and restart the server. In the event that a mistake has been made, the terminal will indicate the wrong file line.
- We go 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.
Operation of reserves
- The DHCP service allows us to make IP address reservations in the event that we have a network printer and therefore it is not advisable to have a dynamic network.
- We go to the configuration file of the DHCP server 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 to see if we have a connection and voila, we have finished manually configuring our DHCP server.
If you have any questions, leave them in the comments, we will answer you as soon as possible, and it will surely be of great help to more members of the community. Thank you! 😉