packet routing

david90

In Runtime
Messages
129
When 5 computers behind a NAT router browse the internet, how does the router know which computer to send the data that came back from the internet?

I just used a remote access program, logmein, and I'm wonder how it works without me configuring port forwarding in my router.
 
Well It's pretty simple.
You can think of it like a mail truck and ordering a catalog.
You send out the order for the catalog.
You put the order in your mail box, which gets to your mail truck guy.
Then he sends it through the mail to the specific address for the catalog.
The company with the catalog goes ok they want this.
Then sends back the catalog through the mail.
Sending it eventually to your mail guy.
Who then brings it to your house.

If you want to know more please Click Here
 
but if there are 5 houses, how does the mail man know which house to deliver the catalog to? I'm not talking about local LAN packets but packets from the internet. LAN packets have a destination and source address thus the router knows where to send the packets.

I'm talking about the internet packets. If I send a request to a server on the internet, the router strip my local ip and replaced it with the public IP from my ISP. When the request comes back, packet doesn't contain any information on which computer behind the router it is suppose to go to so how does the router know where to route it?
 
but if there are 5 houses, how does the mail man know which house to deliver the catalog to? I'm not talking about local LAN packets but packets from the internet. LAN packets have a destination and source address thus the router knows where to send the packets.

I'm talking about the internet packets. If I send a request to a server on the internet, the router strip my local ip and replaced it with the public IP from my ISP. When the request comes back, packet doesn't contain any information on which computer behind the router it is suppose to go to so how does the router know where to route it?

It doesn't necessarily "strip" your local ip.

You see websites that are running "http" are on port 80. "https" is port 443, "ftp" is port 21.

Your web browser and your router will listen to these ports after sending out a request. If the server does not respond say.. The catalog doesn't come in the mail. You would me mad of course.. What the browser does is time out. You then get a 400 (bad request), 404(not found) 408(timed out) error.

So the sending packet from the server(website) may not know the LAN computer. But the router and computer your on are listening for the request. Once they hear the request from the location you requested it is then displayed.
 
Back
Top Bottom