-3

The computers in my office share the same IP address. Having that in mind, how does the Internet know that when I request a file from a remote server, it is exactly my computer that should receive the file and not one of the other computers (in my office) that share the same IP address?

3
  • "All the computers in my office use the same IP address." No they don't. You can't have two machines on the same segment with the same IP address without a lot of trickery. Nov 15, 2011 at 10:06
  • 1
    I'm pretty sure he meant "the same IP address" as viewed from the Internet point of view. Nov 15, 2011 at 10:08
  • @Antoie, That's right. Nov 15, 2011 at 10:09

1 Answer 1

7

It uses the tuple (source ip, source port, dest port, dest ip).

Therefore it does not identify a computer but a connection and that is all that matters from an Internet-server point of view.

You router then has a table that allows him to know to which computer he needs to forward the connection. This is called NAT.

Not the answer you're looking for? Browse other questions tagged .