0% found this document useful (0 votes)
73 views16 pages

Transport Layer Questions

The document contains 50 multiple-choice questions focused on transport layer protocols, specifically TCP and UDP, aimed at assessing understanding of their functions and characteristics. Each question includes answer choices and detailed explanations to enhance comprehension. Topics covered include reliability, data segmentation, port numbers, and the differences between TCP and UDP.

Uploaded by

eliasaraya142
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views16 pages

Transport Layer Questions

The document contains 50 multiple-choice questions focused on transport layer protocols, specifically TCP and UDP, aimed at assessing understanding of their functions and characteristics. Each question includes answer choices and detailed explanations to enhance comprehension. Topics covered include reliability, data segmentation, port numbers, and the differences between TCP and UDP.

Uploaded by

eliasaraya142
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

50 Multiple-Choice Questions on Transport Layer

Protocols

Instructions
The following 50 multiple-choice questions are designed to test your understanding of transport
layer protocols, specifically TCP and UDP, as covered in the Cisco Networking Academy Pro-
gram’s Introduction to Networks v6.0, Chapter 9. Each question includes four answer choices.
Select the best answer and refer to the detailed explanation in the table below each question
to deepen your understanding.

Questions
Q1. What is the primary role of the transport layer in a network?
a) To route packets between networks
b) To establish communication sessions between applications and deliver data
c) To provide physical connectivity between devices
d) To encrypt data for secure transmission

Answer Explanation
b) To establish The transport layer is responsible for establishing temporary
communication communication sessions between applications on different
sessions between devices and ensuring data delivery. It acts as a link between
applications and the application layer and lower layers (network, data link,
deliver data physical). Routing is handled by the network layer, physical
connectivity by the physical layer, and encryption is
typically an application layer function.

Q2. Why does the transport layer segment data into smaller chunks?
a) To increase the speed of data transmission
b) To enable multiplexing of multiple communications on the same network
c) To compress data for efficient storage
d) To encrypt data for security

1
Answer Explanation
b) To enable Segmentation divides data into smaller chunks (segments) to
multiplexing of facilitate multiplexing, allowing multiple conversations to
multiple share the same network. Each segment is tracked using
communications headers, enabling reassembly at the destination. This
on the same process supports efficient network use rather than speed,
network compression, or encryption.

Q3. How does the transport layer ensure that data reaches the correct application on a device?
a) By using IP addresses
b) By assigning port numbers
c) By encrypting the data
d) By compressing the data

Answer Explanation
b) By assigning Port numbers identify specific applications on a device,
port numbers ensuring data is delivered to the correct one. IP addresses
identify devices (network layer), while encryption and
compression are not transport layer functions.

Q4. Which protocol is considered reliable for data transmission?


a) IP
b) TCP
c) UDP
d) ICMP

Answer Explanation
b) TCP TCP (Transmission Control Protocol) is reliable, ensuring
all data arrives at the destination through numbering,
tracking, acknowledging, and retransmitting segments. UDP
is unreliable, IP operates at the network layer, and ICMP
handles error messaging, not data transport.

Q5. Why might UDP be preferred over TCP for some applications?
a) It provides guaranteed delivery
b) It has lower overhead and faster transmission
c) It ensures data is received in order
d) It uses a three-way handshake

2
Answer Explanation
b) It has lower UDP has fewer header fields than TCP, resulting in lower
overhead and overhead and faster transmission, ideal for applications like
faster live video where minor data loss is acceptable. TCP provides
transmission guaranteed delivery, ordered data, and uses a three-way
handshake, which UDP does not.

Q6. What analogy best describes TCP’s reliability mechanism?


a) Sending a non-registered letter
b) Sending tracked packages with delivery confirmation
c) Broadcasting a radio signal
d) Streaming a live video

Answer Explanation
b) Sending TCP’s reliability is akin to tracked packages, where
tracked segments are numbered, tracked, acknowledged, and
packages with retransmitted if lost, ensuring all data arrives. UDP is like a
delivery non-registered letter, lacking tracking. Radio broadcasts and
confirmation video streaming don’t guarantee delivery.

Q7. What is a key responsibility of TCP that UDP lacks?


a) Segmenting data
b) Acknowledging received data
c) Assigning port numbers
d) Multiplexing conversations

Answer Explanation
b) TCP acknowledges received data to ensure reliability,
Acknowledging retransmitting unacknowledged segments. Both TCP and
received data UDP segment data, assign port numbers, and multiplex
conversations, but UDP does not acknowledge data.

