Private vs. Public IPs
Nerd Cafe
Lesson Overview
In this lesson, we will explore the fundamental differences between Private IPs and Public IPs, their use cases, and practical applications in networking. By the end of this lesson, you will understand:
What private and public IPs are.
The IP address ranges for private and public IPs.
What is an IP Address?
An IP address (Internet Protocol Address) is a unique identifier assigned to each device in a network that allows it to communicate with other devices. There are two types of IP addresses:
Private IPs – Used within a local network (LAN).
Public IPs – Used on the internet to identify devices globally.
What are Private IP Addresses?
Definition
Private IP addresses are used within a local area network (LAN) and are not routable on the internet. Devices within a home, office, or enterprise network use private IPs to communicate with each other.
Private IP Address Ranges
The IANA (Internet Assigned Numbers Authority) has reserved the following IP address ranges for private networks:
Class A
10.0.0.0 – 10.255.255.255
255.0.0.0 (/8)
~16 million
Class B
172.16.0.0 – 172.31.255.255
255.240.0.0 (/12)
~1 million
Class C
192.168.0.0 – 192.168.255.255
255.255.0.0 (/16)
~65,000
These IPs cannot be accessed directly from the internet.
Used in homes, offices, businesses, and data centers.
Assigned dynamically using DHCP (Dynamic Host Configuration Protocol) or manually.
Example of Private IP Usage
A Wi-Fi router at home assigns 192.168.1.10 to your phone and 192.168.1.11 to your laptop.
They can communicate inside the home network but need NAT (Network Address Translation) to access the internet.
What are Public IP Addresses?
Definition
A public IP address is a unique IP assigned by an Internet Service Provider (ISP) that allows a device to be accessible over the internet. Public IPs are routable on the internet.
Public IP Address Range
Any IP outside the private IP ranges is considered a public IP.
8.8.8.8 (Google DNS)
1.1.1.1 (Cloudflare DNS)
104.26.3.44 (Website IP)
Example of Public IP Usage
A web server with a public IP 203.0.113.10 can be accessed from anywhere in the world.
Your home router is assigned a public IP by your ISP to communicate with the internet.
Key Differences: Private vs. Public IPs
Usage
Local networks (home, office, business)
Internet access, websites, servers
Visibility
Not accessible on the internet
Accessible on the internet
Security
More secure (behind NAT/firewall)
Less secure (direct exposure)
Cost
Free
Assigned by ISP (can be static or dynamic)
Uniqueness
Can be used in multiple networks
Must be globally unique
Keywords
Private IP
, Public IP
, IPv4
, IPv6
, NAT
, Network Address Translation
, ISP
, Subnet Mask
, Router
, DHCP
, Static IP
, Dynamic IP
, LAN
, WAN
, Internet
, Firewall
, Port Forwarding
, Network Security
, IP Address Range
, Home Network
, نتورک پلاس
Last updated