Public and Private IP Addresses
Overview
A public IP address is a unique IP address assigned to your network router by your internet service provider and can be accessed directly over the internet. A private IP address is a unique address that your network router assigns to your device. It is used within a private network to connect securely to other devices.
What is a Public IP Address?
A public IP address is an address provided that is provided by your internet service provider (ISP) to your network. On the internet, it recognizes your device. The internet is accessed through your router's public IP address. Public IP addresses are commonly used by publicly accessible enterprises such as websites, DNS, and VPN servers because they can be accessed from anywhere in the world.
You can not go online without having your public IP address, which identifies your device on the internet. Your router is an intermediate between your computer and the internet on a typical home network.
What is a Private IP Address?
A private IP address, also known as the local IP address, is the IP address your network router allocates to your device. This address is only visible within your network, so it is unavailable on the Internet. Each device on the same network is assigned a unique private IP address that allows them to communicate with other devices. The device in your home can have the same private IP address as your neighbors' device or anyone else's all over the world, with private IP addresses. This is due to the non-routable nature of private addresses.
Key Differences between Public and Private IP Addresses
The following are the key differences between a private and a public IP address.
Sr. No | Key | Private IP Address | Public IP Address |
---|---|---|---|
1. | Definition | A private IP address, also known as the local IP address, is the IP address that your network router allocates to your device. | A public IP address is the public-facing IP address provided to your network by your internet service provider (ISP). |
2. | Scope | These addresses have local scope. Devices within a network use this to communicate. | These addresses have global scope. |
3. | Communication | A private IP address is usually used to communicate with any other device in your house or office that is connected to your private network. | A public IP address is usually used to communicate outside your network. |
4. | Format | Private IP Addresses differ in a uniform manner. | Public IP Addresses differ in varying ranges. |
5. | Traffic | All data transfers using a private IP address stay within the network and are unaffected by external factors. | The Internet Service Provider (ISP) controls the data transfers using a public IP address. |
6. | Provider | A Local Network Provider creates the private IP addresses by the use of network operating systems. | The public IP addresses are controlled by internet service providers (ISP). |
7. | Cost | Private IP Addresses are free of cost. | Public IP Address comes with a cost. |
8. | Locate | Private IP Address can be found by entering "ipconfig" on the command prompt. | Public IP Address needs to be searched on search engine like google. |
9. | Numeric code | Private IP addresses use numeric code that is not unique and can be reused by any device connected to a private network. | Public IP addresses use a numeric code that is unique to each device and cannot be repeated. |
10. | Security | Private IP addresses are secure. | Public IP addresses are vulnerable to attack since they have no security. |
11. | Range | The private IP addresses range from: 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to 192.168.255.255 | Except for private IP addresses, all other IP addresses are public IP. |
12. | Example | 192.168.11.20 is an example of a private IP address. | 17.5.7.3 is an example of a public IP address. |
How to Tell If an IP Address is Public or Private?
You can determine if an IP address is public or private by analyzing and comparing its range to predetermined public and private IP address ranges. A private IP address usually begins with 192, 172, or 10, but this isn't the only aspect to consider; public IP addresses might also begin with 172 or 192.
Public and Private IP Address Ranges
Private IP Address Ranges
Private networks can use several IP address ranges assigned by the Internet Assigned Numbers Authority (IANA). These reserved IP address ranges are used by millions of private networks around the world. Private networks should utilize the following address ranges:
- Class A- 10.0.0.0 to 10.255.255.255
- Class B- 172.16.0.0 to 172.31.255.255
- Class C- 192.168.0.0 to 192.168.255.255
As a result, an IP address that falls between these ranges is considered non-routable because it is not unique. Any private network that requires IP addresses for internal purposes can use any address in these ranges without consulting IANA. Within this private address space, addresses are only unique within a particular private network. The private IP address ranges aren't that large, as you can see. However, because private IP address ranges can be reused in local networks, they do not need to be large, as local networks are entirely self-contained.
Public Address Ranges
All addresses outside private IP address ranges are considered public. But all the IP addresses that fall into one of the following predefined public IP address ranges are definitely public IP addresses. Public IP addresses are significantly more common than private IP addresses, and the public IP address ranges are:
- 1.0.0.0 - 9.255.255.255
- 11.0.0.0 - 126.255.255.255
- 129.0.0.0 - 169.253.255.255
- 169.255.0.0 - 172.15.255.255
- 172.32.0.0 - 191.0.1.255
- 192.0.3.0 - 192.88.98.255
- 192.88.100.0 - 192.167.255.255
- 192.169.0.0 - 198.17.255.255
- 198.20.0.0 - 223.255.255.255
Dive into the world of computer networking with our Free Computer Networking course! Enroll now & build a strong foundation in networking principles!
Conclusion
- Public and private IP addresses are the two major types of IP addresses. A public IP address is a public address assigned to your network by your internet service provider (ISP) and is used to provide access to the internet. A private IP address, on the other hand, is one that is assigned to your device directly by your network router.
- The key difference between these two IP addresses is that the public IP address connects your device to the wider internet, allowing you to access all of the information you need. A private IP address is frequently used to connect directly and securely to other devices within the private network.
- The public address range is any number not used in the private IP address, such as 8.8.8.8, whereas the private IP address range is 10.0.0.0-10.255.255, 172.16.0.0-172.31.255.255, and 192.168.0.0-192.168.255.255.