How do services and applications differentiate between two PCs in the same network if they have the same public IP?

199 viewsOtherTechnology

How do services and applications differentiate between two PCs in the same network if they have the same public IP?

In: Technology

4 Answers

Anonymous 0 Comments

your router uses a thing called Network Address Translation (NAT). https://en.wikipedia.org/wiki/Network_address_translation

it keeps a list of all the devices on your network and their private internal ip, then when one of them sends a message to the internet, the router takes the message and swaps the private ip for the public ip, and sends it out on the internet. it also changes the “reply to this port” field (each IP has like 60000 different ports it can use to get messages).

it then keeps a table of which port is expecting a reply, and what the original private ip and port were, then when the router gets a reply on that port, it again swaps out the informztion for the original and sends the packet to the private ip internally.

You are viewing 1 out of 4 answers, click here to view all answers.