Q8. Which application is most likely to use TCP?


a) Live video streaming
b) Web browsing
c) Voice over IP (VoIP)
d) Online gaming

Answer Explanation
b) Web Web browsing requires all data to arrive accurately (e.g.,
browsing HTML pages), making TCP’s reliability ideal. Live video,
VoIP, and gaming often use UDP to minimize delays, as
minor data loss is less critical.

3
Q9. What does the TCP header’s sequence number facilitate?
a) Identifying the application
b) Reassembling data in the correct order
c) Encrypting the data
d) Compressing the segment

Answer Explanation
b) Reassembling The sequence number in the TCP header tracks the order of
data in the bytes in segments, ensuring they are reassembled correctly
correct order at the destination. Port numbers identify applications, and
encryption/compression are not transport layer functions.

Q10. Why does TCP have a larger header than UDP?


a) It includes fields for reliability and flow control
b) It compresses data
c) It encrypts data
d) It uses fewer port numbers

Answer Explanation
a) It includes TCP’s 20-byte header includes fields like sequence numbers,
fields for acknowledgment numbers, and window size for reliability
reliability and and flow control, unlike UDP’s simpler 8-byte header. TCP
flow control doesn’t compress or encrypt data, and both protocols use
port numbers similarly.

Q11. What is the purpose of the three-way handshake in TCP?


a) To compress data
b) To establish a reliable communication session
c) To assign IP addresses
d) To terminate a connection

Answer Explanation
b) To establish The TCP three-way handshake (SYN, SYN-ACK, ACK)
a reliable verifies the destination’s presence, active service, and
communication readiness, establishing a reliable session. Compression and
session IP address assignment are not transport layer functions, and
termination uses a different process (FIN, ACK).

Q12. How many exchanges are required to terminate a TCP connection fully?
a) Two
b) Three
c) Four

4
d) Five

Answer Explanation
c) Four Terminating a TCP connection requires four exchanges: two
FIN segments (one for each direction) and two ACK
segments to close both one-way sessions, ensuring a
complete end to the conversation.

Q13. What role does the TCP window size play?


a) It determines the port number
b) It regulates the amount of data sent before acknowledgment
c) It compresses data
d) It assigns sequence numbers

Answer Explanation
b) It regulates The window size in the TCP header specifies how many
the amount of bytes can be sent before an acknowledgment is required,
data sent before controlling flow. Port numbers identify applications,
acknowledgment sequence numbers track data order, and compression is not a
TCP function.

Q14. What happens if a TCP segment is lost during transmission?


a) The session is immediately terminated
b) The segment is retransmitted after a timeout
c) The data is sent via UDP instead
d) The application ignores the loss

Answer Explanation
b) The segment TCP ensures reliability by retransmitting unacknowledged
is retransmitted segments after a timeout. The session isn’t terminated
after a timeout immediately, UDP isn’t used as a fallback, and the
application relies on TCP to handle retransmission.

Q15. Why is UDP considered a stateless protocol?


a) It tracks all sessions
b) It does not maintain connection state
c) It uses sequence numbers
d) It acknowledges all data

Answer Explanation
b) It does not UDP is stateless, meaning it doesn’t track session state or
maintain maintain connections, unlike TCP. It lacks sequence
connection state numbers and acknowledgments, sending data without
ensuring delivery.

5
Q16. Which type of application is best suited for UDP?
a) Email clients
b) Live video streaming
c) File transfers
d) Web servers

Answer Explanation
b) Live video UDP is ideal for live video streaming, where low latency is
streaming critical, and minor data loss (e.g., a few missing segments) is
tolerable. Email, file transfers, and web servers require
TCP’s reliability to ensure all data arrives.

Q17. What is a socket in the context of TCP and UDP?


a) A physical network interface
b) A combination of IP address and port number
c) A data compression algorithm
d) A type of network cable

Answer Explanation
b) A A socket (e.g., 192.168.1.7:80) combines an IP address and
combination of port number to identify a specific process on a device,
IP address and enabling multiple simultaneous communications. It’s not a
port number physical component, algorithm, or cable.

Q18. What range of port numbers is reserved for well-known services?


a) 0 to 1023
b) 1024 to 49151
c) 49152 to 65535
d) 65536 to 131071

