Machine-translated by Google. Questions are authored in English.
Top

TCP/IP Questions and Answers

1.

Which of the following protocols assign(s) dynamic IP? i) POP ii) DHCP iii) BOOTP iv) SNMP v) ICMP

Exam Year(s)

DSSSB TGT - 2023,

Answer: B

The protocols that assign dynamic IP addresses are DHCP and BOOTP, so ii and iii only. DHCP hands out addresses to hosts from a pool, and BOOTP is the older protocol that does a similar job. POP is used to retrieve mail from a server, SNMP is used for network management and ICMP carries error and control messages, so none of those three assigns an IP address. DHCP runs on a server that leases an address to each host for a period, and BOOTP is its predecessor that can assign an address from a table.

Please log in or register to report this question.

2.

Match the column Well-known ports used by TCP with the column Protocol.

Well-known ports used by TCPProtocol
a) 7i) Daytime
b) 9ii) Echo
c) 11iii) Discard
d) 13iv) SYSTAT

Exam Year(s)

DSSSB TGT - 2023,

Answer: C

The correct match is a-ii, b-iii, c-iv, d-i. Port 7 is the Echo service, port 9 is Discard, port 11 is SYSTAT and port 13 is Daytime. Every other option mixes up at least one of these well-known TCP ports, for example giving Daytime to port 7. These are the old simple services of TCP/IP that are rarely used today but are still listed as well-known ports below 1024.

Please log in or register to report this question.

3.

Which of the given options best describes the truthfulness of the following statements? i) In connectionless services of transport layer protocol, the packets are sent from one party to another with no need for connection establishment or connection release. ii) In connection-oriented service of transport layer protocol, a connection is first established between the sender and the receiver. iii) The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol.

Exam Year(s)

DSSSB TGT - 2023,

Answer: A

All three statements are true. In a connectionless service the packets are sent from one party to another with no connection set up or released. In a connection-oriented service a connection is first established between sender and receiver. UDP is called a connectionless, unreliable transport protocol, since it has no connection and gives no guarantee of delivery. So all three are true and the first option is correct. TCP is the connection-oriented transport protocol and UDP the connectionless one, which supports statements ii and iii.

Please log in or register to report this question.

4.

Which one of the following protocols is NOT used to resolve one form of address to another one?

Exam Year(s)

GATE CS - 2016,

Answer: C

The protocol that does not resolve addresses is DHCP.

DHCP assigns IP addresses and other configuration (gateway, DNS server) to hosts joining a network; it does not translate one kind of address into another.

The other three are resolution protocols: DNS maps host names to IP addresses, ARP maps an IP address to a MAC address, and RARP maps a MAC address back to an IP address.

Please log in or register to report this question.

5.

Which of the following is/are example(s) of stateful application layer protocols?

(i) HTTP
(ii) FTP
(iii) TCP
(iv) POP3

Exam Year(s)

GATE CS - 2016,

Answer: C

The stateful application layer protocols are (ii) and (iv) only, FTP and POP3.

A stateful protocol keeps session state between requests. FTP keeps the login, current directory and transfer mode for the life of the control connection. POP3 moves through states (authorization, transaction, update) and remembers which messages are marked for deletion.

HTTP is stateless: each request is independent, which is why cookies were added on top. TCP keeps connection state but is a transport layer protocol, not an application layer one, so options including (i) or (iii) are wrong.

Please log in or register to report this question.

6.

A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a top-level index page with multiple embedded image objects. Assume that all caches (e.g., DNS cache, browser cache) are all initially empty. The following packets leave the user’s computer in some order.

(i) HTTP GET request for the index page
(ii) DNS request to resolve the web server’s name to its IP address
(iii) HTTP GET request for an image object
(iv) TCP SYN to open a connection to the web server

Which one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer ?

Exam Year(s)

GATE CS - 2024,

Answer: C

The order is (ii), (iv), (i), (iii).

