|13 min read

What is an IP Address? IPv4, IPv6, Public vs Private Explained

Every device connected to the internet has an IP address: a unique network label that helps data find the right destination. IP addresses are the routing foundation behind loading websites, sending email, streaming video, gaming online, and connecting apps to servers.

What is an IP Address?

An IP address, short for Internet Protocol address, is a numerical identifier assigned to a device on a network. It works like a return address and destination address for digital traffic.

The Internet Protocol gives packets enough addressing information to move across local networks, internet service providers, data centers, and global backbone networks.

There are two main versions in daily use: IPv4, the older and still very common version, and IPv6, the newer version designed to provide vastly more addresses.

IPv4 - The Original Standard

IPv4 has been the backbone of the internet since the early TCP/IP era. It uses 32-bit addresses written as four decimal numbers separated by dots.

IPv4 format: X.X.X.X (each X is 0-255)

Examples:
  192.168.1.1       -> Private address, often a home router
  8.8.8.8           -> Public address, Google DNS
  10.0.0.1          -> Private address, common in offices
  172.217.14.206    -> Public address, a Google server
  127.0.0.1         -> Loopback address, your own machine

Binary representation:
  192.168.1.1 = 11000000.10101000.00000001.00000001

Each octet: 8 bits x 4 octets = 32 bits total
Total possible addresses: 2^32 = 4,294,967,296

IPv4 can represent about 4.3 billion addresses. That once sounded huge, but phones, laptops, servers, virtual machines, routers, and IoT devices quickly consumed the available space. This shortage is why private addresses, NAT, and IPv6 matter.

IPv4 Address Classes

IPv4 addresses were originally grouped into address classes. Modern networks usually use CIDR instead, but the old classes are still useful background knowledge.

ClassRangeDefault maskPurpose
A1.0.0.0 - 126.255.255.255255.0.0.0Large networks
B128.0.0.0 - 191.255.255.255255.255.0.0Medium networks
C192.0.0.0 - 223.255.255.255255.255.255.0Small networks
D224.0.0.0 - 239.255.255.255N/AMulticast
E240.0.0.0 - 255.255.255.255N/AReserved or experimental

IPv6 - The Next Generation

IPv6 uses 128-bit addresses written in hexadecimal. It was created to solve IPv4 exhaustion and make modern networking easier to scale.

IPv6 format: eight groups of hexadecimal digits

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

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

Examples:
  ::1                    -> Loopback address
  fe80::1                -> Link-local address
  2606:4700:4700::1111   -> Cloudflare DNS
  2001:4860:4860::8888   -> Google DNS

Address space:
  128 bits = about 340 undecillion addresses
  • Much larger address space for global connectivity
  • Cleaner auto-configuration for devices joining a network
  • Simplified packet headers for routing efficiency
  • Better support for end-to-end addressing without heavy NAT
  • Built-in support for modern network security features

IPv4 vs IPv6 Comparison

FeatureIPv4IPv6
Address size32 bits128 bits
Address countAbout 4.3 billionAbout 340 undecillion
Format192.168.1.12001:db8::1
NotationDecimal with dotsHexadecimal with colons
NAT usageCommon because addresses are scarceLess necessary because addresses are abundant
AdoptionStill widely used everywhereGrowing steadily across ISPs, cloud, and mobile networks

Public vs Private IP Addresses

A public IP address is reachable on the internet. A private IP address is used inside a local network and is not directly routed on the public internet.

TypeMeaningExamples
Public IPAssigned by an ISP, cloud provider, or hosting networkWeb servers, VPN gateways, home router WAN address
Private IPUsed only inside local networksHome Wi-Fi devices, office laptops, printers, cameras
Loopback IPPoints back to the same device127.0.0.1 or ::1 for localhost testing

Common private IPv4 ranges

RangeAddress spanCommon use
10.0.0.0/810.0.0.0 - 10.255.255.255Large corporate and cloud networks
172.16.0.0/12172.16.0.0 - 172.31.255.255Medium internal networks
192.168.0.0/16192.168.0.0 - 192.168.255.255Home and small office networks

Static vs Dynamic IP Addresses

An IP address can be static or dynamic. The difference is how the address is assigned and whether it changes over time.

