
Every device connected to a network—your phone, laptop, smart TV—needs a way to be identified.
That’s where IP addresses come in.
Think of an IP address like a home address
Without it, data wouldn’t know where to go… and your cat videos would be lost forever.
IP Addresses
An IP address is a unique identifier assigned to each device on a network, much like a postal address for your house.
IPv4: The Original Addressing Scheme
- Format: Four numbers separated by dots (e.g.,
192.168.1.10).
- Range: Each number can be from 0 to 255 (e.g.,
0.0.0.0 to 255.255.255.255).
- Limitation: This only allows for about 4.3 billion addresses, which is why we are running out and transitioning to IPv6.
Public vs. Private IP Addresses:
- Public IP: Your network’s address on the internet. Assigned by your ISP. It’s unique globally. You can find yours by googling “what is my ip”.
- Private IP: Used inside a private network (e.g., your home Wi-Fi). Devices on your home network have private IPs. Your router translates between private and public IPs (NAT).
- Common private ranges:
10.0.0.0 – 10.255.255.255
172.16.0.0 – 172.31.255.255
192.168.0.0 – 192.168.255.255 (Most common in homes)
IPv6: The Modern Solution
- Format: Eight groups of four hexadecimal digits separated by colons (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334).
- Advantage: A virtually unlimited number of addresses (
340 undecillion).
Subnets
A subnet (sub-network) is a logical subdivision of a larger IP network. Think of it as splitting a large apartment building into smaller, manageable floors.
Why Use Subnets?
- Organization: Group devices logically (e.g., one subnet for Finance, another for Engineering).
- Security: Isolate traffic. A device in one subnet can’t easily talk to a device in another without a router, improving security.
- Performance: Reduces network congestion by limiting broadcast traffic.
The Subnet Mask
The subnet mask defines which part of an IP address is the network portion and which part is the host portion (the specific device).
- A simple mask for a home network:
255.255.255.0
- Let’s break down
192.168.1.10 with this mask:
- Network Portion:
192.168.1 (defined by the 255s)
- Host Portion:
.10 (defined by the 0)
This means all devices with IPs from 192.168.1.1 to 192.168.1.254 are on the same local network.
CIDR Notation (The Shortcut)
Instead of writing 192.168.1.0 with a mask of 255.255.255.0, we use CIDR notation: 192.168.1.0/24
- The
/24 means the first 24 bits of the address are the network part. This is the same as 255.255.255.0.
Common examples:
/24: 255 addresses (typical home network)
/16: 65,535 addresses (large business)
/32: A single host (often used in firewall rules)
DNS (Domain Name System)
DNS is the phonebook of the internet. Humans remember names like google.com, but computers use IP addresses like 142.251.32.206. DNS translates the name to the number.
How DNS Lookup Works (Simplified)
When you type google.com into your browser:
- Your computer asks a Recursive Resolver (usually provided by your ISP or a public service like Cloudflare’s
1.1.1.1 or Google’s 8.8.8.8).
- The resolver asks the Root DNS Servers: “Where can I find
.com?”
- The root servers point to the .com TLD (Top-Level Domain) Servers.
- The resolver asks the .com TLD: “Where can I find
google.com?”
- The TLD servers point to the Authoritative Name Servers for
google.com.
- The resolver asks Google’s name servers for the IP address of
google.com.
- Google’s server responds with the IP address (
142.251.32.206).
- The resolver tells your computer the IP address.
- Your computer connects to
142.251.32.206.