IP address

jmt356
SilverLounger
Posts: 2220
Joined: 28 Mar 2010, 01:49

IP address

Post by jmt356 »

I read online that every computer on a network has a unique IP address. If this is true, then why do my wife and I both get the same IP address when we check our IP addresses on http://www.speedtest.net/" onclick="window.open(this.href);return false;?
Regards,

JMT

User avatar
HansV
Administrator
Posts: 74428
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: IP address

Post by HansV »

Within your local network, each computer has its own IP address. If you open a command prompt window (Start > (All) Programs > Accessories > Command Prompt), type ipconfig and press Enter, you'll see this local IP address. However, all computers within your local network communicate with the internet through a single internet modem, and this modem uses the IP address assigned by your ISP (Internet Service Provider). The outside world (for example Speedtest.net) only sees the latter IP address; it can't look further than the modem, so it doesn't see the individual computers.

It is quite possible that your computer has the same local IP address as mine, or Stuart's. Since the outside world never sees these local IP addresses, they don't have to be globally unique. The IP address assigned by your ISP must be globally unique, however, otherwise chaos would ensue.
Regards,
Hans

User avatar
StuartR
Administrator
Posts: 11916
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: IP address

Post by StuartR »

The router supplied by your ISP does something called Network Address Translation (NAT). This enables multiple computers on your private network to share a single outgoing IP address.

The Wikipedia article above has this very helpful analogy.
Wikipedia wrote: A NAT device is similar to the receptionist at an office that has one public telephone number. Outbound phone calls made from the office all appear to come from the same telephone number. However, incoming calls have to be transferred to the correct private extension by an operator asking the caller who they'd like to speak with; private extensions cannot be dialed directly from outside.
StuartR


jmt356
SilverLounger
Posts: 2220
Joined: 28 Mar 2010, 01:49

Re: IP address

Post by jmt356 »

So only computers or devices on the SAME network have a unique ip address. But not all computers or devices have unique ip addresses.

Suppose you, Stuart and I all used AOL as our ISP. We each lived in different cities and had our own modems. AOL could still assign each of us the same IP address because we are all on different networks, even though we share the same ISP, right? It's only computers that are on the same network (i.e, share the same modem) that have ip addresses that are unique to one another, right?
Regards,

JMT

User avatar
HansV
Administrator
Posts: 74428
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: IP address

Post by HansV »

AOL would by necessity assign you different IP addresses, otherwise information intended for one of you would be sent to both of you. The IP addresses assigned by your ISP are globally unique.

It's a different matter for a local network that sits behind a router. Computers in such a network do not communicate with the outside world directly, only through the router. Within such a network, the computers must have distinct IPs, but those IPs can coincide with the IPs of computers in other local networks, because a computer in local network A will never communicate directly with a computer in local network B.
Regards,
Hans

User avatar
BobH
UraniumLounger
Posts: 8621
Joined: 13 Feb 2010, 01:27
Location: Temple - Deep in the Heart of Texas

Re: IP address

Post by BobH »

We need our semanticists and pedants here.

I think the correct statement is that within a network, a computer cannot have more than one IP address for that network. The same computer can have as many IP addresses as networks it participates on, each one being unique.

IP addresses are somewhat like telephone numbers: they must be unique or there would be collisions in signals and/or multiple sets would be rung. Area codes make it possible for the same 7-digit phone numbers (US example) to be used in each area but only once in that area.

If you want to learn more, I suggest your google for some packet switching articles and read them (but it might make your head hurt make you want to throw things at me for suggesting it).
Bob's yer Uncle!
(1/2)(1+√5)
Intel Core i5, 3570K, 3.40 GHz, 16 GB RAM, ECS Z77 H2-A3 Mobo, Windows 10 >HPE 64-bit, MS Office 2016

User avatar
HansV
Administrator
Posts: 74428
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: IP address

Post by HansV »

Perhaps this picture will help a bit.
x787.png
Router A forms a local network with PC 1 and PC2. PC1 and PC2 have different local IP addresses 192.168.1.0 and 192.168.1.1.
When they communicate with the internet, they do so through router A. The outside world only "sees" the IP address of Router A (14.20.231.65). When you run a speed test from PC1 or from PC2, it'll report 14.20.231.65 as IP address, not the internal IP addresses 192.168.1.0 and 192.168.1.1.

Router B forms a local network with PC3 and PC4. PC3 and PC4 have different local IP addresses 192.168.1.0 and 192.168.1.5. That one of these two coincides with the local IP address of PC1 doesn't matter because PC1 and PC4 don't see each other directly, but only through the routers. PC3 and PC4 see 14.20.231.65 as the IP address of both PC1 and PC2.

If an ISP assigned the same IP address to Router A and Router B, they would be indistinguishable, even if Router A is in the USA and Router B in Australia.
You do not have the required permissions to view the files attached to this post.
Regards,
Hans

User avatar
StuartR
Administrator
Posts: 11916
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: IP address

Post by StuartR »

Some IP addresses are Public addresses. They are unique and can be used by computers connected to the Internet
Some IP addresses are Private addresses. They can be used on a private network and they must not be connected to the Internet. The routers on the Internet will not forward packets that have these addresses as their target address.

There are also some other strange address ranges that are neither public nor private, but those don't concern us here.

There is a specific list of private IP addresses, and these are all available for use by things like your home router.
  • 10.0.0.0 to 10.255.255.255
  • 172.16.0.0 to 172.31.255.255
  • 192.168.0.0 to 192.168.255.255
A computer that uses any address in these ranges can only connect to the Internet via a NAT router.
StuartR