0% found this document useful (0 votes)
4 views17 pages

Chapter 3

The document contains a series of questions and answers related to transport-layer protocols, primarily focusing on TCP and UDP functionalities. It covers aspects such as the roles of transport-layer protocols, the TCP 3-way handshake, flow control, and congestion control mechanisms. The document also includes explanations for each answer, providing insights into how these protocols operate and their differences.

Uploaded by

abdelramantv
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)
4 views17 pages

Chapter 3

The document contains a series of questions and answers related to transport-layer protocols, primarily focusing on TCP and UDP functionalities. It covers aspects such as the roles of transport-layer protocols, the TCP 3-way handshake, flow control, and congestion control mechanisms. The document also includes explanations for each answer, providing insights into how these protocols operate and their differences.

Uploaded by

abdelramantv
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/ 17

Question 1

What is the primary function of transport-layer protocols?

A) To route packets between network hosts

B) To provide logical communication between application processes on


different hosts

C) To manage physical connections between devices

D) To encrypt application-layer messages

Correct Answer: B) To provide logical communication between application


processes on different hosts

Explanation: Page 4 (Transport Layer: 3-4) states that transport


protocols provide logical communication between application processes
running on different hosts, enabling end-to-end data transfer. Routing is
a network-layer function, physical connections are handled by the link
layer, and encryption is typically an application-layer task.

Question 2
What action does the transport layer perform on the sender side?

A) Reassembles segments into messages

B) Breaks application messages into segments and passes them to the


network layer

C) Forwards packets to the next router

D) Checks the physical media for errors

Correct Answer: B) Breaks application messages into segments and passes


them to the network layer

Explanation: Page 4 (Transport Layer: 3-4) explains that the sender’s


transport protocol breaks application messages into segments and passes
them to the network layer. Reassembly occurs at the receiver, forwarding
is a network-layer task, and physical media checks are link-layer
responsibilities.

Question 3
Which two transport protocols are available to Internet applications?

A) IP and ICMP

B) TCP and UDP

C) HTTP and FTP

D) ARP and DNS

Correct Answer: B) TCP and UDP


Explanation: Page 4 (Transport Layer: 3-4) identifies TCP and UDP as the
two transport protocols available to Internet applications. IP and ICMP
are network-layer protocols, HTTP and FTP are application-layer
protocols, and ARP and DNS serve other functions.

Question 4
In the household analogy on Page 5, what do the "letters in envelopes"
represent?

A) Hosts

B) Processes

C) Application messages

D) Transport headers

Correct Answer: C) Application messages

Explanation: Page 5 (Transport Layer: 3-5) uses the analogy where


"letters in envelopes" represent application messages, sent between
processes (kids) in hosts (houses). Transport headers are added by the
transport layer, not part of the analogy’s letters.

Question 5
How does the transport layer enhance network-layer services?

A) By providing physical connectivity

B) By enabling communication between processes rather than just hosts

C) By routing packets through the network core

D) By compressing application data

Correct Answer: B) By enabling communication between processes rather


than just hosts

Explanation: Page 6 (Transport Layer: 3-6) explains that the transport


layer provides communication between processes, enhancing the network
layer’s host-to-host communication. The other options are unrelated to
transport-layer functions.

Question 6
What does the sender’s transport layer do with an application-layer
message?

A) Encrypts the message

B) Determines segment header fields, creates a segment, and passes it to


IP

C) Routes the message to the destination host


D) Stores the message for later transmission

Correct Answer: B) Determines segment header fields, creates a segment,


and passes it to IP

Explanation: Page 7 (Transport Layer: 3-7) describes the sender’s


transport layer actions: it receives an application-layer message,
determines segment header fields, creates a segment, and passes it to the
IP layer. The other options are not transport-layer tasks.

Question 7
What is the role of the receiver’s transport layer when it receives a
segment?

A) Forwards the segment to the next hop

B) Checks header values, extracts the message, and demultiplexes it to


the application

C) Compresses the segment for storage

D) Converts the segment to a physical signal