Answer Explanation
a) 0 to 1023 Well-known ports (0–1023) are reserved for standard services
(e.g., HTTP on port 80). Ports 1024–49151 are registered,
and 49152–65535 are dynamic/private, assigned by the OS
for client applications.

Q19. What does the TCP RST flag indicate?


a) Session establishment
b) Data acknowledgment
c) Connection reset due to error or timeout
d) Flow control adjustment

6
Answer Explanation
c) Connection The RST flag in the TCP header resets a connection when
reset due to an error or timeout occurs, abruptly ending the session. It’s
error or timeout not used for establishment, acknowledgment, or flow control.

Q20. How does TCP handle congestion on a network?


a) By increasing the window size
b) By reducing the number of bytes sent before acknowledgment
c) By switching to UDP
d) By ignoring congestion

Answer Explanation
b) By reducing TCP uses congestion control mechanisms, like reducing the
the number of window size, to send fewer bytes before acknowledgment,
bytes sent avoiding network overload. Increasing window size worsens
before congestion, UDP isn’t a fallback, and ignoring congestion
acknowledgment isn’t a strategy.

Q21. Why is TCP’s three-way handshake important for reliability?


a) It compresses data
b) It verifies the destination is ready and accepting requests
c) It assigns dynamic IP addresses
d) It retransmits all segments

Answer Explanation
b) It verifies the The three-way handshake (SYN, SYN-ACK, ACK) ensures
destination is the destination device is present, has an active service, and
ready and is ready to communicate, establishing a reliable session. It
accepting doesn’t compress data, assign IPs, or retransmit segments.
requests

Q22. What is the role of the acknowledgment number in the TCP header?
a) Identifies the source port
b) Indicates the next byte expected from the source
c) Specifies the window size
d) Compresses the segment

Answer Explanation
b) Indicates the The acknowledgment number tells the sender the next byte
next byte the receiver expects, confirming receipt of prior data. Source
expected from ports are identified separately, window size regulates flow,
the source and compression isn’t a TCP function.

Q23. Which feature of TCP ensures same-order delivery?

7
a) Port numbers
b) Sequence numbers
c) Window size
d) Checksum

Answer Explanation
b) Sequence Sequence numbers in TCP headers track the order of bytes,
numbers ensuring segments are reassembled in the correct order at
the destination. Port numbers identify applications, window
size controls flow, and checksum verifies integrity.

Q24. Why might an application using UDP handle reliability itself?


a) UDP provides built-in reliability
b) UDP is connection-oriented
c) UDP lacks retransmission and acknowledgment
d) UDP uses sequence numbers

Answer Explanation
c) UDP lacks UDP is unreliable, lacking retransmission, acknowledgment,
retransmission and sequence numbers, so applications using UDP (e.g.,
and VoIP) must implement reliability if needed. UDP is
acknowledgment connectionless and doesn’t use sequence numbers.

Q25. What is a key difference between TCP and UDP headers?


a) TCP headers are smaller
b) UDP headers include sequence numbers
c) TCP headers include fields for reliability
d) UDP headers include window size

Answer Explanation
c) TCP headers TCP headers (20 bytes) include fields like sequence and
include fields for acknowledgment numbers for reliability, unlike UDP’s
reliability simpler 8-byte header. TCP headers are larger, and UDP
lacks sequence numbers and window size fields.

Q26. Which protocol is best for a simple request-reply application?


a) TCP
b) UDP
c) IP
d) ICMP

8
Answer Explanation
b) UDP Simple request-reply applications (e.g., DNS queries) often
use UDP for low overhead and speed, as they don’t require
TCP’s reliability. IP and ICMP are not transport layer
protocols.

Q27. What does the TCP control bits field indicate?


a) The size of the segment
b) The purpose and function of the TCP segment
c) The IP address of the destination
d) The compression level

Answer Explanation
b) The purpose Control bits (flags) in the TCP header (e.g., SYN, ACK,
and function of FIN) define the segment’s purpose, such as establishing or
the TCP terminating a session. They don’t indicate size, IP address,
segment or compression.

Q28. How does UDP handle datagram reassembly?


a) It uses sequence numbers
b) It reassembles data in the order received
c) It retransmits lost datagrams
d) It acknowledges each datagram

Answer Explanation
b) It UDP reassembles datagrams in the order received and
reassembles forwards them to the application, which must handle
data in the sequencing if needed. UDP lacks sequence numbers,
order received retransmission, and acknowledgment.

Q29. Why do web browsers typically use TCP?


