Transport Layer Protocols (TCP, UDP) # MCQs Practice set

Q.1 Which protocol is connection-oriented and ensures reliable data delivery?

UDP
TCP
IP
ICMP
Explanation - TCP is a connection-oriented protocol that establishes a connection and ensures data is delivered reliably using acknowledgments and retransmissions.
Correct answer is: TCP

Q.2 Which protocol is faster but does not guarantee delivery of packets?

TCP
UDP
FTP
HTTP
Explanation - UDP is a connectionless protocol that does not guarantee delivery, ordering, or error checking, making it faster than TCP.
Correct answer is: UDP

Q.3 Which header field is unique for each TCP connection to identify it?

Port Number
Sequence Number
Acknowledgment Number
Checksum
Explanation - Port numbers uniquely identify the sending and receiving application endpoints in a TCP connection.
Correct answer is: Port Number

Q.4 In TCP, which mechanism ensures that lost packets are retransmitted?

Sliding Window
Acknowledgment
Checksum
Flow Control
Explanation - TCP uses acknowledgments to confirm receipt of data, and retransmits packets that are not acknowledged within a timeout period.
Correct answer is: Acknowledgment

Q.5 UDP uses which type of addressing to deliver data?

Unicast, Multicast, Broadcast
Unicast only
Multicast only
Broadcast only
Explanation - UDP supports unicast, multicast, and broadcast delivery since it does not require a connection between sender and receiver.
Correct answer is: Unicast, Multicast, Broadcast

Q.6 What is the main function of the TCP three-way handshake?

Data Encryption
Connection Establishment
Flow Control
Error Detection
Explanation - TCP uses a three-way handshake (SYN, SYN-ACK, ACK) to establish a reliable connection between client and server.
Correct answer is: Connection Establishment

Q.7 Which of the following is true about UDP?

It provides flow control
It guarantees data delivery
It is connectionless
It uses three-way handshake
Explanation - UDP is a connectionless protocol, meaning it sends packets without establishing a connection or guaranteeing delivery.
Correct answer is: It is connectionless

Q.8 What is the purpose of the Sequence Number in TCP?

Identifies sender application
Ensures packets are received in order
Detects corrupted packets
Specifies packet size
Explanation - The Sequence Number in TCP allows the receiver to reorder segments correctly and detect any missing data.
Correct answer is: Ensures packets are received in order

Q.9 Which transport layer protocol is best suited for live video streaming?

TCP
UDP
ICMP
ARP
Explanation - UDP is suitable for live video/audio streaming because it prioritizes speed over reliability and does not retransmit lost packets.
Correct answer is: UDP

Q.10 Which TCP feature prevents a fast sender from overwhelming a slow receiver?

Flow Control
Checksum
Multiplexing
Fragmentation
Explanation - TCP implements flow control using the window size to ensure the sender does not overwhelm the receiver.
Correct answer is: Flow Control

Q.11 Which field in the UDP header helps detect errors in the transmitted data?

Sequence Number
Acknowledgment Number
Checksum
Port Number
Explanation - UDP uses a checksum field to detect errors in the transmitted data, but it does not correct errors or request retransmission.
Correct answer is: Checksum

Q.12 Which layer of the OSI model does TCP belong to?

Network Layer
Transport Layer
Application Layer
Data Link Layer
Explanation - TCP operates at the transport layer, providing reliable, connection-oriented data transmission between applications.
Correct answer is: Transport Layer

Q.13 What is the maximum size of a UDP datagram payload?

65,535 bytes
1,500 bytes
4,096 bytes
32,768 bytes
Explanation - The maximum size of a UDP datagram is 65,535 bytes including header, but practical limits are often lower due to network constraints.
Correct answer is: 65,535 bytes

Q.14 Which TCP mechanism ensures that data is delivered without duplication?

Checksum
Acknowledgment
Sequence Number
Port Number
Explanation - The Sequence Number in TCP helps the receiver detect duplicate segments and ensures proper ordering.
Correct answer is: Sequence Number

Q.15 Which of the following is NOT a feature of TCP?

Reliable delivery
Flow control
Connectionless transmission
Ordered data transfer
Explanation - TCP is connection-oriented, so it does not provide connectionless transmission; that is a feature of UDP.
Correct answer is: Connectionless transmission

Q.16 Which field in TCP header specifies the application endpoint?

Sequence Number
Port Number
Acknowledgment Number
Checksum
Explanation - TCP uses port numbers to identify sending and receiving application endpoints for multiplexing multiple connections.
Correct answer is: Port Number

Q.17 TCP implements which mechanism to improve efficiency during data transfer?

Sliding Window
Fragmentation
Broadcasting
Multicasting
Explanation - TCP uses the sliding window mechanism for efficient data transfer and flow control, allowing multiple packets to be in transit before acknowledgment.
Correct answer is: Sliding Window

Q.18 Which of these protocols is best suited for DNS queries?

TCP
UDP
FTP
SMTP
Explanation - DNS queries use UDP because they are small, require low overhead, and speed is preferred over guaranteed delivery.
Correct answer is: UDP

Q.19 Which TCP flag is used to terminate a connection?

SYN
ACK
FIN
RST
Explanation - The FIN flag in TCP is used to signal the termination of a connection between two hosts.
Correct answer is: FIN

Q.20 Which protocol uses a lightweight header of only 8 bytes?

TCP
UDP
IP
HTTP
Explanation - UDP has a simple 8-byte header, which makes it lightweight and suitable for fast transmissions.
Correct answer is: UDP

Q.21 Which transport protocol is preferred for email delivery?

UDP
TCP
ICMP
ARP
Explanation - Email protocols like SMTP, POP3, and IMAP require reliable delivery, which TCP provides.
Correct answer is: TCP

Q.22 TCP retransmissions are triggered when:

Checksum fails
Acknowledgment not received in time
Port number matches
Sequence number is zero
Explanation - TCP retransmits packets if an acknowledgment is not received within a timeout period, ensuring reliable delivery.
Correct answer is: Acknowledgment not received in time

Q.23 Which of these protocols does NOT provide reliability?

TCP
UDP
SCTP
DCCP
Explanation - UDP is connectionless and does not provide reliability, unlike TCP, SCTP, and DCCP.
Correct answer is: UDP

Q.24 What is the primary difference between TCP and UDP?

TCP is connection-oriented, UDP is connectionless
TCP is faster than UDP
UDP uses three-way handshake
TCP does not use port numbers
Explanation - TCP provides connection-oriented, reliable delivery while UDP is connectionless and faster but unreliable.
Correct answer is: TCP is connection-oriented, UDP is connectionless