Correct Answer: B) Checks header values, extracts the message, and


demultiplexes it to the application

Explanation: Page 8 (Transport Layer: 3-8) outlines the receiver’s


actions: it receives a segment from IP, checks header values, extracts
the application-layer message, and demultiplexes it to the correct
application via a socket.

Question 8
Which feature is NOT provided by UDP?

A) Unreliable delivery

B) Unordered delivery

C) Congestion control

D) Connectionless transport

Correct Answer: C) Congestion control

Explanation: Page 9 (Transport Layer: 3-9) describes UDP as providing


unreliable, unordered delivery with no congestion control, acting as a
no-frills extension of IP. It is connectionless, unlike TCP.

Question 9
What service does TCP provide that UDP does not?

A) Connectionless transport
B) Reliable, in-order delivery

C) Best-effort delivery

D) No setup requirement

Correct Answer: B) Reliable, in-order delivery

Explanation: Page 9 (Transport Layer: 3-9) lists TCP’s features,


including reliable, in-order delivery, which UDP lacks. UDP provides
connectionless, best-effort delivery without setup, unlike TCP.

Question 10
What is multiplexing in the context of the transport layer?

A) Combining multiple network interfaces

B) Handling data from multiple sockets and adding transport headers

C) Splitting a single socket into multiple streams

D) Routing data to different hosts

Correct Answer: B) Handling data from multiple sockets and adding


transport headers

Explanation: Page 11 (Transport Layer: 3-11) defines multiplexing as the


sender handling data from multiple sockets and adding transport headers
for demultiplexing at the receiver.

Question 11
How does demultiplexing work at the receiver?

A) It forwards segments to multiple hosts

B) It uses header information to deliver segments to the correct socket

C) It reassembles segments into packets

D) It encrypts the received segments

Correct Answer: B) It uses header information to deliver segments to the


correct socket

Explanation: Page 11 (Transport Layer: 3-11) explains that demultiplexing


involves using header information to deliver received segments to the
correct application socket.

Question 12
Why might multimedia applications prefer UDP over TCP?

A) UDP provides guaranteed bandwidth

B) UDP avoids rate throttling by TCP’s congestion control


C) UDP ensures reliable delivery

D) UDP supports connection setup

Correct Answer: B) UDP avoids rate throttling by TCP’s congestion control

Explanation: Page 139 (Transport Layer: 3-139) notes that multimedia apps
use UDP to send data at a constant rate, avoiding TCP’s congestion
control, which may throttle rates. UDP does not guarantee bandwidth or
reliability.

Question 13
In the context of fairness, what advantage does an application gain by
opening multiple parallel TCP connections?

A) It avoids packet loss

B) It achieves a higher throughput share

C) It reduces connection setup time

D) It ensures constant data rates

Correct Answer: B) It achieves a higher throughput share

Explanation: Page 139 (Transport Layer: 3-139) explains that an


application opening multiple TCP connections (e.g., 11 TCPs) gets a
larger share of bandwidth (R/2) compared to a single TCP (R/10),
impacting fairness.

Question 14
What is a key characteristic of UDP’s delivery model?

A) It guarantees no packet loss

B) It provides unordered delivery

C) It ensures in-order delivery

D) It includes flow control

Correct Answer: B) It provides unordered delivery

Explanation: Page 9 (Transport Layer: 3-9) states that UDP provides


unreliable, unordered delivery, unlike TCP’s in-order delivery. UDP lacks
guarantees, flow control, and congestion control.

Question 15
What happens when a TCP sender receives an ACK with a value greater than
SendBase?

A) It stops the timer


B) It updates SendBase and restarts the timer if segments are unacked

C) It retransmits all segments

D) It closes the connection

Correct Answer: B) It updates SendBase and restarts the timer if segments


are unacked

Explanation: Page 150 (Transport Layer: 3-150) describes the TCP sender’s
action: if an ACK’s value (y) is greater than SendBase, it updates
SendBase to y and restarts the timer if there are unacked segments,
otherwise stops it.

