In this article, we will see the difference between a private and public IPv4 address. These two different IP addresses are often confusing to computer network beginners. After reading this article, you will be able to identify a private and public IPv4 address.
The difference between a private and a public IPv4 address is that a private IPv4 address is only accessible on a private network, while a public IPv4 address is accessible on the Internet, i.e. everywhere in the world.
Read also IPv4 Addressing and Subnetting – CCNA 200-301 (dir-tech.com)
What is an IP address?
An IP (Internet Protocol) address is therefore an identification number that is permanently or temporarily assigned to each device connected to a computer network that uses the Internet Protocol.
The IP address is the basis of the routing system for data packets on a computer network.
IP addresses are used to uniquely identify hardware devices on a computer network.
They allow these devices to connect to each other and transfer data over a local network or the Internet.
To date, there are two versions of IP addresses. We have IP addresses version 4 (IPv4) and IP addresses version 6 (IPv6).
What is a private IPv4 address?
A private IP4 address is an IP4 address used on a private network. These addresses cannot be routed over the Internet.
Private IPv4 addresses are assigned to computers to provide connectivity in a private space. For example on a local company network or on a home network.
Here are the ranges of the private IP4 addresses:
|IPv4 class||Start of IPv4||End of IPv4|
IPv4 addresses that are not in the above ranges are either Public addresses or Reserved or Broadcast addresses.
A private IPv4 address is unique in a local network (company or home network).
How to verify a private IP4 address on a computer?
To verify a private IPv4 address on a computer with a Windows operating system, use the ipconfig command:
It is also possible to check the address directly in the Windows network settings. To do this, go to Settings and then to Network and Internet.
For Linux operations, Ubuntu in particular, you must use the ifconfig command:
What is a public IPv4 address?
A public IPv4 address is therefore an address that is accessible from anywhere, i.e. accessible through the Internet. To connect to the Internet, a device must use a public IP address.
The public IP4 address is a unique IP address in the world. To get this unique address in the world, you must pay to an Internet Service Provider (ISP).
For example, if you have a server at home and you want it to be accessible on the Internet, you must use a public IP address.
You will then ask yourself why my computer has a private IP address, but manages to connect to the Internet? Well, your computer goes through your router with a public IP address to get on the internet.
The router uses a protocol called NAT (Network Address Translation) to allow your computer to connect to the Internet.
All IPv4 addresses, except for private IPv4 addresses, are included in the public IP4 address.
You can refer to the table above for the private IP addresses and their range.
How to verify a public IPv4 address on a computer?
To check your public IP address, you have to check it directly on the interface of your router.
It is also possible to check your public IP address via your browser if your computer is connected to the Internet.
To do this, go to Google and type: What is my IP address?
However, to find out the public IP address of a website, go to outilsdomaine.com and in the reverse IP search section paste the website address. See the example below.
Private IP address vs. public IP address
|Private IP address||Public IP address|
|Internal (local) scope||External (global) scope|
|Used to communicate within your private network (business or home), with other devices in your home or office||Used to communicate outside your private network, on the Internet|
|A non-unique numerical code that can be reused by other devices in other private corporate or home networks||A unique numerical code never reused by other devices|
|Verifiable in the internal settings of your device||Checkable on your router or on Google by typing: “What is my IP address?”|
|Assigned to your specific device within a private network||Assigned and controlled by your Internet Service Provider (ISP)|