Public vs. Private IP Addresses

Almost every device you own has two IP addresses. This is often the biggest source of confusion when troubleshooting a network or setting up a server.

Public IP

This is the address the outside world sees. It is assigned to your router by your ISP (Comcast, AT&T, etc.). It must be unique across the entire internet.

Example: 93.184.216.34

Private IP

This is your internal address. Your router assigns these to your phone, laptop, and smart fridge so they can talk to each other without leaving your home network.

Example: 192.168.1.15

How they work together: NAT

Your router uses a process called Network Address Translation (NAT). It acts like a mailroom in a large apartment building. The building has one street address (the Public IP), but the mailroom knows which specific apartment (the Private IP) ordered a package.

When you request a website, the router "labels" that request with your private IP, sends it out through the public IP, and then routes the incoming data back to the correct device when it returns.

Common Private Ranges

You will notice that private IPs almost always fall into these specific "reserved" blocks:

Why do we need two?

The internet was built on IPv4, which only allows for about 4.3 billion addresses. Since there are far more than 4 billion devices on Earth, we would have run out of addresses decades ago without Private IPs.

By using one Public IP for an entire household of 20+ devices, we "save" billions of addresses. It also provides a layer of security: because your private IP isn't visible on the open web, hackers can't easily "see" your laptop directly behind the router.

Pro Tip: If you are trying to host a game or a server, you often need to set up Port Forwarding. This tells the router's "mailroom" exactly which internal IP should receive traffic on a specific port.