Computer Networks Transport Layer MCQs: 12 solved TCP and UDP questions (GATE/NET)

TCP and UDP transport layer MCQs with solutions: 12 solved GATE questions on sequence numbers, the handshake, full-duplex, slow start, and token bucket rate.

Prashant Jain

KnowledgeGate AI educator

10 Jul 20266 min read

The transport layer is dense with GATE marks because TCP has so many precise behaviours to keep straight: sequence numbers count bytes, the connection is full-duplex, slow start grows the window exponentially, and UDP deliberately drops the guarantees TCP provides. Miss one detail and a true or false statement flips. Below are 12 solved MCQs from KnowledgeGate's published question bank, most of them previous-year questions with the exam and year noted. Attempt each before the explanation, which stays short on purpose. If a point is unclear, the full theory sits in the Computer Networks learn module. A note on the deep links: GATE PYQs carried inside the course link to their exact solved page; the basic port and socket questions live in the same module's practice sets, so the module link above is your entry point for those.

Transport layer services and ports

Q1. Which one of the following statements is FALSE? (GATE 2004)

  • (a) TCP guarantees a minimum communication rate

  • (b) TCP ensures in-order delivery

  • (c) TCP reacts to congestion by reducing sender window size

  • (d) TCP employs retransmission to compensate for packet loss

Answer: (a). TCP promises reliable, in-order delivery with congestion and flow control, but it never guarantees a minimum throughput; the rate depends on the network. In-order delivery, window reduction under congestion, and retransmission are all genuine TCP behaviours. So the false claim is the rate guarantee (see the solved page).

Q2. A socket address is (HTET 2022)

  • (a) an IPv4 address translated to IPv6

  • (b) a combination of IP address and port number

  • (c) a combination of MAC address and domain name

  • (d) an application layer address

Answer: (b). A socket address pins down both which machine and which process on it, so it pairs an IP address with a port number. The IP identifies the host and the port identifies the specific application endpoint. That pairing is answer (b).

Q3. Which statement about PING is false? (ISRO 2015)

  • (a) PING sends datagrams hoping for an echo response from the pinged machine

  • (b) a machine running a TCP/IP stack should reply to a PING with its own datagram

  • (c) if PING encounters an error condition, no ICMP message is returned

  • (d) PING displays the round-trip time in milliseconds or an error message

Answer: (c). PING is built directly on ICMP, whose entire purpose is to report problems in the network. So an error condition does produce an ICMP message rather than silence. Statement (c) contradicts how ICMP works, making it the false one.

Q4. Transmission Control Protocol is (HTET 2023)

  • (a) a collision-sensitive protocol

  • (b) a collision-less protocol

  • (c) a connectionless protocol

  • (d) a connection-oriented protocol

Answer: (d). TCP sets up a connection with a handshake before exchanging data, then delivers it reliably and in order. Collision handling belongs to the data link layer, not TCP, and connectionless describes UDP. TCP is connection-oriented.

TCP mechanics

Q5. In TCP, a unique sequence number is assigned to each (GATE 2004)

  • (a) byte

  • (b) word

  • (c) segment

  • (d) message

Answer: (a). TCP treats data as a byte stream and numbers every byte, so the sequence field names the first data byte in a segment. Acknowledgements are cumulative and point to the next expected byte. Numbering is per byte, not per segment (see the solved page).

Q6. Which system call results in the sending of SYN packets? (GATE 2008)

  • (a) socket

  • (b) bind

  • (c) listen

  • (d) connect

Answer: (d). The connect call performs an active open, so the kernel transmits a SYN to start the three-way handshake. socket only creates the endpoint, bind assigns a local address and port, and listen marks a socket passive. Only connect puts a SYN on the wire (see the solved page).

Q7. With respect to a TCP connection between a client and a server, which one is true? (GATE 2026)

  • (a) they use a two-way handshake before data transmission

  • (b) the server cannot start closing before the client starts closing

  • (c) the TCP connection is half-duplex

  • (d) client and server can start closing the connection at the same time

