IP Addresses
The unique digital coordinates assigned to every device connected to the internet.
What is an IP Address?
Just like every house needs a unique street address to receive physical mail, every device connected to the internet requires a unique **IP (Internet Protocol) Address** to receive digital packets.
An IP address is a numerical label assigned to your device (like 192.168.1.5 or 142.250.190.46). When you request a webpage, your router attaches your IP address to the packet so the server knows exactly where to send the HTML back.
Why Developers Need It
As a web developer, you constantly interact with IP addresses. During local development, you test your apps on **127.0.0.1** (localhost).
When deploying apps, you configure DNS records to point your domain name to the public IP address of your server. Additionally, APIs often use IP allowlisting to restrict access for security.
IPv4 vs IPv6 & Localhost
The original system, **IPv4**, uses 32-bit numbers formatted as four blocks (e.g., 192.0.2.146). Because the world ran out of these 4.3 billion addresses, we created **IPv6**, which uses 128-bit numbers with letters (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).
**Public vs Private:** Your home router gets one *Public IP* from your ISP, which the entire internet can see. However, the router assigns *Private IPs* (usually starting with 192.168... or 10...) to the devices inside your house. The outside world cannot see your private IP.
**Localhost (127.0.0.1):** This is a special 'loopback' IP address. It tells your computer, 'Don't send this packet out to the network; send it right back to me.' This is how you view http://localhost:3000 while coding!
The Loopback vs Public Simulator
Try sending a packet to the loopback address (127.0.0.1), a private address (192.168...), and a public address to see how they route differently!
Check yourself
Pick an answer to lock it in, then read why. Getting one wrong is part of how it sticks.
Remember this
- An IP address is the unique numerical coordinate for a device.
- IPv4 is the old 32-bit format. IPv6 is the new 128-bit format.
- Localhost (127.0.0.1) loops back to your own machine.
- Private IPs (192.168.x.x) only work inside your own building.
Done with this concept?
Mark it complete to track your progress. No login needed.