Private vs Public IPv4 Addresses – RFC 1918, NAT & Special Ranges
1. The Two Categories of IPv4 Addresses
Every IPv4 address in use today falls into one of two fundamental categories: public (globally routable on the internet) or private (reserved for internal networks, not routable on the internet). Understanding this distinction is one of the most foundational concepts in networking — it explains how billions of devices access the internet using only a few hundred million public IP addresses.
IPv4 address space (4.3 billion total): ┌─────────────────────────────────────────────────────────────────┐ │ PUBLIC IP ADDRESSES (majority of space) │ │ Globally unique — routable across the entire internet │ │ Must be registered and assigned by IANA → RIR → ISP → user │ │ Example: 203.0.113.1, 8.8.8.8, 142.250.190.46 │ ├─────────────────────────────────────────────────────────────────┤ │ PRIVATE IP ADDRESSES — RFC 1918 (~17.9 million addresses) │ │ Not routable on internet — reusable by any organisation │ │ 10.0.0.0/8 + 172.16.0.0/12 + 192.168.0.0/16 │ ├─────────────────────────────────────────────────────────────────┤ │ SPECIAL PURPOSE (loopback, APIPA, multicast, TEST-NET, etc.) │ └─────────────────────────────────────────────────────────────────┘ The bridge between private and public: NAT/PAT at the internet edge Private devices ──[NAT router]── Public internet
Related pages: IP Interface Brief | Static NAT | Dynamic NAT | PAT / NAT Overload | Wildcard Masks | IPv6
2. Public IP Addresses
A public IP address is an IPv4 address that is globally unique and routable across the public internet. Any device on the internet can send a packet to a public IP and it will be routed to its destination — subject to firewall and ACL policies at the destination.
- Global uniqueness: No two devices on the internet can share the same public IP at the same time
- Fully routable: Internet routers know how to forward packets to any public IP address via BGP routing tables
- Registered ownership: Every public IP block is registered to a specific organisation — lookups via WHOIS and ARIN/RIPE/APNIC databases show who owns each block
- Finite supply: IPv4 has only ~4.3 billion total addresses; public address exhaustion occurred regionally between 2011–2019
8.8.8.8 — Google Public DNS
1.1.1.1 — Cloudflare DNS
203.0.113.x — TEST-NET-3 (documentation only — not actually public)
142.250.190.46 — Google web servers
3. Private IP Address Ranges — RFC 1918
RFC 1918 (published 1996) defines three address blocks reserved for private networks. These addresses are free for any organisation to use internally — no registration required. Internet routers are configured to drop packets with RFC 1918 source or destination addresses, preventing them from being routed on the public internet.
| RFC 1918 Block | Address Range | Subnet Mask | CIDR | Host Count | Typical Use |
|---|---|---|---|---|---|
| Class A private | 10.0.0.0 – 10.255.255.255 | 255.0.0.0 | /8 | 16,777,214 hosts | Large enterprises, data centres, cloud VPCs — enormous space allows complex subnetting plans |
| Class B private | 172.16.0.0 – 172.31.255.255 | 255.240.0.0 | /12 | 1,048,574 hosts | Medium enterprises, Docker default bridge networks (172.17.0.0/16), VPN address pools |
| Class C private | 192.168.0.0 – 192.168.255.255 | 255.255.0.0 | /16 | 65,534 hosts | Home networks, small offices — most home routers default to 192.168.0.x or 192.168.1.x |
4. Special-Purpose IPv4 Addresses
Beyond the three RFC 1918 private ranges, IANA has reserved several other address blocks for specific purposes. These appear in exam questions and real-world troubleshooting — knowing them prevents misidentifying them as public IPs.
| Address / Range | Name | RFC | Purpose | Notes |
|---|---|---|---|---|
| 127.0.0.0/8 (127.0.0.1 most common) |
Loopback | RFC 1122 | Points back to the local device — packets sent here never leave the host's TCP/IP stack | Used to test local TCP/IP; "localhost"; ping 127.0.0.1 tests the IP stack itself |
| 169.254.0.0/16 | Link-Local / APIPA | RFC 3927 | Automatic Private IP Addressing — assigned by OS when DHCP fails; allows local communication only | Seeing a 169.254.x.x address means DHCP failed — the device cannot reach the internet |
| 192.0.2.0/24 | TEST-NET-1 | RFC 5737 | Reserved for use in documentation, examples, and books — should never appear in real traffic | Used on this page as example addresses; same as 203.0.113.0/24 (TEST-NET-3) |
| 198.51.100.0/24 | TEST-NET-2 | RFC 5737 | Documentation use only | Never route in production |
| 203.0.113.0/24 | TEST-NET-3 | RFC 5737 | Documentation use only | Used in Cisco documentation and CCNA examples as the "public IP" of a router |
| 224.0.0.0/4 | Multicast | RFC 5771 | Reserved for multicast group addresses — not assigned to individual hosts | 224.0.0.5 = AllSPFRouters; 224.0.0.6 = AllDRRouters; 239.x.x.x = organisation-local multicast |
| 240.0.0.0/4 | Reserved (Class E) | RFC 1112 | Reserved for future use; never allocated | Not routable; not usable in practice |
| 0.0.0.0/8 | Unspecified / This network | RFC 1122 | "Any address" in routing contexts; default route = 0.0.0.0/0 | 0.0.0.0 used as source in DHCP discover; 0.0.0.0/0 = default route matching all destinations |
| 255.255.255.255 | Limited Broadcast | RFC 919 | Broadcast to all hosts on the local subnet — not forwarded by routers | Used in DHCP Discover; OSPF all-hosts broadcast on some implementations |
5. Public vs Private — Full Comparison
| Criteria | Public IP Address | Private IP Address (RFC 1918) |
|---|---|---|
| Internet routability | Fully routable — internet routers forward packets to any public IP | Not routable — internet routers drop packets with RFC 1918 source/destination |
| Geographic scope | Global — reachable from anywhere on the internet | Local — reachable only within the same private network (or through VPN/tunnel) |
| Uniqueness requirement | Must be globally unique — no two active internet devices can share the same public IP | Only unique within the local network — the same RFC 1918 address can exist in millions of separate private networks simultaneously |
| Assignment authority | IANA → Regional Internet Registry (RIR) → ISP → end organisation — formal registration process | Network administrator or DHCP server — no registration required; use freely from RFC 1918 ranges |
| Cost | Scarce and increasingly expensive — ISPs charge per-IP or per-block | Free to use — no cost, no registration |
| Security exposure | Directly exposed to internet — must be protected by firewall, ACL, IPS | Hidden behind NAT by default — external hosts cannot directly initiate connections to private IPs |
| Services hosted | Internet-facing servers — web servers, mail servers, DNS servers, VPN endpoints | Internal users, printers, internal servers, IoT devices, IP phones, cameras |
| Internet access | Direct — no translation needed | Requires NAT/PAT translation at the internet edge |
6. How Public IPs Are Allocated — The Hierarchy
Public IP addresses follow a strict hierarchical allocation process. Understanding this hierarchy helps explain how internet routing works and why IP addresses are scarce.
Public IP allocation hierarchy:
┌─────────────────────────────────────────────────────────────────┐
│ IANA (Internet Assigned Numbers Authority) │
│ Manages entire IPv4/IPv6 address space (4.3B IPv4 addresses) │
│ Allocates large blocks to each Regional Internet Registry │
└──────────────────────┬──────────────────────────────────────────┘
│ Large blocks (/8 etc.)
┌──────────────────────▼──────────────────────────────────────────┐
│ Regional Internet Registries (RIRs) — 5 worldwide │
│ ARIN (North America) | RIPE NCC (Europe/Middle East/Central Asia)│
│ APNIC (Asia-Pacific) | LACNIC (Latin America) | AFRINIC (Africa) │
│ Allocate smaller blocks to ISPs and large organisations │
└──────────────────────┬──────────────────────────────────────────┘
│ Smaller blocks (/16 to /24)
┌──────────────────────▼──────────────────────────────────────────┐
│ ISPs (Internet Service Providers) │
│ Receive address blocks; assign public IPs to customers │
│ Dynamic IPs: typically 1 public IP per customer (changes over time)│
│ Static IPs: fixed public IP, paid extra — for servers/VPNs │
└──────────────────────┬──────────────────────────────────────────┘
│ Single IPs or small blocks
┌──────────────────────▼──────────────────────────────────────────┐
│ End users / organisations │
│ Home users: 1 public IP (dynamic, shared via PAT internally) │
│ Enterprises: block of public IPs (e.g., /29 = 6 usable) │
│ Data centres/cloud: large blocks for servers │
└─────────────────────────────────────────────────────────────────┘
IPv4 Exhaustion Timeline
| Event | Date | Impact |
|---|---|---|
| IANA final /8 allocation to RIRs | February 2011 | Central IANA pool exhausted — no more /8 blocks available to distribute to RIRs |
| APNIC (Asia-Pacific) exhaustion | April 2011 | First RIR to run out of free addresses |
| RIPE NCC (Europe) exhaustion | September 2012 | New allocations restricted to /22 blocks only |
| ARIN (North America) exhaustion | September 2015 | Waitlist implemented for new IPv4 requests |
| LACNIC (Latin America) exhaustion | June 2014 | Restricted allocations only |
| IPv4 addresses today | Ongoing | Traded on secondary market; prices reached $50–60 per IP in 2022–2024; IPv6 deployment accelerating |
7. NAT — Bridging Private and Public Addresses
Network Address Translation (NAT) is the mechanism that allows devices with private (RFC 1918) IP addresses to communicate with the public internet. The NAT router maintains a translation table mapping private address+port combinations to the public IP.
NAT/PAT at the network edge:
Home LAN (private) NAT Router Internet (public)
───────────────── ────────── ─────────────────
PC1: 192.168.1.10 ──────▶ Gi0/0 (inside) Gi0/1 (outside)
PC2: 192.168.1.11 ──────▶ 192.168.1.1 PAT 203.0.113.1 ──────▶ Google
Phone: 192.168.1.20 ─────▶ YouTube
DNS
What Google sees from all three devices: 203.0.113.1
(distinguished only by different source port numbers)
NAT translation table:
192.168.1.10:49200 ↔ 203.0.113.1:1024 → google.com:80
192.168.1.11:51000 ↔ 203.0.113.1:1025 → youtube.com:443
192.168.1.20:52100 ↔ 203.0.113.1:1026 → 8.8.8.8:53
Types of NAT
| NAT Type | Mapping | Port Translation | Inbound Connections | Use Case |
|---|---|---|---|---|
| Static NAT | One private IP → one public IP (permanent) | No | Yes — bidirectional | Web servers, mail servers, VPN endpoints that need to be reachable from internet — see Static NAT |
| Dynamic NAT | Many private IPs → pool of public IPs (one-to-one) | No | No — outbound only | Legacy — requires as many public IPs as concurrent users; rarely deployed today — see Dynamic NAT |
| PAT (NAT Overload) | Many private IPs → one public IP (using ports) | Yes — source port rewritten | No — outbound only (no port forwarding) | Standard for homes, offices, most internet connections — see PAT Lab |
8. How to Identify Private vs Public IPs Instantly
On any CCNA exam question or real-world scenario, you need to instantly identify whether a given IP is private, public, or special-purpose.
Quick identification flowchart:
Given an IP address — ask these questions in order:
1. Does it start with 10.?
YES → Private (RFC 1918 Class A) — 10.0.0.0 through 10.255.255.255
2. Does it start with 172. AND is the second octet 16–31?
YES → Private (RFC 1918 Class B) — 172.16.x.x through 172.31.x.x
TRAP: 172.15.x.x is PUBLIC; 172.32.x.x is PUBLIC — only 16–31 is private
3. Does it start with 192.168.?
YES → Private (RFC 1918 Class C) — 192.168.0.x through 192.168.255.x
TRAP: 192.0.2.x is TEST-NET (not private, not public)
4. Does it start with 127.?
YES → Loopback (never leaves the device)
5. Does it start with 169.254.?
YES → Link-Local/APIPA (DHCP failed)
6. Does it start with 224–239.?
YES → Multicast (not a host address)
7. Does it start with 240–255.?
YES → Reserved Class E (not usable)
8. None of the above → PUBLIC IP (globally routable)
Quick-Test Examples
| IP Address | Private / Public / Special | Reason |
|---|---|---|
| 192.168.0.1 | Private (RFC 1918) | 192.168.x.x range — Class C private |
| 10.0.0.1 | Private (RFC 1918) | 10.x.x.x range — Class A private |
| 172.16.0.1 | Private (RFC 1918) | 172.16–31.x.x range — Class B private |
| 172.15.0.1 | PUBLIC | 172.15 is NOT in the private range (must be 16–31) |
| 172.32.0.1 | PUBLIC | 172.32 exceeds the Class B private range (max is 172.31) |
| 192.0.2.1 | TEST-NET (Special) | Documentation/example address — not routable, not RFC 1918 |
| 127.0.0.1 | Loopback (Special) | Local host — never leaves the device |
| 169.254.1.50 | Link-Local APIPA (Special) | 169.254.x.x — DHCP failure indicator |
| 8.8.8.8 | Public | Not in any private or special range — Google DNS |
| 203.0.113.1 | TEST-NET-3 (Special) | RFC 5737 documentation address — not actually public despite appearing public |
9. Use Cases for Private IP Addresses
| Environment | Private Range Typically Used | How Internet Access Works |
|---|---|---|
| Home network | 192.168.0.0/24 or 192.168.1.0/24 (default on most routers) | Home router performs PAT — all devices share the single dynamic public IP assigned by the ISP |
| Small business | 192.168.x.x or 10.x.x.x for larger offices | Edge firewall/router performs PAT; may have static public IPs for hosted servers |
| Enterprise campus | 10.0.0.0/8 subdivided per site/VLAN — e.g., 10.1.0.0/16 per building | PAT at internet edge; MPLS WAN connects branches using private addresses; VPNs for remote access |
| Cloud VPC (AWS, Azure, GCP) | 172.16.0.0/12 or 10.0.0.0/8 — cloud providers default to these for Virtual Private Cloud subnets | Cloud NAT gateway for outbound; Elastic/Public IPs for internet-facing resources |
| Devices with no internet need | Any RFC 1918 range appropriate for the site | No NAT needed — printers, IP cameras, IoT sensors, internal servers communicate only within the LAN |
10. Private IP Addressing Challenges
Overlapping RFC 1918 Ranges
Because any organisation can independently use the same private IP range, conflicts arise when two private networks need to communicate directly — typically during mergers, acquisitions, or VPN connections.
Overlapping RFC 1918 problem:
Company A (192.168.1.0/24) ──[VPN]── Company B (192.168.1.0/24)
Both companies use 192.168.1.x !
A's router sees traffic to 192.168.1.50 → is this B's server or a local host?
Routing is AMBIGUOUS — packets may loop or be misrouted
Solutions:
1. NAT on one side — translate Company B's 192.168.1.x to a different range
before it crosses the VPN
2. Double-NAT — translate both sides to unique address ranges in the tunnel
3. Redesign one side to use non-overlapping address range
(best long-term solution — use 10.0.0.0/8 for large enterprises
to reduce overlap risk)
APIPA — When DHCP Fails
When a device cannot reach a DHCP server, Windows and other operating systems automatically assign a link-local address from the 169.254.0.0/16 range (APIPA — Automatic Private IP Addressing). The device can communicate with other APIPA hosts on the same segment but cannot reach the internet or other subnets.
- Seeing 169.254.x.x on a device is a clear diagnostic signal: DHCP is not reachable
- Common causes: DHCP server down, wrong VLAN, missing DHCP relay (ip helper-address)
- Fix: resolve the DHCP issue; force renewal with
ipconfig /renew(Windows) ordhclient(Linux)
11. Security: Private IPs, Public IPs, and NAT
| Security Aspect | Private IP | Public IP |
|---|---|---|
| Direct internet exposure | None by default — internal devices invisible to internet scanners as long as NAT is in place | Full exposure — any internet host can attempt connections; must be protected by firewall and ACLs |
| What NAT provides security-wise | NAT hides internal IPs — unsolicited inbound connections are dropped because no NAT entry exists for them. This is often called "NAT as a firewall" but it is NOT a substitute for a real firewall | |
| What NAT does NOT provide | NAT does not inspect packet content; does not block malware in allowed traffic; does not prevent connections initiated from inside the network (e.g., a compromised host calling home). A dedicated firewall with stateful inspection and IPS is required for real security | |
| Audit and logging | All activity behind PAT appears as one public IP — logs on external servers show only the public IP, making forensic attribution harder | Each public IP is uniquely identifiable and traceable via WHOIS/BGP to the owning organisation |
12. IPv6 and Private Addressing
IPv6 (128-bit addresses, 2¹²⁸ total) provides enough addresses to give every device on earth multiple globally unique addresses — address scarcity is eliminated, and NAT is no longer needed for address conservation.
| Concept | IPv4 Equivalent | IPv6 Version |
|---|---|---|
| Private addresses | RFC 1918 (10/8, 172.16/12, 192.168/16) | ULA — Unique Local Addresses (fc00::/7, most commonly fd00::/8) — same concept; not routed on internet; self-assigned; analogous to RFC 1918 |
| Loopback | 127.0.0.1 | ::1/128 — compressed from 0:0:0:0:0:0:0:1 |
| Link-local | 169.254.0.0/16 (APIPA) | fe80::/10 — automatically generated from MAC; always present on IPv6 interfaces; used for neighbour discovery |
| NAT requirement | Mandatory for internet access | Not needed — every device can have a global unicast address; NAT66 exists but is considered poor practice |
| Privacy | NAT hides internal IPs as a side effect | IPv6 privacy extensions (RFC 4941) generate temporary random global addresses for outbound connections |
See IPv6 Fundamentals for complete IPv6 addressing coverage.
13. Cisco IOS — Working with Private and Public IPs
! ── Checking interface IP addresses ──────────────────────────────────────── Router# show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0 192.168.1.1 YES NVRAM up up ← Private (inside) GigabitEthernet0/1 203.0.113.1 YES NVRAM up up ← Public (outside) Loopback0 10.0.0.1 YES NVRAM up up ← Private loopback ! ── Checking DHCP scope (what private IPs will be assigned) ──────────────── Router# show ip dhcp pool Pool LAN-Pool: Network: 192.168.1.0/24 Default router: 192.168.1.1 Lease 1 days Utilization: 23 out of 253 available addresses ! ── Check if an IP is routable (route lookup) ──────────────────────────── Router# show ip route 192.168.1.10 ! Private IP — will show "connected" or null route (not forwarded to internet) Router# show ip route 8.8.8.8 ! Public IP — will show the default route or specific route via ISP ! ── Checking NAT translations (private ↔ public) ──────────────────────── Router# show ip nat translations Pro Inside global Inside local Outside local Outside global tcp 203.0.113.1:1024 192.168.1.10:49200 8.8.8.8:80 8.8.8.8:80 ! ── Verify private IP DHCP assignment on a host ───────────────────────── C:\> ipconfig Ethernet adapter: IPv4 Address: 192.168.1.100 ← Private IP assigned by DHCP Default Gateway: 192.168.1.1 ← Router's private IP (performs NAT) ! ── Check what public IP the network uses (from outside perspective) ───── ! From any internal host, browse to: https://whatismyip.com ! Or from router: ping public-ip-checker website ! Or from router CLI (if DNS configured): Router# ping 8.8.8.8 source GigabitEthernet0/1
14. Key Points & Exam Tips
- RFC 1918 private ranges (memorise all three):
10.0.0.0/8 — Class A, 16.7M hosts
172.16.0.0/12 — Class B, second octet 16–31 only
192.168.0.0/16 — Class C, most common for homes - Exam trap: 172.15.x.x and 172.32.x.x are public IPs. Only 172.16–31.x.x are private.
- Private IPs are not globally unique — the same 192.168.1.0/24 exists in millions of separate networks simultaneously.
- Public IPs are globally unique — managed by IANA → RIR → ISP hierarchy.
- Devices with private IPs require NAT or PAT to reach the internet. PAT (overload) allows thousands of hosts to share one public IP.
- Special addresses to know: 127.x = loopback; 169.254.x.x = APIPA (DHCP failure); 224–239.x.x = multicast; 192.0.2.x/198.51.100.x/203.0.113.x = TEST-NET (documentation only).
- IPv4 exhaustion: IANA pool exhausted 2011; public IPs now traded on secondary market — NAT/PAT remains critical for IPv4 conservation.
- NAT is NOT a security solution: it hides internal IPs but does not inspect traffic, block malware, or prevent outbound attacks from compromised hosts. Always deploy a firewall alongside NAT.
- IPv6 ULA (fc00::/7) is the IPv6 equivalent of RFC 1918 — not internet-routed; used for private networks. IPv6 link-local (fe80::/10) is equivalent to IPv4 APIPA/169.254.
- Overlapping private ranges cause routing ambiguity when connecting two private networks via VPN — resolve with double-NAT or address redesign.
Related pages: IP Interface Brief | Wildcard Masks | Static NAT | Dynamic NAT | PAT / NAT Overload | DHCP | DHCP Relay Lab | ACL/Firewalls | IPv6 | Dynamic NAT & PAT Lab | Static NAT Lab