TypeHow it worksBest forTrade-off
Static IPManually assigned or reserved so it stays the sameServers, VPNs, remote access, DNS recordsUsually costs more or needs more management
Dynamic IPAssigned automatically, often by DHCPHomes, phones, laptops, normal browsingCan change after reconnects or lease renewal

How IP Communication Works

When you open a website, your device does not send data to a name directly. It resolves the name to an IP address, then sends packets toward that destination.

1. You enter www.example.com in a browser
2. DNS resolves the name to an IP address such as 93.184.216.34
3. Your device creates packets with:
   Source IP:      your device or router public IP
   Destination IP: 93.184.216.34
4. Routers forward the packets hop by hop across networks
5. The web server sends response packets back to your IP
6. Your router uses NAT to deliver the response to the correct device

Subnets and CIDR Notation

A subnet divides an IP network into smaller ranges. CIDR notation, such as /24, describes how many bits identify the network portion of an address.

Example network:

IP address:      192.168.1.100
Subnet mask:     255.255.255.0
CIDR notation:   192.168.1.0/24

Network address: 192.168.1.0
Broadcast:       192.168.1.255
Usable hosts:    192.168.1.1 - 192.168.1.254

Common CIDR blocks:
  /8   -> 16,777,214 usable IPv4 hosts
  /16  -> 65,534 usable IPv4 hosts
  /24  -> 254 usable IPv4 hosts
  /32  -> one exact IPv4 address

NAT - How Multiple Devices Share One IP

NAT, or Network Address Translation, lets many private devices share one public IPv4 address. It became essential because public IPv4 addresses are limited.

Private network:

Laptop       192.168.1.20
Phone        192.168.1.21
Game console 192.168.1.22

Router private IP: 192.168.1.1
Router public IP:  73.42.115.200

To websites, all three devices can appear as:
  73.42.115.200

The router tracks connections and forwards replies back
to the correct private device.

NAT is useful, but it can also complicate peer-to-peer connections, inbound hosting, gaming, VoIP, and remote access because outside systems cannot directly reach private devices without port forwarding or related techniques.

IP Geolocation - What Your IP Reveals

Your IP address can reveal approximate network location and provider details. It usually cannot identify your exact street address by itself.

Data pointTypical accuracyNotes
CountryHighUsually accurate for fixed broadband and mobile providers
Region or stateMediumCan be wrong when traffic exits through another region
CityLow to mediumOften approximate and ISP-dependent
ISP or organizationHighUsually visible from address allocation records
Exact street addressNot available from IP aloneRequires ISP records and legal process

Protecting Your IP Address

You cannot make normal internet use work without an IP address, but you can reduce how much your public IP exposes.

MethodWhat it doesWhen to use it
VPNRoutes traffic through a VPN provider IPGeneral privacy from websites and public Wi-Fi observers
TorRoutes traffic through several volunteer relaysHigher anonymity needs with slower performance
ProxySends selected app or browser traffic through another serverTesting, scraping controls, location-specific checks
Mobile dataUses a carrier network IP instead of home broadbandQuick separation from a home network IP
FirewallBlocks unwanted inbound trafficProtecting devices and servers

How to Find Your IP Address

Your public IP is the address websites see. Your private IP is the address your device uses on the local network.

Find your public IP:

Browser:
  Use a What Is My IP tool

Terminal:
  curl ifconfig.me
  curl ipinfo.io/ip
  curl https://api.ipify.org

PowerShell:
  (Invoke-WebRequest -Uri "https://api.ipify.org").Content
Find your private IP:

Windows:
  ipconfig

macOS:
  ifconfig
  ipconfig getifaddr en0

Linux:
  ip addr
  hostname -I

Check Your IP Address Now

Use our free What Is My IP tool to see your public IP address, approximate location, ISP, timezone, browser details, and network information instantly.

Check My IP Address

References

  • RFC 791 - Internet Protocol
  • RFC 8200 - Internet Protocol, Version 6 (IPv6)
  • RFC 1918 - Address Allocation for Private Internets
  • RFC 3022 - Traditional IP Network Address Translator
  • Google IPv6 adoption statistics
USTHJP