Two different websites have been opened from two different browsers(for instance chrome and firefox) on the same IP Device(PC) connected to the same router. When the response comes from far end, it's received by the router and then sent to the IP devices which has requested for it. How does the router decide which request have come from which browser? I am assuming, routers only have knowledge about IP addresses of the devices and not the browsers which is running on the device. So is the operating system involved in this decision making? Or is there something else happening?

  • Routers don't know or care about applications like web browsers. Routers forward each packet based on the destination address on the packet.
    – Ron Maupin
    Mar 14 '17 at 14:58

You're mixing up various layers of the Internet Protocol Suite (or OSI model if you like). Routers do not interact with browers directly. Routers interact with hosts, which have IP addresses. As far as the router is concerned, both requests come from the same IP address, so return traffic goes back to that IP address, and it's up to that host to decide what to do with it.

Each browser on the host uses TCP/IP to communicate with the remote webserver, and each browser uses a different unique TCP source port to send traffic from. The host can distinguish based on this port number, so the TCP/IP stack on the host uses that to pass return traffic to the correct browser.

  • Thank you so much. I really needed some clarity on this.
    – SAM Jr
    Mar 14 '17 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.