Answer: (d). TCP opens with a three-way, not two-way, handshake, and the connection is full-duplex, so (a) and (c) are wrong. Either side may initiate a close independently, including simultaneously, which is the simultaneous-close case. That makes (d) correct (see the solved page).

Q8. Consider: I. TCP connections are full duplex. II. TCP has no option for selective acknowledgement. III. TCP connections are message streams. Which is correct? (GATE 2015)

  • (a) only I is correct

  • (b) only I and III are correct

  • (c) only II and III are correct

  • (d) all of I, II and III are correct

Answer: (a). TCP is full-duplex since each direction has its own sequence numbers, so I is true. TCP does support the SACK option, so II is false, and TCP is a byte stream, not a message stream, so III is false. Only statement I holds (see the solved page).

UDP and congestion control

Q9. Packets of the same session may be routed through different paths in (GATE 2005)

  • (a) TCP, but not UDP

  • (b) TCP and UDP

  • (c) UDP, but not TCP

  • (d) neither TCP nor UDP

Answer: (b). Path selection happens at the network layer, where routers forward each packet independently based on current tables. That is unaffected by which transport protocol sits above, so packets of one session can take different routes under both TCP and UDP (see the solved page).

Q10. In the slow start phase of TCP congestion control, the congestion window (GATE 2008)

  • (a) does not increase

  • (b) increases linearly

  • (c) increases quadratically

  • (d) increases exponentially

Answer: (d). During slow start the sender raises the window by one segment for every acknowledgement, so the window roughly doubles each round trip. That doubling is exponential growth. Linear growth belongs to the later congestion-avoidance phase (see the solved page).

Q11. A computer on a 10 Mbps network is regulated by a token bucket filled at 2 Mbps and initially holding 16 megabits. The maximum time it can transmit at the full 10 Mbps is (UGC NET 2022)

  • (a) 1.6 seconds

  • (b) 2 seconds

  • (c) 5 seconds

  • (d) 8 seconds

Answer: (b). While sending at 10 Mbps the bucket also refills at 2 Mbps, so tokens drain at the net rate of 10 minus 2, that is 8 Mbps. Dividing the initial 16 megabits by that 8 Mbps net drain gives 2 seconds of full-rate burst (see the solved page).

Q12. Which statements are TRUE? S1: TCP handles both congestion and flow control. S2: UDP handles congestion but not flow control. S3: Fast retransmit deals with congestion but not flow control. S4: Slow start deals with both congestion and flow control. (GATE 2008)

  • (a) S1, S2 and S3 only

  • (b) S1 and S3 only

  • (c) S3 and S4 only

  • (d) S1, S3 and S4 only

Answer: (b). TCP does both congestion and flow control, so S1 is true. UDP does neither, so S2 is false. Fast retransmit responds to loss under congestion without touching receiver flow limits, so S3 is true, while slow start is congestion control only, so S4 is false. The correct pair is S1 and S3 (see the solved page).

How the transport layer is examined

The set mirrors the exam's focus. The services block (Q1 to Q4) is definitional: TCP is reliable and connection-oriented but gives no rate guarantee, and a socket is an IP and port pair. The mechanics block (Q5 to Q8) rewards the fine print, that sequence numbers are per byte, connect emits the SYN, the connection is full-duplex with SACK support, and either end can close. The congestion block (Q9 to Q12) is where numericals and true or false statements meet: slow start is exponential, the token-bucket burst uses the net drain rate, and only TCP does flow and congestion control.

For the reasoning that separates the two protocols, work through our TCP vs UDP: the Transport Layer Explained deep dive, then drill the practice sets in the Computer Networks learn module. GATE aspirants get the full networks sequence inside GATE Guidance by Sanchit Sir. Solve, re-derive the numericals by hand, and the accuracy holds up under time on the second pass.