Alright, confession time. I’ve been a professional software developer for over eight years. I’ve spent most of that time as a mobile and frontend developer, working with complex APIs and building user interfaces. And yet, I just learned some fundamental, mind-blowing things about IP addresses. 🤯
I’m not talking about advanced network routing. I’m talking about the basics. Like the fact that there are static and dynamic IP addresses.
The “Why Does My Site Keep Breaking?!” Fiasco
This discovery sent me flashing back to a side project from a few years ago. I was setting up a simple server on an AWS EC2 instance. I bought a domain, pointed it to my server’s public IP address, and everything worked.
For about a day.
The next time I rebooted the server, my site was down. 🤦♂️ I checked the AWS console, and the public IP had completely changed. I was pulling my hair out, manually updating my domain’s DNS records every time I pushed a change.
My past self, bless his heart, had no idea that most cloud servers are assigned a dynamic IP by default. I was trying to point a permanent domain name to a “parking spot” that kept moving.
It wasn’t until I dug through StackOverflow that I found the solution: I needed to provision an “Elastic IP” (which is just Amazon’s brand name for a static public IP). I clicked the button, assigned it, and my problem was permanently fixed. I felt brilliant and, in hindsight, a little silly.
Here’s what I now know:
-
Dynamic IP: This is a temporary address assigned from a pool by a provider (like your home ISP or AWS). When you disconnect and reconnect (or restart your router/server), you’ll likely get a new one. It’s efficient because the provider doesn’t need a permanent IP for every single customer at all times.
-
Static IP: This is a fixed, permanent address. It costs extra, but it’s essential for anything that needs to be found reliably at the same location, like a web server, an email server, or a VPN gateway.
The “Fun Fact” That’s Actually a Global Tech Problem
This “aha!” moment sent me down a rabbit hole, and the history is even more fascinating. It turns out, we are quite literally running out of IP addresses.
It all goes back to the 1970s and ARPANET, the internet’s military-funded ancestor.
They designed the standard, IPv4 (Internet Protocol version 4), as a 32-bit number. That format (e.g., 172.217.14.228) allows for about 4.3 billion unique addresses.
Back then, when there were only a handful of computers connected, 4.3 billion seemed like an impossibly large number—more than they could ever possibly need.
Then, the 90s and 2000s happened. The internet exploded. Suddenly, everyone had a home computer. Then a laptop. Then a smartphone. Then a smart TV, a smart watch, and a smart toaster. 💻📱⌚️
Those 4.3 billion addresses, many of which were allocated in huge blocks to early companies and universities, dried up fast.
Solution 1: The Clever “Office Building” Trick
To stop the internet from collapsing, engineers came up with a brilliant workaround: dividing the world into public and private IPs.
This system is called NAT (Network Address Translation), and you use it every single day.
-
Public IP: Think of this as your entire home’s or office’s main street address. Your ISP assigns one public IP to your router. This is your unique, visible address to the entire internet.
-
Private IP: Your router then acts like a receptionist. It creates its own internal-only network and gives private addresses to every device connected to it (like
192.168.1.10,192.168.1.11, etc.). These IPs are hidden from the outside world.
When your phone (private IP) wants to visit Google, it sends the request to the router. The router “translates” it, sends the request out using its one public IP, gets the response from Google, and then routes it back to the correct private IP (your phone).
Thanks to NAT, a single household with 20 devices only uses up one of those precious 4.3 billion public addresses.
Solution 2: The “We Give Up, We Need More Numbers” Fix
Even with NAT, the explosive growth of mobile and IoT devices meant we needed a real, long-term fix.
Enter IPv6.
Instead of a 32-bit number, IPv6 uses a 128-bit address. It looks complex (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334), but the only thing you need to know is the sheer scale.
How many addresses is 128-bit? It’s 340 undecillion (3.4 × 10³⁸).
That’s enough to assign a unique IP address to virtually every grain of sand on planet Earth. 🌍 The problem of “running out” is permanently solved.
Today, we’re in a slow transition. Most major websites (like Google, Facebook, etc.) and modern devices support both protocols. This is called a “dual-stack” setup, ensuring that older IPv4-only devices can still connect while the world slowly migrates to the new standard.
Never Stop Being Curious
As developers, we build on top of these incredible layers of abstraction every single day. It’s humbling to realize that no matter how long you’ve been in this field, there’s always a fundamental concept waiting to be truly understood.
What’s an “obvious” tech concept you learned embarrassingly late in your career?