Questions: Port Addressing and Sockets

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A web server is listening on port 443. Simultaneously, 500 clients from different locations are each connected to it. How is this possible given that port 443 is a single 16-bit number?

AThe server opens a new, unique port number for each client after the initial handshake
BEach TCP connection is uniquely identified by the four-tuple (source IP, source port, destination IP, destination port), so many connections can share the same server port
CUDP is used instead of TCP so the server does not need to track individual connections
DThe operating system assigns a distinct IP address to each simultaneous connection
Question 2 Multiple Choice

A developer tries to start a server on port 8080 and receives an 'address already in use' error. What is the most likely cause?

APort 8080 is a well-known port reserved for standard services and cannot be bound by user applications
BThe operating system has exhausted its ephemeral port range and can no longer accept new connections
CA socket bound to port 8080 still exists — likely a recently closed TCP connection still in the TIME_WAIT state
DThe developer's firewall is blocking port 8080 from being bound locally
Question 3 True / False

A server process listening on port 80 can handle at most one TCP connection at a time, because a port is a single number and two connections cannot simultaneously share the same port.

TTrue
FFalse
Question 4 True / False

Ephemeral ports are temporary port numbers assigned by the operating system to the client side of a connection, ensuring that the server's reply packets are routed to the correct application process on the client.

TTrue
FFalse
Question 5 Short Answer

A web server listens on port 443. When a client connects, the OS assigns an ephemeral port as the connection's source port. Why is this ephemeral port necessary, and what would go wrong if all client connections used the same source port?

Think about your answer, then reveal below.