Internet 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 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.
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.
Hey very very useful post. i really dont know difference btwin public and private IP until i read this article.
thanks for sharing.
thanks for u r postng….
its really useful
really nice information for my business. thank u very much.infact this is the one i am looking for.
Hi srikanth…
GREAT WORK
Hi srikanth…
GREAT WORK…
i have a question , if we can create viruses in C, why they are not effective in Linux?
@ Vamshi
Virus created for windows in C/any language will not work on Unix/Linux due to change in the architechture.
great tips .information thank you alot hope more and more..
Post is very good. For more deep dive read RFC 1918 for private address ranges.
regards
Shivlu Jain
http://www.mplsvpn.info
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”
it’s great reading here…
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…?
thnx 4 sharin dis….
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.
Awesome, I’m going to spend some time on this website. I’m impressed with the way you explain things.
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
thks sri
it was really helpful and educational, I must continue reading and visiting this website…
Thanks for sharing knowledge on Private and public addresses.
Theconcept is defined in very clear and understandable form.
Well detailed article and something that can be of good use for forum owners as well.
Great boss you have given very use full information……
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.
@ Unah
I think you can share a single IP with those computers on a LAN.
Hi gays this very very useful in it student like me…..
thanks a lot
thanks for that information?????????????
how to know private ip of other…..well ur post r really awesome !!!
WHEN I M USING INTERNET,THEY R GIVING SAME SPEED……BT WHEN I M GOING 2 DIFFERENT SITES TO DOWNLOAD MOVIES ….THAN 1ST SITE TAKING 1HOUR TO DOWNLOAD BUT ANOTHER SITE TAKING 45MIN TO DOWNLOAD?/?
HOW THERE IS A DIFFERENCE OF TIME TO DOWNLOAD , IF INTERNET SPEED IS SAME??????????????
very good post friend
how would i trace a private ip address? please help!! thanx, danny
hi……….Srikanth……….
Can you pls tell me that the public ip address is assigned to router or computer????…
@ Pranjal
It is assigned to the router of the computer.
Nice post……………
i want “What are Private and Public IP Addresses” in pdf file…
so i can download it…
Your blog is mind blowing.. Its very helpful to know about this thing..
you can also check your ip by typing ipconfig/all in cmd..it also show mac address(physical address) of your network interface card.
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 ?
Srikant ji
Thanks for providing useful information on IP addresses.
Great work keep posting dude..
great job man……that is very helpfull….thankx alot…..
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?
@ 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: 127.0.0.1! 🙂
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
@ 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.
gud work sir:-)
hey smbody is opening my gmail account regularly from a similar ip address i want know who is this so please help me
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?
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?
@ 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.
good i very useful this
You are a genius sir, please keep up the good work you are doing.
Excellent answer!
realy nice explonation…..thank u………
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.
Thanks
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?
thanks sir from heartly,u are so genius sir.so thanks a lot u also send to my mail about hacking that will be grate full to u.thanks
I have one Doubt!
For Private networks why have we to use below IP addresses only
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)
In My college also using Same IP addresses
Can any one tell me why?
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 ?
Yes, computers on LAN have different private IPS but share the same public IP.
useful post, clearly mentioned in a brief way…
Very good post. I definitely love this site.
Keep writing!
Thanks Bro. Very easily explained.
very useful info, Thanks
Awsome info thnks a lot man