Network IP Addressing Explained with Clear Diagrams

What IP Addressing Actually Is

Every device connected to a network needs a way to be found. That's what an IP address does. It's a numeric identifier assigned to each device on a network—whether that's your laptop, a server in another country, or a smart thermostat in your home.

Without IP addresses, routers would have no idea where to send your data. They're like street addresses for the internet. The problem? Most people don't understand how they work, and that ignorance costs them hours of troubleshooting.

This guide cuts through the confusion. You'll learn how IP addressing actually functions, why IPv4 is dying a slow death, and how to work with IP addresses without wanting to throw your router out the window.

IPv4 vs IPv6: The Numbers Behind the Protocols

Two IP versions currently exist in the wild. One is running out of addresses. The other is the future—or at least, the future we've been promising ourselves for two decades.

IPv4: The Old Workhorse

IPv4 uses 32-bit addresses. That gives you about 4.3 billion unique addresses. Sounds like a lot until you realize:

We ran out of unassigned IPv4 addresses in 2011. The internet survived through NAT (Network Address Translation) and CIDR (Classless Inter-Domain Routing)—band-aids on a hemorrhage.

IPv6: The Fix Nobody Fully Adopted

IPv6 uses 128-bit addresses. That's approximately 340 undecillion addresses. Yes, undecillion. That's a 36-digit number. Every grain of sand on Earth could have its own IP address and you'd still have plenty left over.

IPv6 also eliminates NAT entirely, which reduces latency and simplifies routing. But adoption has been slow because:

If you're working on modern enterprise networks, you'll encounter IPv6. If you're troubleshooting a home router or working with most cloud providers, IPv4 is still king.

Breaking Down an IPv4 Address

An IPv4 address looks like this: 192.168.1.100

Each of the four numbers (called octets) ranges from 0 to 255. That's 8 bits per octet, totaling 32 bits. Simple math.

Here's what you'd see if you could visualize the binary underneath:

11000000 . 10101000 . 00000001 . 01100100

Each octet converts to decimal:

Understanding binary isn't just academic trivia. It matters when you start subnetting, because you're splitting networks based on bit boundaries.

Network Portion vs Host Portion

IP addresses have two parts: the network prefix (which identifies the network) and the host portion (which identifies the specific device).

Take 192.168.1.100 with a subnet mask of 255.255.255.0 (written as /24):

The subnet mask tells devices which bits represent the network. All devices on the same network share the same network prefix. The host portion differentiates them.

IP Address Classes (And Why They Matter Less Now)

Originally, IPv4 space was divided into fixed classes:

Class Range Default Mask Typical Use Max Hosts
A 1.0.0.0 – 126.255.255.255 /8 Large organizations 16,777,214
B 128.0.0.0 – 191.255.255.255 /16 Medium enterprises 65,534
C 192.0.0.0 – 223.255.255.255 /24 Small networks 254
D 224.0.0.0 – 239.255.255.255 N/A Multicast N/A
E 240.0.0.0 – 255.255.255.255 N/A Reserved N/A

Classes A, B, and C are for regular unicast (one-to-one) communication. Class D is for multicast. Class E is locked away in a drawer, never to be used.

The problem with classful addressing: it's brutally inefficient. A Class C network gives you 254 hosts. A Class B gives you 65,534. If you need 300 hosts, you're stuck with a Class B and wasting over 65,000 addresses.

CIDR fixed this. Instead of being locked into class boundaries, you can now assign exactly the number of addresses you need. Need 300 hosts? Use a /23 (512 addresses). Need 8 hosts? Use a /29 (8 addresses, 6 usable).

Public vs Private IP Addresses

This trips up a lot of people. Not every IP address is accessible from the entire internet.

Private IP Ranges

These ranges are reserved for internal networks only:

Your home router almost certainly uses 192.168.x.x. Most corporate networks use 10.x.x.x. These addresses cannot be routed on the public internet. They're meant to stay local.

Public IP Addresses

Everything else is public. Your ISP assigns you a public IP address (or multiple). This is what the internet sees when you load a webpage. Your router then uses NAT to share that single public IP among all your devices.