a) For low latency
b) To ensure all data arrives accurately
c) To reduce header size
d) To avoid acknowledgments

Answer Explanation
b) To ensure all Web browsers use TCP to ensure all data (e.g., web pages)
data arrives arrives accurately and in order, as reliability is critical. TCP
accurately has higher latency and larger headers than UDP and uses
acknowledgments.

Q30. What is the purpose of dynamic port numbers (49152–65535)?


a) Reserved for well-known services

9
b) Assigned to client applications by the OS
c) Used for registered applications
d) Fixed for server processes

Answer Explanation
b) Assigned to Dynamic ports (49152–65535) are assigned by the client’s
client OS to identify client applications during communication.
applications by Well-known ports (0–1023) are for services, and registered
the OS ports (1024–49151) are for specific applications.

Q31. How does TCP’s flow control mechanism work?


a) By assigning port numbers
b) By adjusting the window size
c) By compressing data
d) By resetting connections

Answer Explanation
b) By adjusting TCP’s flow control uses the window size to regulate how
the window size many bytes the sender can transmit before receiving an
acknowledgment, preventing receiver overload. Port
numbers, compression, and resets serve other purposes.

Q32. What happens during the TCP session termination process?


a) A three-way handshake is used
b) Four exchanges with FIN and ACK flags occur
c) Data is compressed
d) The session switches to UDP

Answer Explanation
b) Four TCP session termination uses four exchanges: two FIN
exchanges with segments and two ACKs to close both directions of the
FIN and ACK session. The three-way handshake is for establishment, and
flags occur compression or UDP switching doesn’t occur.

Q33. Why is UDP faster than TCP?


a) It uses sequence numbers
b) It has fewer header fields
c) It guarantees delivery
d) It uses a three-way handshake

10
Answer Explanation
b) It has fewer UDP’s 8-byte header has fewer fields than TCP’s 20-byte
header fields header, reducing overhead and enabling faster transmission.
UDP lacks sequence numbers, delivery guarantees, and a
three-way handshake.

Q34. What is the role of the source port in a TCP or UDP segment?
a) Identifies the destination service
b) Acts as a return address for the client
c) Specifies the window size
d) Indicates data compression

Answer Explanation
b) Acts as a The source port, dynamically assigned by the client’s OS,
return address acts as a return address to track conversations. The
for the client destination port identifies the service, and window
size/compression are unrelated.

Q35. Which protocol would a VoIP application likely use?


a) TCP
b) UDP
c) IP
d) ICMP

Answer Explanation
b) UDP VoIP applications use UDP for low latency, as minor packet
loss is less noticeable in real-time audio. TCP’s reliability
adds delays, and IP/ICMP are not transport protocols.

Q36. What does the TCP checksum field ensure?


a) Data compression
b) Error checking of the segment header and data
c) Session establishment
d) Port number assignment

Answer Explanation
b) Error The checksum in the TCP header verifies the integrity of the
checking of the segment header and data, detecting errors. It doesn’t handle
segment header compression, session establishment, or port assignment.
and data

Q37. Why might an application using UDP experience disruptions?


a) It uses too many port numbers

11
b) It lacks retransmission for lost datagrams
c) It requires a three-way handshake
d) It compresses data excessively

Answer Explanation
b) It lacks UDP doesn’t retransmit lost datagrams, which can cause
retransmission disruptions (e.g., in video streams). It uses port numbers
for lost like TCP, is connectionless, and doesn’t compress data.
datagrams

Q38. What is the purpose of the TCP initial sequence number (ISN)?
a) To assign port numbers
b) To start tracking bytes in a session
c) To compress data
d) To terminate the session

Answer Explanation
b) To start The ISN, set during the three-way handshake, starts the
tracking bytes byte numbering for a TCP session, enabling ordered delivery
in a session and reliability. It’s unrelated to ports, compression, or
termination.

Q39. Which type of port is used for HTTP services?


a) Well-known port
b) Registered port
c) Dynamic port
d) Private port

Answer Explanation
a) Well-known HTTP uses port 80, a well-known port (0–1023) reserved for
port standard services. Registered ports (1024–49151) are for
specific applications, and dynamic/private ports
(49152–65535) are for clients.

Q40. How does TCP avoid network congestion?


a) By increasing data transmission
b) By using timers and algorithms to reduce sending rate
c) By switching to UDP
d) By ignoring acknowledgments