Question 16
In the TCP 3-way handshake, what does the server send after receiving a
SYN segment?

A) A FIN segment

B) A SYNACK segment

C) An ACK segment

D) A RST segment

Correct Answer: B) A SYNACK segment

Explanation: Page 151 (Transport Layer: 3-151) shows the TCP 3-way
handshake FSM: after receiving a SYN (seq=x), the server sends a SYNACK
(seq=y, ACKnum=x+1) to acknowledge the client’s SYN and propose its
sequence number.

Question 17
What is the purpose of the TCP 3-way handshake?

A) To encrypt the connection

B) To establish reliability, congestion control, and connection state

C) To compress data segments

D) To allocate bandwidth

Correct Answer: B) To establish reliability, congestion control, and


connection state

Explanation: Page 151 (Transport Layer: 3-151) implies the 3-way


handshake establishes TCP’s connection state, enabling reliability and
congestion control by synchronizing sequence numbers and ACKs.

Question 18
How does TCP close a connection?
A) With a single FIN segment

B) Using a 3-way handshake

C) With a 4-way handshake involving FIN and ACK segments

D) By resetting the connection

Correct Answer: C) With a 4-way handshake involving FIN and ACK segments

Explanation: Page 152 (Transport Layer: 3-152) shows TCP connection


closure involves a 4-way handshake: client sends FIN, server ACKs, server
sends FIN, and client ACKs, ensuring both sides close gracefully.

Question 19
What is the average TCP throughput formula, assuming no slow start and
constant data?

A) W / RTT

B) (3/4) * (W / RTT)

C) RTT / W

D) W * RTT

Correct Answer: B) (3/4) * (W / RTT)

Explanation: Page 153 (Transport Layer: 3-153) provides the formula for
average TCP throughput: (3/4) * (W / RTT) bytes/sec, where W is the
window size at loss and RTT is the round-trip time, with an average
window size of (3/4)W.

Question 20
For a TCP connection with 1500-byte segments, 100ms RTT, and a desired 10
Gbps throughput, what is the required window size?

A) 833 segments

B) 8,333 segments

C) 83,333 segments

D) 833,333 segments

Correct Answer: C) 83,333 segments

Explanation: Page 154 (Transport Layer: 3-154) states that for 10 Gbps
throughput with 1500-byte segments and 100ms RTT, the required window
size is 83,333 segments, calculated to keep enough segments in flight.

Question 21
What is the required segment loss probability to achieve 10 Gbps TCP
throughput over a long, fat pipe?
A) 2 * 10^-2

B) 2 * 10^-5

C) 2 * 10^-8

D) 2 * 10^-10

Correct Answer: D) 2 * 10^-10

Explanation: Page 154 (Transport Layer: 3-154) cites the Mathis formula,
stating that a loss probability of L = 2 * 10^-10 is needed for 10 Gbps
throughput, indicating a very small loss rate for high-speed links.

Question 22
In the Go-Back-N (GBN) protocol, what happens if the sender’s nextseqnum
reaches base+N?

A) It sends the next packet

B) It refuses new data

C) It retransmits all packets

D) It stops the timer

Correct Answer: B) It refuses new data

Explanation: Page 148 (Transport Layer: 3-148) shows the GBN sender FSM:
if nextseqnum >= base+N, the sender refuses new data, as the window is
full (limited to N unacked packets).

Question 23
What does the GBN receiver do if it receives a corrupt packet?

A) Discards it and sends an ACK for the last correct packet

B) Buffers it for later processing

C) Sends a NAK packet

D) Retransmits the packet

Correct Answer: A) Discards it and sends an ACK for the last correct
packet

Explanation: Page 149 (Transport Layer: 3-149) shows the GBN receiver
FSM: for a corrupt packet, it discards it and sends an ACK for the last
correctly received packet, triggering sender retransmission.

Question 24
What is a key limitation of the Go-Back-N protocol?
A) It requires connection setup

B) It retransmits all packets after a loss, even if some were received

