Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
William J. Terrell
17,403 PointsUnderstanding IP Addresses
Trying to understand IP addresses a bit more.
So, am I correct in understanding that, for everything that has an IP address, that thing is the only thing in the world with that particular IP address? So, for example, if I have a PC with an IP address of 192.100.100.100, no other PC, phone, smart-car, etc. in the world has that IP address, correct?
The other bit I am trying to understand is networks. I was reading this article that gives the following example:
"Let’s say you own two buildings and each is 254 stories high (because who doesn’t?). And on every floor there are around 250 different computers.
What you could do now is to create a neat IP address structure for your business. For instance, a computer on the 120th floor of your first building would be 10.1.120.x, and a computer on the 223rd floor of your second building would be 10.2.223.x. Get it?"
What I think he is saying is that, theoretically, you could have two buildings, maybe one with a network IP address of 199.99.99.98 and another with a network IP address of 199.99.99.99, and each of those buildings could have their own set of private IPs ranging from 10.1.1.1 - 10.254.254.254, correct?
So, in each building, there could be a computer that has the same 10.12.12.12 private IP, but since one is on a 199.99.99.98 and the other is on a 199.99.99.99, they would still be distinct, correct?
The reason I ask is because, if I do a lookup on http://www.infobyip.com/, I get a "client IP address", which is different from the IPv4 address I get if I type "ipconfig" in Command Prompt on my machine, and I'm curious as to whether or not two machines can have that same number (e.g. my machine and one in Tokyo)... I'm wondering which number is the distinct no-other-machine-in-the-world-can-have-this-number number. :)
If anyone would know of a good resource that explained IP address and similar topics in depth, I'd be interested. :)
Thanks!
2 Answers
Steven Parker
243,318 PointsYou seem to have a pretty good grasp of the concept.
Your example of the two buildings with the private networks seems pretty good. In fact, the machine I'm using right now has an IP address starting with "10" so it's very likely there are many other machines in the world with the same address. But since we never communicate directly to each other, it's not an issue.
For more info, you might start with the Wikipedia page. Anything you might want to know not covered on the page itself would likely be in one of the linked references.
Russell Sawyer
Front End Web Development Techdegree Student 15,705 PointsIP addresses are limited yes but how they are counted are by house hold. Each router has only one IP address that the world sees. You can have multiple IP address in your private network using 192.168.1.1 or 10.10.10.1 and changing the last three octets for as many devices as you have. But when you transmit through your router to the www then you are using your one IP address you pay for from your service provider. Businesses can have multiple IP address based on network usage but still will use multiple internal networks.
Google has a neat trick where you can type "What is my IP address" and it will come back with your IP address you pay for. Keep in mind we are using IPV4 which gives us 4.3 billion IP address currently. IPV6 uses hexadecimal and there are 7.9×10^28 more IP addresses than IPV4. Not sure how many that is but it's a lot. :)
Hope this helps