- Apr 13, 2013
- 3
- 0
- 0
I have been wondering something about packet routing for a while now. I believe the question can apply to both a LAN and a Proxy server, but clarification is needed.
My question is how does a router know which computer to route incoming packets to since the public ip address (destination ip in packet) of the network is the same for all incoming packets?
Say for example two computers are on a private network communicating through port 80. I understand these computers each have a private ip usually 10.*.*.* or 192.168.*.* but once the packets leave the router, they now have the same source ip address (that of the network).
The only thing I know that identifies packet source and destination are the source ip, destination ip, source port, and destination port. But both packets will be identical in these categories. So when two response packets from a website with identical information listed above reach your router, how does it know which packet goes to which host?
The same question can be asked about proxy servers. Since everyone using the proxy server will have the same public ip address, how does the proxy differentiate between identical packet header information. This applies to any number of connections, not just 2 like I gave in the example.
Is there more identifying information like a session number in packets that I am missing?
My question is how does a router know which computer to route incoming packets to since the public ip address (destination ip in packet) of the network is the same for all incoming packets?
Say for example two computers are on a private network communicating through port 80. I understand these computers each have a private ip usually 10.*.*.* or 192.168.*.* but once the packets leave the router, they now have the same source ip address (that of the network).
The only thing I know that identifies packet source and destination are the source ip, destination ip, source port, and destination port. But both packets will be identical in these categories. So when two response packets from a website with identical information listed above reach your router, how does it know which packet goes to which host?
The same question can be asked about proxy servers. Since everyone using the proxy server will have the same public ip address, how does the proxy differentiate between identical packet header information. This applies to any number of connections, not just 2 like I gave in the example.
Is there more identifying information like a session number in packets that I am missing?