C) It provides unordered delivery

D) It lacks a timer mechanism

Correct Answer: B) It retransmits all packets after a loss, even if some


were received

Explanation: Page 148 (Transport Layer: 3-148) implies GBN’s


inefficiency: a single packet loss causes retransmission of all
subsequent packets in the window, even if they were correctly received.

Question 25
What is the role of the timer in the GBN sender?

A) To measure RTT

B) To detect packet loss and trigger retransmission

C) To synchronize sequence numbers

D) To limit connection duration

Correct Answer: B) To detect packet loss and trigger retransmission

Explanation: Page 148 (Transport Layer: 3-148) shows the GBN sender
starts a timer when sending the first unacked packet; if it expires, it
retransmits packets, detecting loss.

Question 26
In TCP, what does the SendBase variable represent?

A) The next sequence number to be sent

B) The last byte cumulatively acknowledged

C) The total number of bytes in the window

D) The initial sequence number

Correct Answer: B) The last byte cumulatively acknowledged

Explanation: Page 150 (Transport Layer: 3-150) defines SendBase-1 as the


last cumulatively ACKed byte, updated when an ACK with a higher value is
received.

Question 27
What happens if the TCP sender’s timer expires?

A) It sends a new segment


B) It retransmits unacked segments

C) It closes the connection

D) It resets the sequence numbers

Correct Answer: B) It retransmits unacked segments

Explanation: Page 150 (Transport Layer: 3-150) implies that a timer


expiration in TCP triggers retransmission of unacked segments, similar to
GBN, to recover from potential loss.

Question 28
Why does TCP use a 3-way handshake instead of a 2-way handshake?

A) To ensure both sides agree on sequence numbers and ACKs

B) To reduce packet loss

C) To compress data

D) To allocate bandwidth

Correct Answer: A) To ensure both sides agree on sequence numbers and


ACKs

Explanation: Page 151 (Transport Layer: 3-151) shows the 3-way handshake
ensures both client and server synchronize initial sequence numbers and
ACKs, establishing a reliable connection.

Question 29
What is the purpose of flow control in TCP?

A) To prevent network congestion

B) To ensure the receiver’s buffer does not overflow

C) To guarantee bandwidth allocation

D) To reorder out-of-sequence segments

Correct Answer: B) To ensure the receiver’s buffer does not overflow

Explanation: Page 9 (Transport Layer: 3-9) lists flow control as a TCP


feature, which prevents the sender from overwhelming the receiver’s
buffer, distinct from congestion control.

Question 30
What is congestion control designed to address?

A) Receiver buffer overflow

B) Network overload and packet loss


C) Application-layer errors

D) Physical link failures

Correct Answer: B) Network overload and packet loss

Explanation: Page 9 (Transport Layer: 3-9) mentions congestion control as


a TCP feature to manage network overload, reducing packet loss by
adjusting sending rates.

Question 31
How does TCP’s congestion control differ from UDP’s approach?

A) TCP has no congestion control, while UDP does

B) TCP adjusts sending rates, while UDP sends at a constant rate

C) TCP uses fixed rates, while UDP is dynamic

D) TCP ignores packet loss, while UDP retransmits

Correct Answer: B) TCP adjusts sending rates, while UDP sends at a


constant rate

Explanation: Page 139 (Transport Layer: 3-139) notes that TCP’s


congestion control throttles rates, while UDP sends data (e.g.,
multimedia) at a constant rate, tolerating loss.

Question 32
In TCP, what triggers the sender to start a timer?

A) Receiving an ACK

B) Sending a segment when no timer is running

C) Closing the connection

D) Detecting a corrupt segment

Correct Answer: B) Sending a segment when no timer is running

Explanation: Page 150 (Transport Layer: 3-150) states that the TCP sender
starts a timer when sending a segment if no timer is currently running,
to detect potential loss.

Question 33
What is a cumulative ACK in TCP?

A) An ACK for the next expected segment

B) An ACK confirming all bytes up to a certain sequence number

C) An ACK for a single segment


