UDP & TCP PYQ QUIZ GATE CS

Last Updated :
Discuss
Comments

Question 1

A TCP server application is programmed to listen on port number P on host S. A TCP client is connected to the TCP server over the network. Consider that while the TCP connection was active, the server machine S crashed and rebooted. Assume that the client does not use the TCP keepalive timer. Which of the following behaviors is/are possible?

  • If the client was waiting to receive a packet, it may wait indefinitely

  • The TCP server application on S can listen on P after reboot

  • If the client sends a packet after the server reboot, it will receive a RST segment

  • If the client sends a packet after the server reboot, it will receive a FIN segment

Question 2

Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are False with respect to the TCP connection?

1. If the sequence number of a segment is m, then the sequence 
number of the subsequent segment is always m+1.
2. If the estimated round trip time at any given point of time
is t sec, the value of the retransmission timeout is always
set to greater than or equal to t sec.
3. The size of the advertised window never changes during the
course of the TCP connection.
4. The number of unacknowledged bytes at the sender is always
less than or equal to the advertised window
  • 3 only

  • 1 and 3 only

  • 1 and 4 only

  • 2 and 4 only

Question 3

Packets of the same session may be routed through different paths in

  • TCP, but not UDP

  • TCP and UDP

  • UDP, but not TCP

  • Neither TCP, nor UDP

Question 4

Which one of the following socket API functions converts an unconnected active TCP socket into a passive socket.

  • connect

  • bind

  • listen

  • accept

Question 5

Which one of the following uses UDP as the transport protocol?

  • HTTP

  • Telnet

  • DNS

  • SMTP

Question 6

In one of the pairs of protocols given below, both the protocols can use multiple TCP connections between the same client and the server. Which one is that?

  • HTTP, FTP

  • HTTP, TELNET

  • FTP, SMTP

  • HTTP, SMTP

Question 7

Consider a socket API on Linux machine that supports UDP socket. A connected UDP socket is a UDP socket on which connect function has already been called. Which of the following statements is/are correct ?

I. A connected UDP socket can be used to communicate
with multiple peers simultaneously.
II. A process can successfully call connect function
again for an already connected UDP socket.
  • I only

  • II only

  • Both I and II only

  • Neither I nor II

Question 8

Consider the data transfer using TCP over a 1 Gbps link. Assuming that the maximum segment lifetime (MSL) is set to 60 seconds, the minimum number of bits required for the sequence number field of the TCP header, to prevent the sequence number space from wrapping around during the MSL is____________.

  • 27.8

  • 48.0

  • 33.0

  • 35.0

Question 9

Consider the 3-way handshaking protocol for TCP connection establishment. Let the three packets exchanged during the connection establishment be denoted as P1, P2, and P3, in order. Which of the following option(s) is/are TRUE with respect to TCP header flags that are set in the packets?

  • P3: SYN = 1, ACK = 1

  • P2: SYN = 1, ACK = 1

  • P2: SYN = 0, ACK = 1

  • P1: SYN = 1

There are 9 questions to complete.

Take a part in the ongoing discussion