Difference Between Private IP and Public IP Address

Very important to learn the difference between private IP and public IP address, IP Addresses have different classifications and there are many different types of IP Address available for distribution likewise private, public, static, dynamic.A public IP address is the addresses provided by an ISP to identify a network to the world. It is globally unique. A private IP address is one within that larger network that is assigned to a specific device on that network. Here is what they mean

Reserved Private IP Addresses

Class Starting IP Address Ending IP Address Number of Hosts
A 16,777,216
B 1,048,576
C 65,536

What is Private IP Address

A private IP address is the address space allocated by InterNIC to allow organizations to create their own private network, Private IP addresses are reserved blocks that cannot be routed on the Internet and are intended for internal use, for a home your internal network will use private IP addresses. They will access the Internet with one (maybe more but not often) public IP addresses that your Internet Service Provider provides.

What is Public IP Address

A public IP address is the one that your ISP (Internet Service Provider) provides to identify your home network to the outside world. It is an IP address that is unique throughout the global internet. A public IP address is routable on the Internet and must be registered with IANA (Internet Assigned Numbers Authority)

The range of Public IP Addresses

Class 1st Octet Decimal Range Network/Host ID (N=Network, H=Host) Default Subnet Mask Number of Networks
A 1 – 126* N.H.H.H 16,777,216
B 128 – 191 N.N.H.H 1,048,576
C 192 – 223 N.N.N.H 65,536
D 224 – 239 Reserved for Multicasting
E 240 – 254 Experimental; used for research

Note: Class A addresses to cannot be used and it’s reserved for loopback and diagnostic purpose.

Why do we have two Addresses (Public and Private)

In IPv4, each address is represented using 4 bytes (32 bits), so the number of unique IP addresses we can generate is about 4.3 billion.  but the number of devices connected to the internet is much larger ( about 8.38 billion of a unit in 2017) So how do we assign a unique IP address to each device connected to the internet?

So, we have two types of addresses to overcome this problem. A private address is assigned to devices within your network. This IP address is used to uniquely identify your device within the network. So, most addresses we see, have the IP address starting with 192.168.x.x. These are the private IP addresses. The devices outside your network cannot see your private address.

To communicate with the rest of the world, all the devices in your network have a single public address (which is configured in your router). So anyone outside your network communicates with you using your public address. But, all the devices in the network have a common public address.

So, how will the message reach the correct device? This is done by your router which maps your public address with that of your private address. This process is known as NAT( Network Address Translation).

NAT is a method of remapping one IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device means it convert private IP address to public IP address and vice versa.

Leave a Reply

Your email address will not be published. Required fields are marked *