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

Private vs. 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 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.

You can check your public IP address by visiting

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): – (Total Addresses: 16,777,216) – (Total Addresses: 1,048,576) – (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 to 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 or 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.


  1. Harsh
    July 8, 2010 at 1:31 PM

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

    thanks for sharing.

    • narendra
      February 3, 2013 at 11:38 AM

      thanks for u r postng….
      its really useful

    • v.ramakrishnan
      March 3, 2013 at 1:40 PM

      really nice information for my business. thank u very much.infact this is the one i am looking for.

  2. Vamshi
    July 8, 2010 at 2:22 PM

    Hi srikanth…


  3. Vamshi
    July 8, 2010 at 2:24 PM

    Hi srikanth…


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

    • Srikanth
      July 8, 2010 at 6:10 PM

      @ Vamshi

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

  4. highnurse
    July 8, 2010 at 6:36 PM

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

  5. shivlu jain
    July 16, 2010 at 4:21 PM

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

    Shivlu Jain

  6. waffles
    July 17, 2010 at 5:04 AM

    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”

  7. Teddy
    August 7, 2010 at 1:34 AM

    it’s great reading here…

  8. Anand
    August 7, 2010 at 8:51 PM

    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…?

  9. silver-star
    August 13, 2010 at 4:33 PM

    thnx 4 sharin dis….

  10. Deep
    November 15, 2010 at 1:42 PM

    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.

  11. HELLHAWK0311
    December 17, 2010 at 10:47 PM

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

  12. basky
    January 13, 2011 at 10:14 PM

    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

  13. momo
    January 26, 2011 at 7:28 AM

    thks sri

  14. Rhodz Star
    January 26, 2011 at 12:07 PM

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

  15. Dheeraj
    February 15, 2011 at 6:52 PM

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

  16. Frank Jovine
    February 21, 2011 at 1:41 AM

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

  17. Ranjith
    March 11, 2011 at 2:22 AM

    Great boss you have given very use full information……

  18. Unah
    July 17, 2011 at 8:49 AM

    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
      July 27, 2011 at 2:51 PM

      @ Unah

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

  19. wilbert Daniel
    September 16, 2011 at 11:27 PM

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

    thanks a lot

  20. ahmed
    October 22, 2011 at 2:33 AM

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

  21. daljeet
    April 15, 2012 at 4:03 PM

    how to know private ip of other…..well ur post r really awesome !!!

  22. ricky
    April 29, 2012 at 1:48 AM



  23. pavan
    May 13, 2012 at 3:00 PM

    very good post friend

  24. how can i trace a private ip address
    June 12, 2012 at 6:14 PM

    how would i trace a private ip address? please help!! thanx, danny

  25. Pranjal
    July 15, 2012 at 3:26 PM

    Can you pls tell me that the public ip address is assigned to router or computer????…

    • Srikanth
      September 4, 2012 at 2:21 PM

      @ Pranjal

      It is assigned to the router of the computer.

  26. Shubham Agarwal
    July 21, 2012 at 9:05 PM

    Nice post……………

  27. sanju
    August 15, 2012 at 10:39 PM

    i want “What are Private and Public IP Addresses” in pdf file…

    so i can download it…

  28. Koushik
    August 21, 2012 at 4:43 PM

    Your blog is mind blowing.. Its very helpful to know about this thing..

  29. nirav DESAi
    September 14, 2012 at 8:20 PM

    you can also check your ip by typing ipconfig/all in also show mac address(physical address) of your network interface card.

  30. Shree
    September 25, 2012 at 7:59 PM

    Hi Shirkant 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 ?

  31. Rajkamal
    October 1, 2012 at 11:59 AM

    Srikant ji

    Thanks for providing useful information on IP addresses.

  32. SAM
    October 2, 2012 at 8:57 PM

    Great work keep posting dude..

  33. saad saleem
    October 6, 2012 at 11:28 AM

    great job man……that is very helpfull….thankx alot…..

  34. Begi
    October 29, 2012 at 9:27 PM

    Very useful post to people who do not understand what an Internal IP and what an External IP is.

    But i also have a question, since im not sure if the computers directly wired, without being behind a Router or Switcher(Router-like) have been assigned an Internal IP to them.

    Or does every computer have an Internal IP, even not being behind a Router which is directly wired?

    • Srikanth
      October 30, 2012 at 7:18 PM

      @ Begi

      If you’re using an Internet connection such as a USB modem, you’ll not be having a LAN IP such as 192.168.*.*. However, every computer has it’s own Internal IP (private IP), that is:! :)

  35. Muhammed
    November 11, 2012 at 6:26 PM

    Hi Srikanth,

    Can you help in the below scenario:

    am connected to the intrnt using a dongle. can you tel me who will act as the gateway my computer or the dongle….?

    i gt this doubt by readin this blog

    • Srikanth
      November 27, 2012 at 1:47 PM

      @ Muhammed

      None of the two will act as an Internet Gateway. The USB dongle just connects your computer to the nearest tower so that you can stream packet data from the tower to your computer. So, the actual Internet gateway would be the server in your ISP’s datacenter.

  36. ghaniya aftab
    November 14, 2012 at 8:59 PM

    gud work sir:-)

    • deepika
      December 11, 2012 at 10:05 PM

      hey smbody is opening my gmail account regularly from a similar ip address i want know who is this so please help me

  37. Dumpty Driller
    December 5, 2012 at 12:13 AM

    Hello! So im a bit confused. as today when i ran the ipconfig/all command, i got my ip address as well as something called dns servers also showed up! im using dialup connection! so for stealth and other activities which ip is used? the one i got on whatismyip or those dns servers?

  38. Atul
    December 30, 2012 at 11:01 PM

    Thanks for the info Srikanth.

    Since I’m a techno fob, i don’t have much knowledge in computer networking and all.

    I’ve a question- how can i safely hide my ip address or keep changing my address to some of the websites i regularly visit. They use cookies and some Java script to track my ip address.
    Which ip address goes to them public ip address or my private ip address? and what ever case how can i hide or change my ip address in order to be untraceable?
    I’ve tried some free proxy server solutions but that is not very safe and make my work very slow.
    do you have any solution for it?

    • Srikanth
      January 2, 2013 at 12:12 PM

      @ Atul

      When you surf the sites on the Internet, your public IP is the one that is tracked. It is possible to hide your IP using shareware software programs such as “Hide the IP”, “Hide my IP” and many more.

  39. suresh
    January 12, 2013 at 12:52 PM

    good i very useful this

  40. Pascal
    March 21, 2013 at 7:58 PM

    You are a genius sir, please keep up the good work you are doing.

  41. Pranav
    April 21, 2013 at 3:21 PM

    Excellent answer!

  42. rajesh
    June 28, 2013 at 4:47 PM

    realy nice explonation…..thank u………

  43. Terrence
    August 2, 2013 at 8:25 PM

    I was wondering. I was at my local bank today, and I noticed that the Ip of the device,which happened to be the printer had teh Ip address stuck right onthe front of the device. It looked like a Private Ip, but I was a bit concern that right under the IP Label, it had what the printer printed such as checks etc. Is this a best practice, as I just graduted with my major in IT and it concerned me.


  44. Els
    January 20, 2014 at 7:39 AM

    Correct me if I’m wrong but you state that no two computer can have the same public ip address. I thought every computer has the same public ip address when it’s behind a router > then going out to the internet. Doesn’t that make all of the computer in that local network, have the same public ip or am I totally wrong?

  45. sudhansu sekhar patro
    January 21, 2014 at 12:33 PM

    thanks sir from heartly,u are so genius thanks a lot u also send to my mail about hacking that will be grate full to u.thanks

  46. Venkatesh
    February 7, 2014 at 9:26 PM

    I have one Doubt!

    For Private networks why have we to use below IP addresses only – (Total Addresses: 16,777,216) – (Total Addresses: 1,048,576) – (Total Addresses: 65,536)

    In My college also using Same IP addresses
    Can any one tell me why?

  47. manoj kumar regar
    August 16, 2014 at 8:54 PM

    If two computers a are connected in a home network, can they have same public ip?
    Actually in my college we are given different private ips, i want to know, can any two of us have same public ip at the same time ?

    • Srikanth Ramesh
      August 21, 2014 at 3:57 PM

      Yes, computers on LAN have different private IPS but share the same public IP.

  48. sangeetha
    August 22, 2014 at 10:20 AM

    useful post, clearly mentioned in a brief way…

  49. juega gratis flappy bird
    August 24, 2014 at 7:11 AM

    Very good post. I definitely love this site.
    Keep writing!

  50. Akshat Verma
    October 28, 2014 at 6:23 PM

    Thanks Bro. Very easily explained.

  51. Munaf
    May 20, 2015 at 11:53 AM

    very useful info, Thanks

Leave A Reply