Pages

Friday, May 31, 2013

Private and Public IP Addresses: What’s the Difference ?


Internet Protocol (IP) addresses is usually of two types: Public and Private. If you have ever wondered to know what is the difference between a public and a private IP address, then you are at the right place.
In this post I will try to explain the difference between a public and a private IP address in layman’s terms so that it becomes simple and easy to understand.

What are Public IP Addresses?

A public IP address is assigned to every computer that connects to the Internet where each IP is unique. In this case, there cannot exist two computers with the same public IP address all over the Internet. This addressing scheme makes it possible for the computers to “find each other” online and exchange information. User has no control over the IP address (public) that is assigned to the computer. The public IP address is assigned to the computer by the Internet Service Provider as soon as the computer is connected to the Internet gateway.
A public IP address can be either static or dynamic. A static public IP address does not change and is used primarily for hosting web pages or services on the Internet. On the other hand, a dynamic public IP address is chosen from a pool of available addresses and changes each time one connects to the Internet.
Most Internet users will only have a dynamic IP assigned to their computer which goes off when the computer is disconnected from the Internet. Thus when it is re-connected it gets a new IP.

What are Private IP Addresses?

An IP address is considered private if the IP number falls within one of the IP address ranges reserved for private networks such as a Local Area Network (LAN). The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private networks (local networks):
10.0.0.0 – 10.255.255.255 (Total Addresses: 16,777,216)
172.16.0.0 – 172.31.255.255 (Total Addresses: 1,048,576)
192.168.0.0 – 192.168.255.255 (Total Addresses: 65,536)

Private IP addresses are used for numbering the computers in a private network including home, school and business LANs in airports and hotels which makes it possible for the computers in the network to communicate with each other.
Say for example, if a network X consists of 10 computers, each of them can be given an IP starting from 192.168.1.1 to 192.168.1.10. Unlike the public IP, the administrator of the private network is free to assign an IP address of his own choice (provided the IP number falls in the private IP address range as mentioned above).
Devices with private IP addresses cannot connect directly to the Internet. Likewise, computers outside the local network cannot connect directly to a device with a private IP. It is possible to interconnect two private networks with the help of a router or a similar device that supports Network Address Translation.
If the private network is connected to the Internet (through an Internet connection via ISP), then each computer will have a private IP as well as a public IP. Private IP is used for communication within the network where as the public IP is used for communication over the Internet. Most Internet users with a DSL/ADSL connection will have both a private as well as a public IP.
You can know your private IP by typing ipconfig command in the command prompt. The number that you see against “IPV4 Address:” is your private IP which in most cases will be 192.168.1.1 or 192.168.1.2. Unlike the public IP, private IP addresses are always static in nature.

Common Myth about Private IP Address:

Most people assume that a private IP is the one used for stealth Internet activities and hence cannot be detected. But this is NOT TRUE!.
Unlike what most people think, a private IP address (unlike the private telephone number) is just like any other IP address that belongs to a private network. In reality, there is no public IP address that is impossible to trace as the protocol itself is designed for transparency.
 

13 comments:

  1. Hey very very useful post. i really dont know difference btwin public and private IP until i read this article.
    thanks for sharing.
    Harsh

    ReplyDelete
  2. Helloo Sir,
    Just got update on your post comment...
    sir i want to know Who Coordinates IP Addresses ?

    Tamil arasan
    India

    ReplyDelete
    Replies
    1. Hi Tamil,
      Yes, The Internet Assigned Numbers Authority (IANA) is responsible for overseeing the global allocation of IP numbers, among other related protocols. IANA, once an autonomous organization, now works under the oversight of the Internet Corporation for Assigned Names and Numbers (ICANN). ICANN is also the organization responsible for assigning and maintaining Internet domain names, such as those ending in .com and .org. IP addresses, domain names, and other identifiers simplify the complicated process of connecting computers with each other so they can readily exchange information.

      Rgds,
      Arindam Bhadra

      Delete
    2. How many IP addresses can I use?

      Tamil arasan
      India

      Delete
    3. Link-Sat provides a set of 8 IP addresses at the time of site activation.

      Here is the example of how these IP addresses are used:
      1st IP is for network assignment (cannot be used)
      2nd IP is for RCST IP Gateway
      3rd, 4th, 5th, 6th and 7th for your router, PCs etc.
      8th one is for broadcast (cannot be used)

      A subnet mask and two DNS IP addresses are also provided for connected PCs.

      Rgds,
      Arindam Bhadra

      Delete
  3. Post is very good. For more deep dive read RFC 1918 for private address ranges.
    regards
    Shivlu Jain
    http://www.mplsvpn.info

    ReplyDelete
  4. Hi Arindam Sir,
    I have recently got my eyes on your blog. You are really doing great work and your tuts are found to be much useful.
    Between, I got a problem, hope you will try to solve it though its a Foolish.
    I have hosted one Counter Strike 1.6 Server and people can join the IP of my server to play CS. Some of the people uses hacks and cheat to get good score in game. As an admin I have command to ban those players by their IP who are cheating and annoying server rules. But today the main problem is that most of players uses dynamic IP, so there will be no use to ban them as they will join again the server after resetting their modem which in turn changes their IP [Banned IP].
    Is there any way to get rid of this problem. Like is there any way that I can stop all the possible IP’s from that players root ?

    -Shree

    ReplyDelete
  5. i want “What are Private and Public IP Addresses” in pdf file…
    so i can download it…

    thanks
    sanju

    ReplyDelete
  6. Patricia Gardiner

    I think you explain the whole situation very well.I have no point to raise in against of what you have said.

    ReplyDelete
  7. We are also in the business of biometric access control system, electronic access control system and office access control system exporting. Explore our wide range of Office Access Control System

    ReplyDelete