A DHCP server 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 device and thus can communicate with other networks. It is a kind of “identity” that differentiates one network from another because the configuration parameters of each can be achieved. This server assigns IP addresses as they are “vacated” by what they know to whom it belongs, how long it has been used and for whom it will be reassigned.
The fundamental objective of a DHCP server is to provide securely the configuration and administration of the network, avoiding the repetition of IP addresses , since it assigns these addresses within a predetermined range. If by chance we incorrectly manipulate our IP this 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 easily if we configure our server properly. That’s why in this tutorial we teach you how to configure a DHCP server on your computer step by step in a simple way.
Index:
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) of its acronym in English is a protocol designed for the efficient configuration of IP addresses on each computer that connects to the internet network > . This configuration is done automatically, however sometimes it can 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 time.
However, a disadvantage is directly linked to our security, because anyone can go to our DHCP hosting and take our IP address to enter our data, despite this problem, the solution is to restart the server For anyone who has found you through the IP, you will lose your trail, because a different IP address will be reassigned.
This leads us to think Is it feasible to keep a DHCP server activated on my computer? Given that the chances of damaging our internet security are much greater, but in turn the awareness of users to protect themselves grows in tandem.
Unquestionably the use of this type of servers in a closed environment where we are constantly monitoring the networks with which we connect is very helpful, this automatic hosting can be used but defining the range of the other IP addresses, another solution is to use an east 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 as they are:
- DHCP server scope: It is an administrative group of either 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 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.
- Reservation of IP addresses: It is a consideration for Assigning the same IP addresses to specific clients who wish to keep their information is the same as maintaining a static IP address but automatically from the DHCP server, since when the concessions are fulfilled and the server is activated again the IP address is changed.
By default the DHCP servers are in automatic mode, but being the solution to avoid any possible theft of information, the manual configuration mode is our ally.
Here we tell you step by step how to optimize and configure your system in different OS
Steps to configure a DHCP server in Windows 10, MacOS and Linux
Now, after clarifying these terms, we begin to explain the configuration methods of a DHCP server depending on the operating system used:
On a Cisco router in Packet Tracer
Configuring everything from the router is a bit of a task and requires time, so cisco has put this type of sort in automatic mode however the 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 domain after the formula predesigned, example: IP + dhcp + pool + LAB_CAPACITY.
- Then you must create the pool of IP addresses.
- Select the IP configuration in the router and we write that range that are excluded for example 10.248.20 to 201.10.248.30
- You must define the time allotted for that IP, thus you specify the maximum time that node will have in the net. 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 is specified.
- The connection is checked by applying the show IP DHCP Binding command to show us the IP addresses assigned to the clients, because requests from the DHCP server have been sent. It will be displayed this way:
Following these steps we can configure without problems this server that has so many benefits in terms of network connection.
In Windows 10
Windows has integrated in its software the option to configure our DHCP server, helping us to perform this task in a simple way. Here is a list of steps to perform this task:
- Select the « Start» window, then go to « Settings» and select the option « Network and Internet» , then « Wi-Fi «.
- Then we mark « Manage known networks» , and there we choose the network to which we are going to change, At the end we select « Properties «.
- When we see the option for assigning the IP address we click on « Edit IP configuration» and mark « Automatic (DHCP) » or« Manual ».
- If “ Automatic (DHCP)” is checked, the IP address and DNS server address settings are automatically set. If our option is “ Manual” , you can configure the IP address and DNS server address step by step.
- After checking “ Edit IP settings” , when selecting « Manual» you must activate the IPv4.
- To specify an IP address, “ Subnet prefix length” , and “ Gateway” , we write the IP address settings.
- If you specify the DNS server address, we go to the “ Preferred DNS” and “ Alternative DNS” windows, there we write the addresses of the main and secondary DNS servers.
- At the end of the process (manual or automatic) we select « Save» .
On MacOS
On apple computers these processes are fully automated so that the user does not have to spend much time performing them manually. However, if there are some things that have to be activated to make it work properly and we will explain it below.
- The first thing you should do is enter the configuration panel of your router by entering the address 192.168.1.1 in the navigation bar of your default browser.
- Once there you will be asked for access credentials that are usually 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 servers , which you can get by downloading the app you have above . >
- After this, we go to the “ Network Preferences” of the computer and position ourselves in “ DHCP “.
- We will find a switch that we must activate and ready . We will already have installed and configured the server we wanted.
On Linux
In Linux before any configuration we must first install a package with a root terminal to introduce it as follows:
Installation
- We install the package and at the end we go to the DHCP file where the interface is: the path is / etc / default / isc-dhcp-server .
- This will be modified by replacing the name of the interface offered by the DHCP service. In this case, for security we make a copy of the DHCP configuration file , avoiding errors by modifying things wrong.
Later we will open the configuration file with a text reader and perform the following operations:
- We will modify the «Authoritative» line,
- 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 case you made a mistake, the terminal will indicate the file line that is wrong.
Function test
- 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.
- The DHCP service allows us to make reservations of IP addresses in case we have a network printer and therefore it is not convenient to have a dynamic network.
- We go to the file DHCP server configuration and in: /etc/dhcp/dhcpd.config we add at the end the following lines:
- We will restart the server so that the changes become effective. We go to the visual machine of the client and try to ping to see if we have connection and ready, we have finished manually configuring our DHCP server.