Yesterday, the popular streamer El their computers dedicated to streaming and gaming. In another streaming he was explaining that he spent about four hours trying to solve the problem, and that he finally succeeded. He has also explained that he has a dynamic IP address on all his computers, it is the only thing we know about how his local network is configured. Do you want to know in which cases an IP address can be duplicated, causing you to not have Internet connectivity?
The first thing we must differentiate is that there are public IP addresses and private IP addresses. Public IPs are those that the operator provides us to be able to browse the Internet, and they are essential to be able to have a connection, however, in recent years operators use CG-NAT so that several clients leave through the same public IP address, and thus saving many costs. Private IP addresses are those provided by the router’s DHCP server automatically and dynamically, allowing us to have connectivity with the local network, and also with the Internet.
Ways to configure a private IP
Private IP addresses on a local network can be configured in different ways, causing us to duplicate the IP address, and not be able to go out to the Internet because the router does not know which private IP address to send all packets to:
- DHCP server on the router: the most common thing is that PCs have the IP address automatically, and the router’s DHCP server provides them with the private IP address. The DHCP server will know at all times which IP addresses are being used, so that they are not repeated to avoid IP address conflicts.
- Fixed private IP on each PC: we can completely manually configure a fixed IP address on our computer, and also on any device. We will have to configure the IP, subnet mask and also the default gateway, in addition, it is necessary to indicate a DNS server to be able to make all requests.
- Static DHCP: it is an intermediate path between automatic IPs and fixed private IP on the PC. It consists of registering the MAC address of our network card in the DHCP server, and assigning it a private IP address that we want. Depending on the router software, it will force us to put an IP address outside the DHCP IP range, or within the DHCP IP range. The objective is that the device in question always obtains the same IP address automatically.
As you can see, there are three possible configurations to obtain a private IP address and connect to the Internet correctly.
Why the IP address can be duplicated
When we have a single router and a DHCP server, clients will request an IP address through the DHCP protocol. In this case, it is completely unlikely that there will be a duplicate IP address, because the server knows at all times whether a specific IP is busy or free, unless the device’s firmware is programmed incorrectly. In fact, the most common thing is to provide the same private IP address to the same MAC address, this depends on the router software and how it is programmed internally.
If you have configured Static DHCP on the router, when trying to put the same IP address in two different MAC addresses, it will return an error saying that the IP is already occupied, and that we must choose another one completely mandatory. In these cases, it is also not possible for the IP address to be duplicated. As we have indicated before, depending on the software, it will ask us to put an IP outside the DHCP range, here it is impossible for them to match, and in other cases within the IP range, but since it is reserved, IP addresses cannot be duplicated either.
The only way for an IP address to be duplicated is if we set a fixed IP address on a PC, and in parallel we set the Static DHCP the same IP address, or if we are unlucky enough that the DHCP server assigns it to another computer. the same IP address that we have set permanently on the PC. By probability, this is possible, and the more devices we have connected, the more chances of having a duplicate IP address. This happens because the DHCP server is completely unaware that we have set a fixed IP address on one of the computers, and believes that it is free, and then assigns it without problems.
Xokas has stated that he has automatic IP addresses on his computers, so it should not have happened. Without knowing in detail how he has his entire network configured, or if he uses several routers to bring the Internet connection to all the Ethernet network sockets in his house, it is also possible that there is a duplicate of IPs if he uses two routers. Nowadays the most common thing is to replace the operator’s router with your own router, but in many cases this is not possible, and we put a neutral router in front of the operator’s router, which will be in charge of managing the entire Internet network. . You may have configured a neutral router by plugging it into the LAN, and with the same addressing and DHCP server as the main router, so the IP address may match.
How to configure the network and not have problems?
There are several possibilities to configure the IP addressing and the network to avoid problems, depending on what we want to do. Below, we give you a couple of solutions that will never give us problems:
- If you are going to put fixed IP addresses on your PC, you can do it without problems, however, always put IPs outside the range of the DHCP server, so that there is no type of duplication.
- If you want to have all your PCs on automatic so that you are not configuring anything, then use the Static DHCP of the routers, because this guarantees that those IP addresses will not be provided to other devices, since they will be reserved. Furthermore, for gaming it is very important to always have the same IP address, to be able to open ports correctly and not have problems when playing.
Finally, if you use several routers to provide Internet and local network service to all the outlets in the house, you must make sure that the IP addresses are not “stepped on”, in fact, it is normal to deactivate one of the DHCP servers so as not to have problems, since, if two DHCP servers are active, the one that is faster will be the one that provides the clients with the IP addressing.