D) An ACK for out-of-order segments

Correct Answer: B) An ACK confirming all bytes up to a certain sequence


number

Explanation: Page 150 (Transport Layer: 3-150) implies that TCP uses
cumulative ACKs, where an ACK (e.g., y) confirms all bytes up to y-1 have
been received correctly.

Question 34
What happens during the TCP connection closure if the client sends a FIN
segment?

A) The server immediately closes the connection

B) The server sends an ACK and may send its own FIN later

C) The client retransmits the FIN

D) The connection resets

Correct Answer: B) The server sends an ACK and may send its own FIN later

Explanation: Page 152 (Transport Layer: 3-152) shows that when the client
sends a FIN, the server responds with an ACK and later sends its own FIN,
completing the 4-way handshake.

Question 35
Why is a very small loss rate critical for TCP over long, fat pipes?

A) To minimize connection setup time

B) To maintain high throughput with many in-flight segments

C) To reduce RTT

D) To avoid encryption overhead

Correct Answer: B) To maintain high throughput with many in-flight


segments

Explanation: Page 154 (Transport Layer: 3-154) explains that a small loss
rate (e.g., 2 * 10^-10) is needed for 10 Gbps throughput, as losses
reduce the window size, impacting many in-flight segments.

Question 36
In the GBN sender FSM, what does the base variable represent?

A) The next sequence number to send

B) The sequence number of the oldest unacked packet

C) The total number of packets sent


D) The last ACKed packet’s sequence number

Correct Answer: B) The sequence number of the oldest unacked packet

Explanation: Page 148 (Transport Layer: 3-148) shows that base is updated
to getacknum(rcvpkt)+1, representing the sequence number of the oldest
unacked packet.

Question 37
What is a disadvantage of TCP’s reliable delivery for real-time
applications?

A) It increases packet loss

B) It introduces delays due to retransmissions

C) It requires constant bandwidth

D) It lacks multiplexing

Correct Answer: B) It introduces delays due to retransmissions

Explanation: Page 139 (Transport Layer: 3-139) implies that TCP’s


retransmissions for reliability can delay real-time applications, leading
multimedia apps to prefer UDP.

Question 38
What does the TCP sender do if it receives a corrupt ACK?

A) Ignores it and waits for a timeout

B) Retransmits the last segment

C) Resets the connection

D) Sends a new ACK

Correct Answer: A) Ignores it and waits for a timeout

Explanation: Page 150 (Transport Layer: 3-150) implies that a corrupt ACK
is not processed (similar to GBN on Page 148), and the sender waits for a
timeout to retransmit unacked segments.

Question 39
In TCP, what is the significance of the NextSeqNum variable?

A) It tracks the last ACKed byte

B) It indicates the sequence number of the next byte to be sent

C) It counts the number of in-flight segments

D) It stores the receiver’s buffer size


Correct Answer: B) It indicates the sequence number of the next byte to
be sent

Explanation: Page 150 (Transport Layer: 3-150) shows that NextSeqNum is


incremented by the data length when a segment is created, representing
the sequence number of the next byte to send.

Question 40
What is the primary goal of reliable data transfer principles?

A) To maximize bandwidth usage

B) To ensure error-free, in-order delivery despite unreliable channels

C) To minimize connection setup time

D) To compress data segments

Correct Answer: B) To ensure error-free, in-order delivery despite


unreliable channels

Explanation: Page 10 (Transport Layer: 3-10) lists reliable data transfer


as a principle, aiming to provide error-free, in-order delivery over
unreliable network-layer services.

Question 41
Why does TCP use a window size in its congestion control?

A) To limit the number of retransmissions

B) To control the number of unacked segments in flight

C) To synchronize sequence numbers

D) To allocate receiver buffer space

Correct Answer: B) To control the number of unacked segments in flight

Explanation: Page 153 (Transport Layer: 3-153) discusses the window size
(W) as controlling the number of in-flight segments, adjusted by
congestion control to manage network load.

Question 42
What is a key difference between TCP and GBN?