12
Answer Explanation
b) By using TCP employs congestion control mechanisms, like timers
timers and and algorithms, to reduce the sending rate (e.g., smaller
algorithms to window size) when congestion is detected, preventing
reduce sending network overload. Increasing transmission or ignoring
rate acknowledgments worsens congestion, and UDP isn’t a
fallback.

Q41. What is multiplexing in the context of the transport layer?


a) Compressing multiple data streams
b) Allowing multiple conversations on the same network
c) Encrypting data for security
d) Assigning IP addresses

Answer Explanation
b) Allowing Multiplexing enables multiple application conversations to
multiple share the same network by using port numbers to
conversations on distinguish them. It’s unrelated to compression, encryption,
the same or IP assignment.
network

Q42. Why does TCP use a larger header than UDP?


a) It includes fields for port numbers
b) It includes fields for reliability and flow control
c) It compresses data
d) It uses dynamic IP addresses

Answer Explanation
b) It includes TCP’s 20-byte header includes fields like sequence numbers,
fields for acknowledgment numbers, and window size for reliability
reliability and and flow control, unlike UDP’s 8-byte header. Both use port
flow control numbers, and TCP doesn’t compress data or use dynamic
IPs.

Q43. What happens if a UDP datagram is lost?


a) It is retransmitted automatically
b) The application must handle the loss
c) The session is terminated
d) The data is compressed

13
Answer Explanation
b) The UDP is unreliable and doesn’t retransmit lost datagrams, so
application the application must handle any loss. Sessions aren’t
must handle the terminated (UDP is connectionless), and compression isn’t
loss involved.

Q44. Which TCP feature ensures the destination is ready to receive data?
a) Sequence numbers
b) Three-way handshake
c) Window size
d) Checksum

Answer Explanation
b) Three-way The three-way handshake (SYN, SYN-ACK, ACK) verifies
handshake that the destination is present, has an active service, and is
ready to receive data. Sequence numbers track order,
window size controls flow, and checksum ensures integrity.

Q45. Why is UDP suitable for live multimedia applications?


a) It guarantees delivery
b) It has low overhead and tolerates minor data loss
c) It uses sequence numbers
d) It requires acknowledgments

Answer Explanation
b) It has low UDP’s low overhead (smaller header) and lack of
overhead and retransmission make it suitable for live multimedia, where
tolerates minor minor data loss is less critical than latency. UDP doesn’t
data loss guarantee delivery, use sequence numbers, or require
acknowledgments.

Q46. What is the role of the destination port in a TCP/UDP segment?


a) It acts as the return address
b) It identifies the requested service
c) It regulates data flow
d) It compresses the segment

Answer Explanation
b) It identifies The destination port specifies the service requested (e.g.,
the requested port 80 for HTTP). The source port acts as the return
service address, window size regulates flow (in TCP), and
compression isn’t a transport layer function.

Q47. How does TCP ensure ordered delivery of data?

14
a) By using port numbers
b) By assigning sequence numbers to segments
c) By compressing data
d) By ignoring lost segments

Answer Explanation
b) By assigning TCP assigns sequence numbers to each byte, allowing the
sequence receiver to reassemble segments in the correct order. Port
numbers to numbers identify applications, compression isn’t used, and
segments lost segments are retransmitted.

Q48. Which application type handles reliability when using UDP?


a) Web browsers
b) Email clients
c) Multimedia applications
d) File transfer protocols

Answer Explanation
c) Multimedia Multimedia applications (e.g., VoIP, streaming) using UDP
applications often implement their own reliability mechanisms, as UDP
lacks retransmission. Web browsers, email, and file transfers
use TCP for built-in reliability.

Q49. What is the purpose of the TCP header length field?


a) To specify the port number
b) To indicate the length of the TCP segment header
c) To compress the segment
d) To assign sequence numbers

Answer Explanation
b) To indicate The header length field specifies the size of the TCP header
the length of the (typically 20 bytes), aiding in parsing the segment. It’s
TCP segment unrelated to port numbers, compression, or sequence
header numbers.

Q50. Why might TCP retransmissions worsen network congestion?


a) They reduce the window size
b) They increase network traffic
c) They switch to UDP
d) They compress data

15
Answer Explanation
b) They increase Retransmitting lost TCP segments adds more traffic to an
network traffic already congested network, potentially worsening the issue.
TCP uses congestion control (e.g., reducing window size) to
mitigate this, not UDP switching or compression.

16

You might also like