Transport Layer Questions
Transport Layer Questions
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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