Suppose that a Web server runs in Host C on port 80. Suppose this Web server uses persistent connections, and is currently receiving requests from two different Hosts, A and B. Are all of the requests being sent through the same socket at Host C?

Respuesta :

Answer:

No.  

All the requests are not being sent through the same socket as host C.

Explanation:

For every of the persistent connections, the web server creates a separate connection socket.

The various connection sockets created, are identified using the following four  details:

  • source  IP  address,
  • source  port  number,
  • destination  IP address,
  • destination  port  number

When port C receives an IP datagram, it examines these four fields in the datagram to determine which socket to pass the payload of the Transmission Control Protocol (TCP) segment. The TCP works with the Internet Protocol (IP), which defines how computers send packets of data to each other.

Requests from hosts A and B will pass through different ports. This is because although they have the same destination port of 80, they have different source IP addresses, due to the fact that they are from different hosts.

The two requests will pass through different sockets because they have  different  values  for  source  IP  addresses.