Public vs. Private IP Addressing 101: What Every Tech Professional Should Know!

One of the Key Topics in Networking is IP Addressing. You’ve probably heard of the term IP Address. I knew that IP Addresses allow devices to be located on the Internet, and kept moving. Little did I know there was even more to it, until I got into Cloud.
In this article, I will help you understand:
· What an IP Address is
· Public vs. Private IP Addresses
· Why both IP types matter in Cloud Computing
· How they work together
· How IP Addresses Are Assigned
So, what exactly is an IP Address?
An IP (Internet Protocol) Address is a unique ID for every device on a network. Just like every passenger on a plane has a seat number as an identifier. You can also think of it as your home address or even your phone number, which is unique to you.
An IP Address tells other devices on the internet where to send data. Without it, communication over the internet would not be possible.
This is why when companies experience a data breach, security professionals try to trace the IP address of the possible hacker.
Public vs. Private IP Addresses
What is a Public IP Address?
Think of a Public IP Address as the address to your house. As long as it is on the map, anyone can find it. Similarly, you can think of it as your phone number — anyone can call you as long as they have your phone number, regardless of where they are in the world.
Public IP Addresses allow devices to communicate with other devices outside their own network. These addresses are assigned to your device by its Internet Service Provider (ISP), and is necessary for accessing internet-based resources such as websites.
You can recognize Public IPs with the following samples: 104.24.10.22, 129.0.0.0, 1.0.0.0, 11.0.0.0, etc. They have a wide range of possibilities, unlike the Private IP addresses which are more limited
What is a Private IP Address?
A Private IP Address is used within local networks, like your home or office. It is unique to that local network, which means that it won’t directly connect to the internet.
Think of a desk phone in an office. Each staff has a desk phone with a unique extension number. You can use it to call colleagues internally, but people outside the office cannot reach you on that line because it is limited to the company network. Private IPs work the same way. They allow devices within the same network to communicate while staying hidden from the outside world.
This could be the IPs assigned to devices like printers, routers, or personal gadgets within a home or office network.
In a cloud setup, Private IPs are often used for communication between resources like virtual machines or databases.
You can recognize Private IP address with these range of samples: 10.0.0.0, 172.16.0.0, 192.168.0.0.
Key Differences Between Public and Private IP Addresses

Why Both IP Types Matter in Cloud Computing
Public IPs expose cloud resources to the internet, which is necessary for services that need to be publicly accessible, such as websites and APIs. However, making resources publicly accessible can introduce them to potential security risks.
Private IPs, on the other hand, keep resources safe within a network, making it harder for external users to access sensitive data. These IPs are commonly used for internal resources such as VMs, databases or application servers that do not need to be accessible on the internet.
Combining both types allows cloud architects to balance accessibility and security.
How they Work Together
When you connect to the internet, your router acts as a gateway between your local network and the public internet. It uses a method known as Network Address Translation (NAT) to combine the private addresses of all devices in your network, into a single public address. This makes it possible for multiple devices on the same local network to access the internet using the same Public IP Address.

In a Cloud Setup
Imagine a web application hosted in the cloud:
- The frontend server has a Public IP address, so users can access it via the internet. These IPs are globally unique, therefore, no two devices can use the same public IP.
- The database server, which only needs to talk to the frontend server, has a private IP for internal security and communication. When you create a cloud resource, it gets assigned a Private IP Address by default. This address is only visible within your cloud’s network or Virtual Private Cloud (VPC).
How IP Addresses Are Assigned
IP addresses can be either be assigned dynamically or statically.
· Dynamic Assignment: These assignments are made automatically, and may change over time. Many cloud providers use the Dynamic Host Configuration Protocol (DHCP) to allocate IPs. DHCP is a system that automatically assigns IP Addresses and other network settings to devices on a network. When you connect a device like laptop or phone to a network (your data or Wi-Fi), DHCP makes sure it gets a unique IP address without you having to set it up manually.
· Static Assignment: IPs are manually assigned and do not change. Static IPs are typically used for resources that need a fixed address, like servers for websites.
Most cloud platforms, like AWS or Azure, lets you choose between static and dynamic IPs based on your resource needs.

How to Check your Public and Private IP Address
For Public IP Address:
· On your browser, visit whatismyipaddress.com or ipinfo.io.
· Your Public IP Address will be displayed on the homepage.
For Private IP Address:
On your Windows OS:
· Open the Start menu, search for Command Prompt and open it
· Type ipconfig and press Enter
· Look for the IPv4 Address which is your Private IP.
On your Mac OS:
· Open Spotlight, search for Terminal and open it
· Type ifconfig and press Enter
· Look for inet entry e.g en0 or en1.
In Summary:
· Public IPs are for global communication over the internet, just like your mobile phone
· Private IPs are for secure communication within a local network, just like your office deskphone.
If you found this article helpful:
· Follow me on Twitter for more technical writing and cloud engineering knowledge.
· Connect with me on LinkedIn and drop a review on my page or featured section.