GoHacking.com: Ethical Hacking and Cyber Security
Home » IP ADDRESS, LEARN HACKING - FOR BEGINNERS

What are Private and Public IP Addresses

Submitted by on Wednesday, 7 July 201022 Comments

Private and Public IP AddressesInternet Protocol (IP) addresses are 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 addres 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. Hence 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 webpages 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.

You can check your public IP address by visiting www.whatismyip.com

 

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.

Unlike what most people assume, a private IP is neither the one which is impossible to trace (just like the private telephone number) nor the one reserved for stealth Internet usage. In reality there is no public IP address that is impossible to trace since the protocol itself is designed for transparency.

Popularity: 3% [?]


Subscribe to GoHacking.Com


Enjoyed this article?
Subscribe to GoHacking.Com and get daily updates in your email for free


  By using/following this site you agree to our Legal Disclaimer

22 Comments »

  • Harsh said:

    Hey very very useful post. i really dont know difference btwin public and private IP until i read this article.

    thanks for sharing.

  • Vamshi said:

    Hi srikanth…

    GREAT WORK

  • Vamshi said:

    Hi srikanth…

    GREAT WORK…

    i have a question , if we can create viruses in C, why they are not effective in Linux?

  • Srikanth (author) said:

    @ Vamshi

    Virus created for windows in C/any language will not work on Unix/Linux due to change in the architechture.

  • highnurse said:

    great tips .information thank you alot hope more and more..

  • shivlu jain said:

    Post is very good. For more deep dive read RFC 1918 for private address ranges.

    regards
    Shivlu Jain
    http://www.mplsvpn.info

  • waffles said:

    i remember one time when i was inschool and used the “shutdown -i” command in cmd and shutdown everyone it was soo easy to do and it made them look stupid not knowing who did it.that was when i started my interest in “hacking” although that wasn’t really a hack more of a “thing to do”

  • Teddy said:

    it’s great reading here…

  • Anand said:

    thats a gr8 info dude.. thnk u..

    also i have question

    “In ma college LAN we are required to enter a username and password(in a small dialog box saying dat FIREWALL AUTHENTICATION REQUIRED) to access the internet.. the matter is they are given only 4 the faculties and not 4 the students” i tried a lot to find someone’s usrname & passwd but i cant…

    could u please help to break dis firewall authentication…?

  • silver-star said:

    thnx 4 sharin dis….

  • Deep said:

    Thanks, sir for giving so much information to us.
    But you haven’t solve my problem. That I have commented in “How to Alter Windows Product ID”. Please Srikanth sir help me. I will be thankful to you.

  • HELLHAWK0311 said:

    Awesome, I’m going to spend some time on this website. I’m impressed with the way you explain things.

  • basky said:

    thanks for sharing….. in our college they provide wi-fi connection ,can i increase my internet speed with any softwares r manually ? if u have any tips pls help me

  • momo said:

    thks sri

  • Rhodz Star said:

    it was really helpful and educational, I must continue reading and visiting this website…

  • Dheeraj said:

    Thanks for sharing knowledge on Private and public addresses.
    Theconcept is defined in very clear and understandable form.

  • Frank Jovine said:

    Well detailed article and something that can be of good use for forum owners as well.

  • Ranjith said:

    Great boss you have given very use full information……

  • Unah said:

    what are the curcumstances that would allow two computers to SHARE an IP adress? i know its possible. right now i am in a drop in center for homeless youth, and there are two computers. they both have the same IP adress.

  • Srikanth (author) said:

    @ Unah

    I think you can share a single IP with those computers on a LAN.

  • wilbert Daniel said:

    Hi gays this very very useful in it student like me…..

    thanks a lot

  • ahmed said:

    thanks for that information?????????????

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.