Suppose I have a network of 40 to 50 computers in a LAN. Now suppose a system A open the website google. To open the website, the user of system A types the url in the browser. Now the request will first go the the switch, then the router of the whole network then to the google server via different other routers.
Now when the google gets the request, it will immediately sends the response with a web page. Now, when our network router gets the response, it will transfer it to the switch. Now the question comes here, how does the switch knows which system sends the request to google of 40-50 systems in the network.
How does the switch decide where to send the response ?