The 127.0.0.0/8 range is also reserved—it's localhost (127.0.0.1). Traffic sent to this address never leaves your machine. Useful for testing local services.

CIDR Notation: Subnetting Without the Pain

CIDR (Classless Inter-Domain Routing) replaced classful networking. Instead of relying on default masks, you specify exactly how many bits belong to the network.

/24 means the first 24 bits are the network. The remaining 8 bits are for hosts.

Common CIDR notations and what they mean:

CIDR Subnet Mask Network Bits Host Bits Usable Hosts
/30 255.255.255.252 30 2 2
/29 255.255.255.248 29 3 6
/28 255.255.255.240 28 4 14
/27 255.255.255.224 27 5 30
/26 255.255.255.192 26 6 62
/24 255.255.255.0 24 8 254
/16 255.255.0.0 16 16 65,534
/8 255.0.0.0 8 24 16,777,214

The formula is simple: 2(32 - prefix) - 2 = usable hosts. You subtract 2 because the network address and broadcast address aren't assignable to devices.

How to Find Your IP Address

You need to know how to check your IP addresses. Here's how on different systems:

On Windows

Open Command Prompt and type:

ipconfig

Look for "IPv4 Address" under your active network adapter. For more detail:

ipconfig /all

This shows your MAC address, DHCP server, DNS servers, and lease information.

On macOS/Linux

Open Terminal and run:

ip addr show

Or the older command:

ifconfig

Look for "inet" in the output. That's your IPv4 address. "inet6" is your IPv6 address.

Your Public IP (What's Visible to the Internet)

Your private IP behind a router won't show what the internet sees. To check your public IP:

curl ifconfig.me

Or just visit whatismyip.com in your browser. That's the address servers see when you connect to them.

How Subnetting Actually Works

Subnetting means taking a larger network and splitting it into smaller pieces. The reason you'd do this:

Here's a practical example. You have the network 192.168.1.0/24 (254 usable hosts). You need four subnets with about 50 hosts each.

Step 1: Calculate your new subnet mask

You need 4 subnets, so you borrow 2 bits from the host portion (22 = 4). Your new prefix becomes /26 (24 + 2).

Step 2: Calculate the new network boundaries

Each subnet now has 64 addresses total, minus network and broadcast, giving you 62 usable hosts per subnet. That's more than enough for 50 devices with room to grow.

Common IP Addressing Mistakes (And How to Avoid Them)

These errors show up constantly in real-world troubleshooting:

Tools Worth Knowing

You don't need to do IP math in your head. Use these:

Tool Purpose Platform
ipcalc Visual subnet calculator Web/Linux
Subnet Calculator (Tech-Utils) Quick subnet breakdowns Web
Advanced IP Scanner Discover devices on your network Windows
Angry IP Scanner Cross-platform network scanner All
Wireshark Analyze network traffic All

For quick CIDR calculations, search "CIDR calculator" and plug in your values. You'll see the network address, broadcast, range, and number of hosts instantly.

IPv6 Addressing: A Quick Primer

IPv6 addresses look nothing like IPv4. Instead of four decimal octets, you get eight groups of four hexadecimal digits:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

You can compress them. Leading zeros in each group are optional. Consecutive groups of zeros can be replaced with :: (but only once per address):

2001:db8:85a3::8a2e:370:7334

IPv6 eliminates subnet masks entirely. The prefix length is embedded in the address structure. Global unicast addresses typically use /64 by default.

Key IPv6 address types:

Getting Started: Build a Small Network

Want to practice? Here's a basic setup:

  1. Pick your address space — Use 192.168.10.0/24 for simplicity
  2. Determine your subnet mask — /24 gives you 254 hosts, plenty for a home lab
  3. Assign static IPs to servers — Put your gateway at .1, DHCP server at .10, DNS at .11
  4. Configure DHCP for clients — Let workstations grab addresses from .100-.200
  5. Set your gateway — Point everything toward your router's LAN IP
  6. Configure DNS — Use 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare) as upstream resolvers

Test connectivity with ping. Ping your gateway first, then an external address like 8.8.8.8. If those work but domain names don't, DNS is misconfigured.