How does an HTTP server distinguish between the request received from computers behind one router?

by on March 5, 2013

Q: How does Http server distinguish between the request received from computers behind one router?

HttpServer operates on port 80. It receives and send only at port 80.
Computers behind the routers have local ip address which only works in local area network. This happens because it allow more computer to connect to internet. Allowing 1 public ip address which is usually given by ISP to be used by many. The way NAT routers distinguish between incoming data that which computer it belongs to behind it is by assigining a port to local ip address and saving this information. So if it sends something at ip 130.222.222.222 it puts port with it.
But the conflict is here:
Http Server listens to port 80.
Yet Routers must use random ports to distinguish among computers connected to it.
So what am i missing.


One Response to “How does an HTTP server distinguish between the request received from computers behind one router?”
  1.  

    Techsin – I think the part that you’re misunderstanding is the TCP handshake negotiation. This is where your computer makes the initial connection on port 80 then another port is established. I don’t usually like just posting links to things but this is one answer that needs more explination then I can describe here.
    http://www.inetdaemon.com/tutorials/internet/tcp/3-way_handshake.shtml

    Hope this helps!
    Fletcha