DHCP stands for Dynamic Host Configuration Protocol and is a protocol that allows a router to automatically assign an IP address to the devices that connect.
Each router uses DHCP and every time you connect from your PC or mobile phone to a Wi-Fi network or even a wired network, you get an IP address via DHCP.
On most routers, DHCP works to reserve a particular IP address to always assign it to a specific device.
This booking system is based on the recognition of the MAC Address number, which is the unique address of a network card.
In this way, the PC connected to the router on the network always obtains the same IP, automatically and without the need to intervene in any way.
NOTE: Obviously we are talking about theprivate IP address, i.e. the one inside the network, not the external public one that comes out on the internet and that can only be fixed by making a request to the network provider (such as Fastweb which allows you to ask for a static public IP for free).
In some cases, however, the router does not support the configuration of DHCP reservations and assigns the same computer a different IP each time.
Furthermore, for some network configurations, it would be better to set a private IP that always remains the same, which is therefore static and not automatic.
For example, we have seen that it is better to disable DHCP when you have to forward or open ports on the router and when you need to connect two or more PCs for sharing resources.
But speaking of home network, disabling DHCP on the router it would create a serious problem to connect new devices to the internet.
Imagining that a friend comes to our house with his iPad, to use it on the internet he would need to access the Wifi network managed by our router.
If this router does not have DHCP enabled, it will also be necessary to set up a static network configuration on its iPad, because the router would have no possibility of assigning an IP to the iPad.
For this reason, unless you have special needs or unless you have to manage many devices, it is not advisable to disable DHCP on the router (which on many routers it is not even possible to disable DHCP).
The best way to set an IP manually and not automatically (and disable DHCP) is to modify the network parameters from the PC or smartphone and not from the router.
On a Windows PC (Windows 10, 7 and 8) to set the fixed IP manually you have to follow this procedure:
First of all we need to know the IP address of our router.
Press on the Start menu, then type cmd and open the Command Prompt.
Write the ipconfig command and press Enter to find the IP address of the default gateway which is that of the router (let's say it is 192.168.1.1).
If you are having trouble with the command line, you can find the router IP by going to Control Panel -> Network and Internet -> Network and Sharing Center -> Change adapter settings.
In this window, right-click on the network card used, go to Status and then to Details.
Now that you know the IP address of the router, go back to the Change card settings window, right click on the network card used to connect to the router and the internet and open the Properties.
In Properties, select Internet Protocol version 4 and click on Properties.
From the Properties window, click on Use the following IP address and write:
IP address: 192.168.1.X (with X being a number from 2 to 254)
Subnet Mask: 255.255.255.0 (always)
Default gateway: 192.168.1.1 (the same one we found earlier).
Google DNS can be used as primary and secondary DNS.
Press OK and the IP of that computer will always be the same even after resetting the router.
Your mac the procedure for assigning a static private IP is similar.
Open System Preferences (by looking for them on Sportlight), click on the name of the active connection, click on Advanced and then go to TCP / IP.
From the window, press the option to configure IPv4 manually and set the IPs as seen above for Windows.
Click on Apply and then OK.
On Android Smartphone, go to Settings, then to Wifi, then touch the name of the wireless connection you are connected to and hold down on it until the Change network item appears.
Expand the advanced options and tap on DHCP to change the IP Settings to Static.
From here you can manually assign IP Address, Gateway and DNS.
On iPhone and iPad, go to Settings> Wi-Fi, press the i next to the name of the connected wireless connection and, in the Static tab, write the various addresses as seen above.
DHCP Guide: Assign IP Manually or Leave IP Automatic?