wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Intronet_eval_1_102025

Total questions: 10

Worksheet time: 15mins

Name
Class
Date
1.

1. Which of the following best describes the fundamental difference in the programming steps for creating a TCP socket server compared to a UDP socket server, as discussed in Labs 2 and 3?

a)

The TCP server must use listen() and accept() to manage a connection, whereas the UDP server is connectionless and only requires bind() and recvfrom().

b)

The UDP server requires the accept() method to establish a connection before data transfer, while the TCP server does not.

c)

The TCP server must include connect() and sendto() methods, while the UDP server uses bind() and listen().

d)
  • Both protocols require identical programming steps; the only difference is the transport protocol specified when creating the socket object.

2.

2. When developing the echo application, what is the primary advantage of using TCP over UDP?

a)

TCP is connectionless, offering higher throughput and lower overhead for small, one-time messages.

b)

TCP guarantees reliable delivery, flow control, and congestion control, ensuring the echo message is received correctly and in order.

c)

TCP allows the server to recognize the client's IP address and port number from the received packet without a prior connection setup.

d)
  • TCP does not require the client and server to use different port numbers, simplifying the setup process.

3.

3. What is the expected result if you start the TCP client application before the TCP server application, as posed in the Lab 3 assignment?

a)

The client will send a message but will never receive a response, resulting in a silent timeout.

b)

The client's connect() call will fail immediately (or after a short timeout), as no process is actively listening for connections on the specified port.

c)

The client's message will be buffered by the network and delivered immediately once the server starts.

d)

The client will proceed as normal because TCP uses connectionless datagrams, which do not require a prior server connection.

4.

4. In the UDP echo application (Lab 2), how does the server recognize the IP address and port of the client, given that UDP is a connectionless protocol?

a)

The server implicitly establishes a short-lived connection with the client, from which it extracts the client's address.

b)

The client's address is included in the IP header, and the recvfrom() method returns both the data and the sender's (client's) IP address and port.

c)

The server's socket is pre-configured with a list of allowed client IP addresses and port ranges.

d)

The client must first send a specific control message (like an ACK) that contains its address information to the server.

5.

5. Why is it mandatory to choose a listening port for the server greater than 1024, as specified in the lab instructions for both UDP and TCP sockets?

a)

Ports greater than 1024 are the only ports that support network address translation (NAT).

b)

Ports 0 to 1023 are reserved as 'Well-Known Ports' for standard Internet services (like HTTP, FTP, DNS) and often require special administrative privileges (root/administrator) to bind to them.

c)

Ports greater than 1024 have lower network latency because they are prioritized by the operating system kernel.

d)

Ports less than 1024 are only usable by the UDP protocol, making them unsuitable for the TCP socket lab.

6.

6. In Lab 1, to focus the analysis on the HTTP protocol, the Wireshark display filter was set to http. What is the primary purpose of using this display filter?

a)

To ensure only packets containing the HTTP protocol at the application layer are visible in the packet-listing window, reducing visual clutter.

b)

To prevent the browser from sending any packets other than HTTP requests.

c)

To tell Wireshark to only capture packets that originate from a web browser.

d)

To change the default listening port for the HTTP protocol from 80 to a custom port.

7.

7. What is the expected HTTP status code and an associated header in the server's response to the second HTTP GET request (Conditional GET) in Lab 1, assuming the file has not been modified since the first download?

a)

Status Code: 200 OK; Header: Last-Modified with a new date.

b)

Status Code: 404 Not Found; Header: Content-Length: 0.

c)

Status Code: 304 Not Modified; Header: No Content-Length or entity body.

d)

Status Code: 503 Service Unavailable; Header: Retry-After.

8.

8. When downloading a long HTML file (4500 bytes) in Lab 1, why is the single HTTP response message seen as a 'multiple-packet TCP response' in Wireshark?

a)

The file is too large to fit into a single TCP segment, so the single HTTP response message is fragmented into multiple TCP segments.

b)

The browser is sending multiple identical GET requests to ensure the large file is received.

c)

HTTP version 1.1 automatically uses multiple concurrent TCP connections to download large files faster.

d)

This occurs because the IP protocol automatically fragments the HTTP message before passing it to TCP.

9.

9. In the 'Embedded Objects' section of Lab 1, the base HTML file referenced two images from two different servers. How would a non-pipelined, persistent HTTP connection typically handle the retrieval of the two images?

a)

The two images would be downloaded serially (one after the other) over the same TCP connection used for the base HTML file.

b)

The browser would open two separate, non-persistent TCP connections and download the two images from their respective servers in parallel.

c)

The browser would open two separate TCP connections and download the two images from their respective servers in parallel.

d)

The base HTML file and both images would all be requested with a single GET message, then returned in one large response.

10.

10. According to the HTTP GET message analyzed in Lab 1, which header field is used to inform the server of the browser application and operating system being used by the client?

a)

Accept-Encoding

b)

Host

c)

User-Agent

d)

If-Modified-Since