Let’s start the explanation with an analogy. You must live somewhere and have an address. If you order a brand-new Raspberry Pi (to build a VPN router for example) the package can be delivered according to your address. In a computer network like the Internet, data packets are delivered. In order for the server, service or whatever to know who owns which data packet, it needs to know an address for the delivery. This is exactly what the IP address is responsible for.
How does it work with the data packet and the IP address?
Let’s take a closer look at how important the IP address is. Let’s assume that you have your smartphone in your hand and open vpn-expert.info in your browser. The website is also has an IP address. But it is harder to remember than the name vpn-expert.info. Therefore, a DNS server resolves the address to the name. I will explain how a DNS server works in a separate article. The website vpn-expert.info even has a static IP address (220.127.116.11), so it is always the same. Your device knows now where to send a request.
So, your smartphone requests the content of vpn-expert.info and also sends its IP address with the request. That’s why our server knows whom to answer. This is the basic principle of IP addresses and it’s actually simple, isn’t it? Now let’s dive a bit deeper into the topic.
What the deal with IPv4 and IPv6?
IPv4 stands for Internet Protocol version 4 and the IP address is represented as a 32-bit number. That’s about 4.3 billion IP addresses and that amount was more than enough in the early days of the Internet. But the pool of IPv4 addresses is already exhausted and the so-called Internet of Things (IoT) is not even in full bloom yet. According to surveys, around 31 billion IoT devices are expected to be active by 2020 and by 2025 more than 75 billion. Let sink that in!
A typical IPv4 address looks like this: 192.168.1.1
Of course, there are already more than 4.3 billion devices, but so far, NAT (Network Address Translation) has been able to solve that problem. I explain NAT further down when it comes to internal and external IP addresses. In any case, a solution with more IP addresses was needed. It is called IPv6 or Internet Protocol version 6.
IPv6 is represented by 128 bits and there are about 3.4×1038 IP addresses. That’s 340 sextillions or 340,000,000,000,000,000,000,000,000,000,000,000,000!
Shall I illustrate the number? I try. IPv6 provides more than 650 quadrillion IP addresses for every square inch of the earth’s surface. That should last for a while, right?
For example, an IPv6 address looks like this: 2001:0db8:0a0b:12f0:0000:0000:0000:0000:0001. There are different notations, but a precise explanation would go too far. At this point, you might want to note that RFC 5952 advises you to use the compressed notation. In this case, you would, for example, convert 2001:db8:0:0:0:2:1 to the shortened version 2001:db8::2:1.
Internal IP address, external IP address and NAT
Since addresses are scarce with IPv4, NAT was one of the ways to help. This technology is used on most home routers. The router has an IP address assigned by the Internet Service Provider (ISP). This one is public. Your smartphone, notebook, tablet and so on that are connected to the router. They get internal IP address from the router. Visually it looks like this
If you open a website with your smartphone, the external IP address of your router is given as the return address. The router in turn knows which of the internal devices made the request and forwards the data packet accordingly. This is why you need far fewer public IP addresses than actually necessary. With IPv6, this wouldn’t really be necessary anymore, would it?
NAT is still important with IPv6
Because IPv6 provides so many IP addresses, all communication on the Internet could be direct. Maybe you have heard of the end-to-end principle. This would have advantages. If, for example, the NAT server fails, communication with the entire internal network is no longer possible. P2P applications based on end-to-end are sometimes slowed down by NAT.
However, from a security perspective NAT is still necessary. The problem is that in direct communication, your device is uniquely assignable. Let me explain this in an example using a VPN connection.
If you connect to a VPN server, you communicate via its IP address. Your real IP address is hidden, your identity is protected and anonymity is maintained. But with IPv6 this is no longer the case. Therefore, it is important that VPN providers support IPv6 and protect against the so-called IPv6 leak. You can (at least for now) disable IPv6 in your device.
Security experts even advocate that IPv6 should keep the assignment of IP addresses dynamic. Since there are so many addresses, it is of course no problem to give every device connected to the Internet a static IP address. This would make data retention easy and that is scary. It all comes down to protection of your data, privacy and anonymity.
IP address and location
The IP address can usually also be used to determine the location / country of your device. This is how streaming providers like Netflix, BBC iPlayer and Amazon Prime manage the so-called annoying geoblocking.
You will be surprised that various websites and services also determine the prices via the IP address. In my basics post about VPNs I have already shown you that the price can actually vary depending on the IP address. Here once again the proof. I use NordVPN (big discounts NOW)* to appear to be from 2 different countries. The same Eurosport package is more expensive in one country. Interesting, isn’t it?
With a VPN you can connect to a server in another country. This seems to change your physical location. The IP address of the VPN server makes it look like your device is located in another country. You can use this method to get around the geoblocking. It does not always work because Netflix, BBC iPlayer and Amazon Prime in particular have a reputation for blocking VPNs or their IP addresses. It’s a hit-and-miss but good VPN providers keep changing IP addresses to stay ahead of the streaming providers.
Your IP address can actually expose a lot about you. If you want to protect your data and hide your IP address, a VPN helps. Of course, it is important at this point that the VPN provider does not store any logs. A small bonus of a VPN is that it can even save you money. This is called a win-win situation!