A) TCP uses selective acknowledgments, while GBN retransmits all packets

B) TCP is connectionless, while GBN is connection-oriented

C) TCP lacks a timer, while GBN uses one

D) TCP provides unordered delivery, while GBN ensures order


Correct Answer: A) TCP uses selective acknowledgments, while GBN
retransmits all packets

Explanation: Page 148 (Transport Layer: 3-148) shows GBN retransmits all
packets after a loss, while TCP (Page 150) uses selective ACKs (implied)
to retransmit only lost segments.

Question 43
What does the TCP receiver do with out-of-order segments?

A) Discards them

B) Buffers them for later processing

C) Sends a NAK

D) Retransmits them

Correct Answer: B) Buffers them for later processing

Explanation: Page 150 (Transport Layer: 3-150) implies TCP buffers out-
of-order segments (unlike GBN, which discards them), delivering them in
order to the application.

Question 44
What is the impact of a high RTT on TCP throughput?

A) It increases throughput

B) It decreases throughput due to longer wait times

C) It has no effect on throughput

D) It reduces packet loss

Correct Answer: B) It decreases throughput due to longer wait times

Explanation: Page 153 (Transport Layer: 3-153) shows throughput is


inversely proportional to RTT in the formula (3/4)*(W/RTT); a higher RTT
reduces throughput.

Question 45
In the GBN protocol, what triggers the sender to retransmit packets?

A) Receiving a duplicate ACK

B) Timer expiration or receiving an ACK for a higher sequence number

C) Sending a new packet

D) Detecting a corrupt segment

Correct Answer: B) Timer expiration or receiving an ACK for a higher


sequence number
Explanation: Page 148 (Transport Layer: 3-148) shows GBN retransmits on
timer expiration (implied) or when an ACK updates the base, indicating
earlier packets may be lost.

Question 46
What is the role of sequence numbers in reliable data transfer?

A) To encrypt data

B) To identify and order segments for correct reassembly

C) To allocate bandwidth

D) To measure RTT

Correct Answer: B) To identify and order segments for correct reassembly

Explanation: Page 148 (Transport Layer: 3-148) implies sequence numbers


(e.g., nextseqnum) are used to identify packets and ensure in-order
delivery, critical for reliability.

Question 47
Why might TCP’s congestion control reduce performance for multimedia
apps?

A) It increases packet loss

B) It throttles the sending rate during congestion

C) It requires constant retransmissions

D) It lacks multiplexing

Correct Answer: B) It throttles the sending rate during congestion

Explanation: Page 139 (Transport Layer: 3-139) explains that TCP’s


congestion control reduces sending rates during congestion, which
multimedia apps avoid by using UDP for constant rates.

Question 48
What does the TCP sender do when there are no unacked segments after an
ACK?

A) Sends a new segment

B) Stops the timer

C) Retransmits the last segment

D) Resets the connection

Correct Answer: B) Stops the timer


Explanation: Page 150 (Transport Layer: 3-150) states that if there are
no unacked segments after updating SendBase, the TCP sender stops the
timer, as no retransmissions are needed.

Question 49
What is a key principle of congestion control?

A) Ensuring constant data rates

B) Adjusting sending rates to avoid network overload

C) Guaranteeing no packet loss

D) Compressing data segments

Correct Answer: B) Adjusting sending rates to avoid network overload

Explanation: Page 10 (Transport Layer: 3-10) lists congestion control as


adjusting sending rates to prevent network overload, a core principle
implemented in TCP.

Question 50
What is the significance of the 4-way handshake in TCP connection
closure?

A) It ensures both sides agree to terminate the connection gracefully

B) It reallocates bandwidth

C) It synchronizes new sequence numbers

D) It compresses remaining data

Correct Answer: A) It ensures both sides agree to terminate the


connection gracefully

Explanation: Page 152 (Transport Layer: 3-152) shows the 4-way handshake
(FIN, ACK, FIN, ACK) ensures both client and server agree to close the
connection, preventing data loss.

You might also like