An IP address (Internet Protocol Address) is a unique numerical identifier assigned to every device connected to a network. It allows devices to send and receive data across the internet using protocols like IPv4 and IPv6.
1. Introduction
Every device connected to the internet — laptops, mobile phones, servers, IoT sensors, cloud microservices — must have a unique identifier.
That identifier is the IP address.
IP addresses form the foundation of how the internet works. Without them, routing, communication, websites, apps, cloud systems, and networks simply wouldn’t exist.
This article dives deep into how IP addresses work, their architecture, the complete Types of IP Addresses, and real-world system design implications — all with diagrams and examples.
What Is an IP Address?
An IP address is a unique numerical label assigned to each device on a network so it can communicate with other devices. It performs two key roles –
- Identification – Who the device is
- Location Addressing – Where the device is on the network
Examples:
- IPv4:
192.168.1.7 - IPv6:
2401:4900:1c39:2000::1
Why it’s needed:
- Device identification
- Routing
- Communication
- Internet protocols (HTTP, DNS, ICMP, etc.)
Easy Analogy
Just like your home address helps couriers deliver packages, an IP address helps the internet deliver data to the correct device.
3. Why Do We Need IP Addresses?
Here’s what IP addresses enable:
- Device Identification
- Every device — computer, router, phone — needs a unique identity.
- Routing
- Routers use IPs to forward data packets.
- Communication
- Websites, apps, and servers exchange information using IPs.
- Protocol Foundation
- HTTP, DNS, HTTPS, FTP — all depend on IP addresses beneath the application layer.
How Does an IP Address Work?
Understanding how IP address works is essential to understand the internet itself.
- Your Device Receives an IP Address
- When you connect to Wi-Fi or mobile data:
- Your router assigns a Private IP address to your device
- Example:
- Phone → 192.168.1.21
- Laptop → 192.168.1.22
- Private IPs are only used inside your home/office network.
- Example:
- Your ISP assigns a Public IP address to your entire network
- Example:
- Public IP → 49.37.112.43
- This is the IP address visible to websites and services on the internet.
- Example:
- DNS Converts Website Name to IP
- You type google.com, but the internet understands only numbers.
- DNS translates:
- google.com → 142.250.195.78
- So instead of searching by name, your browser now knows the exact server to contact.
- Your Data Travels in Packets
- Every request you make (loading a webpage, opening an app) is broken into small units called packets.
- Each packet contains:
- Sender IP: your public IP address (49.37.112.43)
- Receiver IP: the server’s IP (e.g., 142.250.195.78)
- Data (encrypted request information)
- Packets travel through:
- Your router
- Your ISP
- Multiple internet routers
- The destination server
- Important:
- Your private IP never leaves your network.
- Your router uses NAT (Network Address Translation) to convert your private IP into your public IP before sending packets out.
- Server Sends Data Back to Your Public IP
- The server processes your request and sends data back to:
- → 49.37.112.43 (your public IP)
- Your router receives this response and uses NAT to deliver it to the correct device inside your network:
- Phone → 192.168.1.21
- Laptop → 192.168.1.22
- This is how multiple devices share a single public IP.
- The server processes your request and sends data back to:
- Your Browser Shows the Final Page
- All the incoming packets are reassembled on your device, and your browser displays:
- The webpage
- Images
- Scripts
- Videos
- This entire process happens in milliseconds.
- All the incoming packets are reassembled on your device, and your browser displays:
IP Address Versions: IPv4 vs IPv6
1. IPv4 Address
- Uses 32-bit format
- Example:
192.168.1.10 - Total addresses: 4.3 billion
- Most widely used today
IPv4 Sub-Types
- Public IPv4 Address
- The IP used on the internet.
- Example:
103.21.244.0(Cloudflare)
- Private IPv4 Address
- Used inside home/office networks.
- Private ranges include:
- 10.0.0.0 – 10.255.255.255
- 172.16.0.0 – 172.31.255.255
- 192.168.0.0 – 192.168.255.255
- Examples:
192.168.x.x10.x.x.x172.16.x.x – 172.31.x.x
- Real use case:
Your router assigns192.168.1.5to your phone.
- Static IPv4 Address
- Never changes. Used for:
- Web servers
- CCTV systems
- Corporate VPNs
- Example:
205.251.242.103
- Never changes. Used for:
- Dynamic IPv4 Address
- Changes periodically via DHCP.
- Used by:
- Home Wi-Fi
- Mobile networks
Your IP might change when you restart your router.
2. IPv6 Address
IPv6 was created to overcome IPv4 exhaustion.
- 128-bit address
- Example:
2001:0db8:85a3::8a2e:0370:7334 - More secure, efficient, future-proof
IPv6 Sub-Types
- Global Unicast
- Internet-routable (public).
- Link-Local
- Works only in the local network.
- Example:
fe80::1ff:fe23:4567:890a
Unique Local Address (ULA)- Equivalent to private IPv4.
- Range:
fc00::/7
Multicast Address- Used to send data to multiple devices at once (like video conference streams).
IP Address Categories (Function-Based Types)
- Public IP Address
- Assigned by ISP to your network.
- Visible to websites.
- Example:
- Search “What is my IP” → the number shown is your public IP.
- Private IP Address
- Assigned by router for devices inside your home/office.
- Example:
- Laptop →
192.168.1.11 - Phone →
192.168.1.12 - Smart TV →
192.168.1.13
- Laptop →
- Static IP Address
- Permanent and manually assigned.
- Used by:
- Hosting companies
- Payment gateways
- Banking infrastructure
- Dynamic IP Address
- Automatically changes.
- Common for general users due to simplicity and security.
- Shared IP Address
- Multiple websites share one IP.
- Used in shared hosting.
- Example:
- 10 small blogs on Hostinger may share one IP address.
- Dedicated IP Address
- Only one website uses this IP.
- Better for:
- Email deliverability
- High-traffic sites
- SSL-based apps
- Loopback IP Address
- Special IP for testing on your own machine.
- Example:
127.0.0.1(localhost) - Developers use it for running servers locally.
- Reserved/Special IP Ranges
- Broadcast →
255.255.255.255 - APIPA (when DHCP fails) →
169.254.x.x
- Broadcast →
Real-world case:
If your device shows 169.254.10.5, your router failed to assign a valid IP.
Real-World Applications of IP Address
- Online Streaming Platforms
- Netflix uses your IP to show region-specific content.
- Banks & Security Systems
- Banks monitor login attempts based on IP to detect suspicious activity.
- Ride-Sharing Apps
- Apps like Uber use IP to approximate your location and connect to nearest server.
- Smart Homes
- Devices like:
- Alexa
- Smart switches
- Security cameras
all get private IPs assigned inside your home.
- Devices like:
- Corporate Networks
- Static IPs used for:
- VPN servers
- Firewalls
- Office intranet
- Static IPs used for:
Common Misconceptions About IP Addresses
- Myth: “IP address reveals your exact home address.”
- Fact: No. It reveals only a rough region or city.
- Myth: “Private IPs can be accessed from outside.”
- Fact: Impossible unless port forwarding is configured.
- Myth: “Static IP is always better.”
- Fact: For normal users, dynamic IP is more secure and cost-effective.
Common Topics
CIDR (Classless Inter-Domain Routing)
- CIDR notation tells how many IPs exist in a block.
- Example:
192.168.1.0/24→ 256 IP addresses10.0.0.0/16→ 65,536 IPs
- CIDR reduces routing table sizes and provides efficient address allocation.
- Interview Tip:
- Cloud networking frequently uses CIDR when designing VPCs and subnets.
Subnetting (Critical for Scalable Network Design)
- Subnetting divides a larger network into smaller networks (subnets).
- Example
10.0.0.0/16(65k addresses) can split into:10.0.0.0/2410.0.1.0/2410.0.2.0/24
- Why subnet?
- Better resource isolation
- Reduced broadcast traffic
- Increased security
- Organizing microservices / cluster nodes into zones
NAT (Network Address Translation)
- NAT allows private IP devices to access the internet using one public IP.
- Types of NAT:
- Static NAT – One-to-one mapping
- Dynamic NAT – Many-to-many mapping
- PAT (Port Address Translation) – Many-to-one (most common)
- Why NAT Matters?
- Cloud services use NAT heavily (AWS NAT Gateway, GCP Cloud NAT)
- Allows scaling without requiring millions of public IPs
- Provides security by hiding internal devices
IP Addressing in Cloud & System Design
- IP addresses are core to system architecture. Below are real-world scenarios you MUST know for interviews.
- Load Balancing
- L4 routing uses source/destination IP + port
- L7 routing uses HTTP/HTTPS
- Client IP is preserved using X-Forwarded-For
- Used in designing high-traffic systems.
- CDN & Edge Routing
- Client IP helps:
- Select nearest edge node
- Perform geo-routing
- Personalize content
- Block malicious traffic regionally
- Client IP helps:
- Virtual Private Cloud (VPC) Networking
- Cloud networks use IP blocks like:
10.0.0.0/16— main VPC10.0.1.0/24— public subnet10.0.2.0/24— private subnet
- This is essential knowledge for designing distributed systems.
- Cloud networks use IP blocks like:
- Microservices & Internal Networking
- Each service receives:
- Pod/Container IP
- Node IP
- Service IP (virtual)
- Routing uses kube-proxy, CNI plugins, and sometimes service mesh proxies.
- Each service receives:
- Kubernetes Networking
- Each pod has its own IP
- Pods across nodes communicate without NAT
- CNI (Calico, Flannel, Cilium) manages routing
- Service Mesh (Istio/Linkerd) intercepts traffic for:
- rate limiting
- security
- routing
- observability
- mTLS
Conclusion
The IP address is the backbone of how the internet works. Every click, tap, and request you make online relies on it. Understanding IP addressing—from IPv4 to IPv6, static to dynamic, public to private—helps you navigate networking fundamentals with confidence.
Whether you’re a tech enthusiast, system designer, web developer, or content creator, mastering this concept gives you a solid foundation in networking.