With empty caches the browser must first resolve the server's name, so the DNS request (ii) goes out first. Knowing the IP address, it opens a TCP connection with a SYN (iv). Once the connection is established it requests the index page (i), and only after receiving and parsing that page does it learn which images to fetch and send GET requests for them (iii).

A TCP SYN cannot precede DNS resolution, because the destination IP is not yet known, which rules out the options starting with (iv). The image GET cannot precede the index GET, because the image references are found inside the index page.

Please log in or register to report this question.

Answer: D

The true statement is The client and server can initiate closing of the connection at the same time.

TCP explicitly allows a simultaneous close: both ends send FIN at about the same time, each acknowledges the other's FIN, and both pass through the CLOSING state to TIME_WAIT.

The other statements are false. TCP uses a three-way handshake (SYN, SYN-ACK, ACK), not a two-way one. Either end may close first, so the server can close before the client. A TCP connection is full-duplex, carrying data in both directions at once.

Please log in or register to report this question.

8.

A TCP sender successfully establishes a connection with a TCP receiver and starts the transmission of segments. The TCP congestion control mechanism’s slow-start threshold is set to 10000 segments. Assume that the round-trip time is fixed at 1 millisecond. Assume that the sender always has data to send, the segments are numbered from 1, and no segment is lost. Let t denote the time (in milliseconds) at which the transmission of segment number 2000 starts.

Which one of the following options is correct?

Exam Year(s)

GATE CS - 2026,

Answer: B

Segment 2000 starts in the interval \(10 \le t \lt 11\).

The threshold of 10000 segments is never reached, so the sender stays in slow start and the window doubles every RTT of 1 ms: 1, 2, 4, ... segments in the rounds starting at t = 0, 1, 2, ...

\[ \begin{aligned} \text{sent before } t = 10 &: 1+2+\dots+512 = 1023 \\ \text{round at } t = 10 &: \text{segments } 1024 \text{ to } 2047 \end{aligned} \]

Segment 2000 lies in the round that starts at t = 10 ms and so starts transmission before t = 11 ms.

The round starting at t = 9 covers only segments 512 to 1023, and by t = 11 segment 2000 has already been sent.

Please log in or register to report this question.

9.

Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted.

Exam Year(s)

GATE CS - 2016,

Answer: C

The sequence is DNS query, TCP SYN, HTTP GET request.

Just after a restart the host has no cached address for the server, so it must first resolve the host name with a DNS query. HTTP runs over TCP, so with the IP address known the browser opens a TCP connection, starting with the SYN of the three-way handshake. Only once the connection is established can it send the HTTP GET request.

Sending the HTTP request first, or before the TCP handshake, is impossible because there is no connection to carry it. Sending the TCP SYN before the DNS query is impossible because the host does not yet know the server’s IP address.

Please log in or register to report this question.

10.

Consider the following statements:

(i) Address Resolution Protocol (ARP) provides a mapping from an IP address to the corresponding hardware (link-layer) address.
(ii) A single TCP segment from a sender S to a receiver R cannot carry both data from S to R and acknowledgement for a segment from R to S.

Which ONE of the following is CORRECT?

Exam Year(s)

GATE CS - 2025,

Answer: B

(i) is TRUE and (ii) is FALSE.

(i) ARP takes an IP address on the local network and returns the corresponding link-layer (MAC) address, by broadcasting a request and receiving a unicast reply. That is exactly the mapping described.

(ii) TCP is full duplex, and every segment carries an acknowledgement number field. A segment from S to R can carry data for R and, with the ACK flag set, acknowledge data received from R at the same time. This is piggybacking, and it is the normal case in a two-way exchange. So (ii) is false.

Please log in or register to report this question.

Loading…
Tags: TCP/IP Questions and Answers || TCP/IP MCQ Questions and Answers || TCP/IP GK Questions and Answers || TCP/IP GK MCQ Questions || TCP/IP Multiple Choice Questions and Answers || TCP/IP GK || GK on TCP/IP || Computer Networking Questions and Answers || Computer Networking MCQ Questions and Answers || Computer Networking GK Questions and Answers || GK on Computer Networking