0

For example:

I have 5 devices in my LAN, on one of them I request http://superuser.com, the server responds and the 'answer' gets to my home router (gateway), but from there, how does it know which device made the request?

Is there any information added to the package sent over the internet that identifies my computer within my LAN?

I figured maybe by MAC adress but I heard that MAC adresses don't pass outside your router onto the internet.

DavidPostill
  • 156,873

3 Answers3

0

Router keep table with the connections and as your computer make first connection to the site router know when receive packet who sent it and to whom to forward it. Its usually based on the serial number of the tcp/ip packet

Romeo Ninov
  • 6,295
0

It doesn't. The public server (in your example superuser.com) does not know whether the request comes from a single client computer that has one public IP address or from a client computer in a LAN behind a NAT-Gateway (your router).

There is no information added to the IP packet.

Your NAT-Gateway (your router) doesn't use MAC addresses to remember the client computer to server (website) mapping. The information that allows the NAT-Gateway to send the data to the right computer in your LAN are: - the sender's IP (i.e. superuser.com) - the recipient's IP (i.e. your computer #5) - the corresponding TCP or UDP ports

-1

Unfortunately, I have little information about how that works on an 'expert' level.

However, I do know that computers out on the Internet will send a packet to your computer using a process called Network Address Translation (NAT). Out on the Internet your whole LAN appears as one IP address, and all traffic sent there is sent in code, so the modem provided by your ISP will send it to the right place inside your home LAN.

If you have heard of Ports, NAT would make more sense to you.