Register Login

What is the difference between public and private IP address?

19 Dec 2019 11:28 am || 0

What is an IP Address?

An IP address stands for Internet Protocol address. It is the address of your computer or laptop. To be more specific, it is the binary number assigned to each device that is connected to a network. The device uses this Internet Protocol - a set of rules – for communication. Internet Protocol defines a set of guidelines used by devices to send and receive data packets over a network.

IPv4 addresses are 32 bit long. IPv6 addresses are 128 bits in length. Network administrators assign an IP address to all the computers within a network. These addresses may be static or dynamic.

The two major types of IP addresses are public and private IP addresses.

Read here: Difference between IPv4 and IPv6

In this article, we will look at both these types in detail.

Public vs Private IP Address

Basis of comparison Private IP addresses Public IP addresses
Coverage These addresses have local scope. Devices within a network use this to communicate These addresses have global scope.
Provided by Routers provide these addresses using NAT devices Internet service providers offer these addresses to you  
Range
  • 10.0.0.0 to 10.255.255.255
  • 172.16.0.0 to 172.31.255.255
  • 192.168.0.0 to 192.168.255.255
Besides the private IP addresses, the rest of the address is public addresses
Traffic All the data transfers using a private IP address stay within the network without any external interference The Internet Service Provider controls the data transfers using a public IP address
Cost These addresses are available free of cost These addresses come with a specific price

What is a Private IP address?

Private IP addresses are reserved addresses for internal use. They are used in local area networks and are so are also called local IP addresses. Networking devices such as routers provide these addresses using Network Address Translation (NAT) device.

The Internet Assigned Numbers Authority (IANA) reserves some address blocks for assigning IP addresses.

They are as follows:

  • 10.0.0.0 to 10.255.255.255
  • 172.16.0.0 to 172.31.255.255
  • 192.168.0.0 to 192.168.255.255

There is another set of IP addresses that range from 169.254.0.0 to 169.254.255.255. They are reserved for Automatic Private IP Addressing. A private IP address cannot be used to access the internet directly. You have to use a NAT device that replaces the private IP address with a public IP address. The private IP addresses within a local network have to be unique without any repetitions.

Why are Private IP addresses used?

Private IP addresses are used for home and business networks. These addresses offer a separate set of addresses for accessing a network. But it does not take up a lot of public address space. A prevalent private IP address for routers used all over the world is 192.168.1.1. The different devices that connect to it have addresses such as 192.168.1.2, 192.168.1.3, 192.168.1.4, and so on.

Devices within a network use the router for translating requests through public IP addresses. This process enables communication with other public IP addresses, and ultimately to the local networks. So when you want to access a website, your device that has a private IP address, makes a request. This request is made through a router. As a response, the site is sent to your device through a public IP address. The page is downloaded on your device and is routed to your local network.

A router receives a public IP address from an Internet Service Provider. Private IP addresses are assigned to devices that are connected to the router.

An essential feature of a private IP address is for communicating with file servers and printers. These devices do not require a connection to the network. They can use private IP addresses to connect. But these devices are secured and not exposed to the public.

What is a Public IP address?

Public IP is an IP address of a device that is used for communication outside the network. This is the address of your router at home or the office, which is provided by the Internet Service Provider.

That is why these addresses are also called Internet IP. Any web server or email server that you can access directly over the internet can have a public IP address. These public addresses are unique and can only be assigned to one unique device.

For security purposes, you may need to hide your public IP address. But you cannot hide this from the ISP as all your traffic moves through them. But there is a way to protect your IP address and encrypt your data transfers. This is possible through the use of a Virtual Private Network (VPN).

Why are Public IP addresses used?

Your Internet Service Provider uses public IP addresses for forwarding internet requests. So, when you try to access a website from your device, the request is sent to the router. This is done through a private IP address. Your router requests this webpage from your ISP using a public IP address. The request is processed. Then the ISP sends the address of the website back to your router.

The router sends the address to your computer or the device which raised the request.

A prevalent advantage of public IP addresses is remote access. In case you are far away from your computer and need to access it, the public IP address of your router is required. You can use remote access software such as AnyDesk and TeamViewer for this. You will find your public IP address from the router administration page.

How to differentiate what is a private IP or public IP?

As mentioned earlier, private IP addresses fall between the following ranges:

  • 10.0.0.0 to 10.255.255.255
  • 172.16.0.0 to 172.31.255.255
  • 192.168.0.0 to 192.168.255.255

So, any address falling between these ranges are private IP addresses. Other are public IP addresses.

To find out your private IP, you have to type ipconfig on the command line. For public IP, search what is my IP on Google.

Conclusion

If you are looking to set up a small network at home or a small office, private IP addresses will be useful. On the other hand, if they want to set up a network of broader coverage, public IP addresses will come in handy. You can secure your internet usage through public IP address using a VPN.